We learned about Truffle in Chapter 5, Using Ganache and the Truffle Framework. To set up a new Truffle project, we have to do the following:
- Execute the following command in an empty folder:
$ truffle init
This will initialize the Truffle project-related files and folders under the current directory.
- Initialize the npm packages in the Truffle project. To enable the project to install npm packages, you will need to execute the following command:
$ npm init
The command will ask for certain details related to your package that you can provide, and it will create a package.json file under the current folder.
- Next, we need to install the dependencies of the project that we are going to use. As we have designed the contract's architecture, looking at that, we would need libraries from OpenZeppelin.
To install the latest version of the...