- Checkout the code and run
npm install - install truffle globally
npm i -g truffle - Install ganache (local blockchain development environment)
- Install metamask extension from your desired browser
- Run ganache and configure your network provider details in truffe-config.js
- Refer smartcontracts from the folder path
src/contractsand Executetruffle testto make sure all the test cases are passing - Execute
truffle migrate(this will deploy the smart contracts into ganache ,refer truffel.config.js and migrations/2_deploy_contracts.js) and for repeated smarcontract depolyment executetruffle migrate --reset - In metamask, configure local network provider details as ganache.(url:'https://127.0.0.1:7545 and chainid:1337)
- run
npm run start, application will be running in localhost:3000
- Created a two new ERC20 token as
DaiandDapp, Where investors will stakedai tokento get rewards inDapp token. - Refer smart contracts
Daitoken.sol, DappToken.solfromsrc/contractsfor Erc20 implementation. - Refer
TokenFarm.solsmartcontract for staking and unstaking process. - Issuing rewards are manual. you have to run the scripts from
scripts/issue_token.js, command will betruffle exec scropts/issue_token.js - For front end react project, refer App.js -> corresponding components.
https://drive.google.com/file/d/1ocBk8hU2hJhChK_FmBK1rBQM2AOS6vT3/view?usp=sharing