Project setup

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 4Peer 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, 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset