The code files for this chapter are available at the following link: https://github.com/PacktPublishing/Blockchain-Development-for-Finance-Projects/tree/master/Chapter%206.
To develop our project, we'll be using the following:
- 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 to run the preceding applications and deploy 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.