This project is using Hardhat for development, compiling, testing and deploying. The development tool used for development is Visual Studio Code which has great plugins for solidity development and mocha testing.
-
Binance Chain
-
Binance Test Chain
-
Mainnet
-
Kovan
Introduction to compiling these contracts
npm install or yarn install
npx hardhat compile
npx hardhat test
This is needed before a truffle migrate to the development network. You can also use this for local development with for example metamask. Hardhat node guide
npx hardhat node
Use the scripts in the "scripts" folder. Each script has the command to start it on top.
Make sure you have set the right settings in your '.env' file. You have to create this file with the following contents yourself:
BSC_PRIVATE_KEY=<private_key>
BSC_TEST_PRIVATE_KEY=<private_key>
KOVAN_PRIVATE_KEY=<private_key>
RINKEBY_PRIVATE_KEY=<private_key>
GOERLI_PRIVATE_KEY=<private_key>
MAIN_PRIVATE_KEY=<private_key>
KOVAN_INFURA=https://kovan.infura.io/v3/<infura_key>
RINKEBY_INFURA=https://rinkeby.infura.io/v3/<infura_key>
GOERLI_INFURA=https://goerli.infura.io/v3/<infura_key>
MAIN_INFURA=https://mainnet.infura.io/v3/<infura_key>
MAIN_ALCHEMY_URL=https://eth-mainnet.alchemyapi.io/v2/<alchemy_key>
KOVAN_ALCHEMY_URL=https://eth-kovan.alchemyapi.io/v2/<alchemy_key>
ETHERSCAN_API_TOKEN=<etherscan_api_token>
BSC_API_TOKEN=<bscscan_api_token>
npx hardhat flatten contracts/DPexRouter.sol > contracts-flattened/DPexRouter.sol