Lab
To turn up the entire project, we will have to deploy the sub-component of this project. The source has been taken from GitHub, which can be found at the following link:Â https://github.com/hoxxep/Ethereum-2FA.
This has the following files in it:
The files in the preceding screenshot are explained as follows:
contracts
: This folder includes our smart contract,ÂTwoFactorAuth.sol
migrations
: This folder consists of migration files to deploy the contract to the blockchaintest
: This folder consists ofÂserver.js
, which is responsible for event authentication in our contractnode_modules
: This folder includes all the librariestruffle.js
: This configuration file consists of a set of configurations to connect to the blockchainpackage.json
: This is where we specify a configuration of our project, such as name and scripts
Components
The following are the three core components of this project, shown in the following diagram:
- A blockchain network (which we will develop with the Ganache CLI)
- A smart contract...