The code files of this chapter are available at the following link:
We'll be using the following to develop our project:
- Ganache Private Blockchain Server—https://trufflesuite.com/ganache/
- Trufflesuite—https://github.com/trufflesuite/truffle
- MetaMask plugin for Chrome/Firefox/Safari—https://metamask.io/
I'm using Ubuntu 18.04.2 LTS for running the preceding applications and deploying my blockchain. This project assumes that you are working on a Unix operating system. Additionally, this project assumes you have Node.js and npm installed. I'm using Node version 13.0.1 and npm version 6.12.0.
Lastly, we'll be using the OpenZeppelin library of smart contracts to write our contracts. To use this library, create a project folder in your Truffle workspace. Let's call it tokenwallet. Create a package.json file in the project folder and update it with the following values:
{
"dependencies": {
"babel-register": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.18.0"
},
"devDependencies": {
"openzeppelin-solidity": "^2.2.0"
}
}
Run npm install to install the OpenZeppelin library and Babel for your Truffle workspace.