Install
Go to the source directory and open terminal, please run this command.
npm install
Compile
npx hardhat compile
Config
Rename .env.example to .env and open it, then fill the mainnet/rinkeby url and account's private key.
MAINNET_END_POINT=Your mainnet infra url
MAINNET_PRIVATE_KEY=Your mainnet account's private key for deployment
RINKEBY_END_POINT=Your rinkeby infra url
RINKEBY_PRIVATE_KEY=Your rinkeby account's private key for deployment
ETHERSCAN_API_KEY=You etherscan api
Test
npx hardhat test test/test.js
Deploy on Mainnet
npx hardhat run scripts/deploy.js --network local
Deploy on Rinkeby
npx hardhat run scripts/deploy_test.js --network rinkeby
Once deployed, you can see the Bridge contract's address on terminal.
Save the Bridge contract's address and use it.