Installing and configuring the Truffle framework
To develop and test smart contracts for Ethereum, you need to have the Truffle framework installed on your machine. Installing and starting a project in Truffle is relatively easy and you can do it in a few steps. Most of the tasks in Truffle are carried out through a command-line interface, and you will learn more about configuring the framework in this recipe.
Getting ready
The Truffle framework is based on JavaScript and is distributed via npm
. You need to have Node.js
(5.0+) installed on your machine to set up and work with Truffle.
Also, Truffle requires a working Ethereum network with the Remote Procedure Call (RPC) port exposed for the testing and deployment of smart contracts. You can use geth, Parity, or Ganache (previously TestRPC) as the Ethereum client. For more information, refer to the first chapter of this book.
Node Package Manager (npm) is an online repository for the publishing of open source Node.js projects. It is also used...