This token is named BRF which can be traded with 2 mock tokens when are also created using the ERC-20 complient token which is created using Token contract. These mock tokens are: mETH & mDAI
-React JS (for Frontend)
-Solidity (for Smart Contracts)
-Etherjs (for Blockchain Interaction)
-Hardhat (Ethereum Development Environment)
Note: Following above steps will start the project
- Add Hardhat account 0 and Hardhat account 1 to your Metamask using the private key generated on execution of
npx hardhat node
- In case of any unexpected behaviour occurance, check the address of tokens and exchange from 2nd commands output match the ones in utils/addressConfig.json. They should be same for the deploy to work correctly when using hardhat as network
First Command: (To execute hardhat node)
npx hardhat node
Second Command: (To run Deploy script)
npx hardhat run --network localhost scripts/1_deploy.js
Third Command: (To run seeding script so that we have filled Order Book at start)
npx hardhat run --network localhost scripts/2_seed-exchange.js
Fourth Command: (To run local server to view the dEX platform)
npm run dev
First Command:
npx hardhat node
Second Command:
npx hardhat run --network localhost scripts/1_deploy.js
Third Command:
npx hardhat run --network localhost scripts/2_seed-exchange.js
To run all tests together:
npx hardhat test
To run Test for Token only:
npx hardhat test test/Token.js
To run Test for Exchange:
npx hardhat test test/Exchange.js