Creating a Truffle project

To initialize a new DApp project, we can run the truffle init command to initialize an empty Truffle project. This will create the DApp directory structure, including apps, contracts, and tests with Truffle configurations. Since Truffle Boxes provide many working templates, in our DApp example, we will use pet-shop box—a JQuery version of a JavaScript UI library—to develop our crowdfunding DApp example. 

Create a folder called Crowdfunding, open a command-line prompt, navigate to the  Crowdfunding folder, and run the following command:

truffle unbox pet-shop

The project structure is as follows:

We wrote the crowdfunding smart contract in the previous chapter. Let's copy the CrowdFunding.sol file into the contracts folder under Crowdfunding.

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

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