gitmyhub

truffle

TypeScript ★ 14k updated 2y ago ▣ archived

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.

Truffle is a development framework for Ethereum smart contracts that compiles, deploys, and tests blockchain code, but it has been officially sunset and is no longer actively maintained.

TypeScriptJavaScriptNode.jsSoliditysetup: moderatecomplexity 3/5

Truffle is a set of tools for building software on Ethereum, a blockchain platform. On Ethereum, programs are called smart contracts: small pieces of code that live on the blockchain and run automatically when certain conditions are met. Writing and testing those contracts involves several fiddly steps, and Truffle was made to pull those steps together so the work is easier for developers.

The README lists what Truffle gives you. It compiles smart contracts, links them, and handles deploying them and keeping track of the resulting files. It runs automated tests using two common testing tools called Mocha and Chai. It includes a system for scripting deployments and migrations, manages connections to many different public and private blockchain networks, and offers an interactive console for talking to your contracts directly. It also rebuilds project files instantly while you work and can run external scripts inside the Truffle environment.

Getting started is meant to be quick. You install it through npm, the package manager for the JavaScript world, then run a command to create a starter project with sample contracts and tests. From there, separate commands compile the contracts, deploy them, and run their tests. Truffle comes bundled with a local test blockchain that starts up automatically, and there is a separate, more advanced version of that test server called Ganache, available as both a command-line tool and a graphical app.

There is an important caveat. The project description states that the Truffle Suite is being sunset, meaning the maintainers have decided to wind it down. The repository itself sits under an archive account. Anyone considering it today should read the official notes about ongoing support and migration options before relying on it for new work.

For people who still want to contribute, the README explains how to fork the repository, install it locally with Yarn, and run the test suite, and it describes which branches to target with pull requests. The official documentation site holds guides, tips, and examples. Truffle is shared under the MIT license.

Where it fits