Go to the source directory and open terminal, please run this command.
npm install
npx hardhat compile
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
npx hardhat test test/test.js
npx hardhat run scripts/deploy.js --network local
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.