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
Next, create a project directory:
mkdir PacktCoin
cd PacktCoin
And finally, initialize the Truffle project, which will generate an empty Truffle project with the directory structure that was introduced in Chapter 5, Tontine Game with Truffle and Drizzle:
truffle init
Our project environment is now ready for use. Before we jump into our implementation, let's first explore the types of tokens that are currently available.