Technical requirements

The code files of this chapter are available at the following link:

https://github.com/PacktPublishing/Blockchain-Development-for-Finance-Projects/tree/master/Chapter%202/Chapter%202

We'll be using the following to develop our project:

For installing Ganache on Ubuntu, you might need to change some settings. Click on the drop-down menu next to the Ganache directory name on the title bar. Select Preferences. Navigate to the Behavior tab. Under Executable Text Files, set the option to Ask what to do. Navigate back to the file downloaded from the Ganache download link. Right-click on the file and click on PROPERTIES. Select the Permissions tab. Select the option Allow executing files as program. Now, double-click on the file. The Ganache blockchain should start smoothly. It's probably best to do a global installation of Truffle to avoid any conflicts. For example, create a directory workspace called truffle and install Truffle using sudo npm install truffle -g.

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.

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

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