oliviel / retro-token-farm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retro Token Farm DEFI Project

This project was made with:

Steps to run the project

  1. Install the dependencies.
npm install
  1. Compile the contracts.
npx hardhat compile 
  1. Test the contracts.
npx hardhat test 
  1. Create a second account in metamask if you don't have one and use the second account (metamask is an extension to do blockchain transactions in the browser, if you don't metamask installed click the metamask link to install the extension) create-account account-2

  2. Create a .env file and add the 12 MNEMONIC phrase generated by metamask look at the .env.example file to have an example (this step will connect your HD WALLET in this case metamask with the test hardhat accounts while you are in the hardhat network)

  3. Run the hardhat network (this command will run the hardhat network with 10 test accounts with 1000 fake ETH for each one)

npx hardhat node
  1. Open a new terminal while the hardhat network is running and run the next script (this script will deploy the contracts to the hardhat network and will create the abis folder inside ./src)
npx hardhat run scripts/deploy.js --network localhost 
  1. Change metamask to the hardhat network if you don't have the hardhat network added follow the next steps of the image. custom-rpc network-data
  2. Add the Mock Dai Token to metamask in custom Tokens. add-token custom-token If you don't know the mock dai contract address check inside the ./src/abis inside the file daitoken-address.json you will find the address. (Note to create the abis folder you need to do step 5) if you don't know the token symbol and decimals check inside the ./contracts/DaiToken.sol contract
  3. Run the react app.
npm start
  1. Start playing with the token farm stacking and unstacking tokens. retro-token-project
  2. Issue Retro tokens to your address.
npx hardhat run scripts/issue-tokens.js --network localhost 

About


Languages

Language:JavaScript 69.6%Language:Solidity 19.4%Language:HTML 6.3%Language:CSS 4.5%Language:Shell 0.3%