3 min read - Posted 04 Dec 18

Truffle 101 - Development Tools for Smart Contracts

Truffle is a suite of tools to help Dapp developers build, deploy and manage their applications. The three tools provide a stack for managing the development lifecycle of an application similar to those you may have used with other languages and frameworks. These are:

  • Ganache, for starting a personal test Ethereum blockchain on your machine.
  • Truffle, for managing the lifecycle of smart contracts and the artifacts your contracts need.
  • Drizzle, a collection of front-end libraries for standardizing Dapp front-ends.

Each tool has its own features and functionality summarized below, for full details read the Truffle documentation.


Available as a cross-platform GUI application or command line tool (ganache-cli), Ganache starts a local and personal Ethereum blockchain on your machine useful for testing, and other aspects of the Truffle Suite. Alongside this are tabs for details on settings, accounts, blocks, transactions, and logs.

The Ganache Interface


Truffle packs a lot of features that follow familiar patterns and paradigms. I'll highlight a couple in this guide, and you can find a full guide in the Truffle documentation.

Truffle Boxes

Similar to Vagrant machines, Docker containers, or Yeoman generators, Truffle boxes contain pre-defined smart contract and other dependencies for Dapps. Even better each box ships with specific instructions on how to get started with it.


Truffle's truffle compile command adds to the solidity compilation process by only compiling changes to contracts located in the contracts folder and placing the resulting artifacts into a build folder ready for use in Dapps.


Unlike migrations from other web frameworks (such as Ruby on Rails), Truffle migrations are settings to help you deploy contracts between development and production networks.

Migrations are .js files inside the migrations folder and run them with the truffle migrate command. Each migration file defines artifacts you need, contracts to deploy and the order the steps need to run in. You need an initial contracts/Migrations.sol contract that defines an interface for future migrations and this is created when you create a Truffle project.


The Truffle suite provides a testing suite for your Dapps where you can write your tests in two ways:

  • In Solidity for testing token focussed functionality such as balance transfers.
  • In JavaScript for testing how a user interacts with your Dapp and the underlying smart contracts.

Whichever language(s) you use, you place all your tests inside the test folder and run them with the truffle test command. This command runs your tests and displays the success or failure results.


Debugging is an essential part of any development process, and Truffle's debug command helps you investigate what happened in the execution that lead to a transaction. The command opens an interface in your terminal that is similar to other debuggers that lets you step through the code.

Interacting with a contract

Similar to consoles provided by Ruby and Python, Truffle lets you test potential interactions with your contracts via the truffle console command and receive instant feedback.


Based on popular JavaScript framework, Redux, Drizzle is a collection of reactive libraries to build Dapp front-ends that stay in sync with your contract and transaction data. It borrows a lot of concepts from frameworks such as React and brings them to the Web3 word ecosystem.

Created with Sketch.Content is"CC-BY-SA 4.0" licensed
Article On-chain
Article Author

Chris Ward

Technical Content Lead




Related Articles
Truffle: Smart Contract Compilation & Deployment

Intro Earlier in the series, we took a look at how to manually deploy and interact with our Bounties.sol smart contract on a local development blockchain. We also briefly touched on development frameworks which hide the complexity of these repetitive tasks and allow us to focus on developing dApps. This article will walk through the steps required to setup Truffle and use it to compile, deploy and interact with our Bounties.sol smart contract. You should see that this is a much easier process th

Josh Cassidy

03 May 19

Truffle: Smart Contract Compilation & Deployment

Truffle: Smart Contract Compilation & Deployment This article covers the steps required to setup Truffle and use it to compile, deploy and interact with our Bounties.vy smart contract. You should see that this is a much easier process than the manual steps we learned in the previous article. __ You can find the source code used in this tutorial here What is Truffle? To recap, Truffle is a Node based development framework which is currently the most used and actively maintained smart contract dep