Before we start to look in detail at the ICO implementation, it's a good idea to set up our working environment so we can incrementally add to the code as we walk through the explanation. For this project, we'll be using the Truffle framework and the Solidity language, which were introduced in Chapter 4, Peer to Peer Auction in Ethereum, and Chapter 5, Tontine Game with Truffle and Drizzle. The tutorial assumes you are working from a Linux-style terminal.
If you haven't already installed Truffle, do so by running the following command on the command line:
npm install -g truffle
For complete details on dependencies, and to troubleshoot any Truffle-specific issues, please refer to the official documentation at https://truffleframework.com/docs/truffle/getting-started/installation.
Next, create a project directory:
mkdir PacktCoin
cd PacktCoin
And finally...