Skip to content

sora-xor/sora2-federated-bridge-evm-contracts

Repository files navigation

Ethereum Contracts

This repository contains smart contracts utilized by the Polkadot-Ethereum Bridge.

Development

Make sure you use a recent node version, e.g. with nvm:

nvm install 20.4.5
nvm use 20.4.5

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

Testing

Run tests on the hardhat network:

npx hardhat test

Deployment

Example: Deploy contracts to a local ganache instance

npx hardhat deploy --network localhost

Autogenerated Documentation

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

You could also specify a solidity compile version for solidity-docgen.

npx solidity-docgen --solc-module solc-0.8

Generate ABI

ABI for bindings can be generated with docker:

docker compose -f docker-compose-generate-abi.yml up

or with script, in this case make sure the project has been rebuilt

./scripts/update_abi.sh

About

Designing a Better World Through Decentralized Technologies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •