This directory contains smart contracts utilized by the Polkadot-Ethereum Bridge.
Requirements:
- Node 14 LTS. See installation instructions.
- Yarn
Install dependencies with yarn:
yarn install
Create an .env
file using the env.template
as a template. Note that deploying to ropsten network requires setting the INFURA_PROJECT_ID and ROPSTEN_PRIVATE_KEY environment variables.
Example:
cp env.template .env
Run tests on the hardhat network:
yarn test
Example: Run a local hardhat instance with deployments
yarn hardhat node
yarn hardhat deploy --network ropsten
Example: upgrade an app to use a different set of channels
# Do something first to deploy new channels, then provide addresses below
yarn hardhat upgrade \
--appaddr 0x3f0839385DB9cBEa8E73AdA6fa0CFe07E321F61d \
--basicinbound 0x0000000000000000000000000000000000000001 \
--basicoutbound 0x0000000000000000000000000000000000000002 \
--incinbound 0x0000000000000000000000000000000000000003 \
--incoutbound 0x0000000000000000000000000000000000000004 \
--network localhost # change to ropsten or mainnet accordingly
yarn hardhat renounce \
--appaddr 0x3f0839385DB9cBEa8E73AdA6fa0CFe07E321F61d \
--network localhost
Solidity documentation can be autogenerated using the solidity-docgen library. It will generate markdown files from the contracts directory and output them to the docs directory.
# The library is only compatible with npx
npx solidity-docgen