Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Latest commit

 

History

History
97 lines (60 loc) · 2.37 KB

File metadata and controls

97 lines (60 loc) · 2.37 KB

@kleros/cross-chain-sundial-contracts

Smart contracts to enable cross-chain arbitration for Sundial

Deployed Addresses

Home Proxy

Foreign Proxy

Contributing

Install Dependencies

yarn install

Run Tests

yarn test

Compile the Contracts

yarn build

Run Linter on Files

yarn lint

Fix Linter Issues on Files

yarn fix

Deploy Instructions

IMPORTANT: new versions of any of the contracts require publishing both Home and Foreign proxies, as their binding is immutable.

NOTICE: the commands bellow work only if you are inside the contracts/ directory.

0. Set the Environment Variables

Copy .env.example file as .env and edit it accordingly.

cp .env.example .env

The following env vars are required:

  • PRIVATE_KEY: the private key of the deployer account used for xDAI, Sokol and Kovan.
  • MAINNET_PRIVATE_KEY: the private key of the deployer account used for Mainnet.
  • INFURA_API_KEY: the API key for infura.

The ones below are optional:

  • ETHERSCAN_API_KEY: used only if you wish to verify the source of the newly deployed contracts on Etherscan.

1. Update the Constructor Parameters (optional)

If some of the constructor parameters (such as the Meta Evidence) needs to change, you need to update the files in the deploy/ directory.

2. Deploy the Proxies

yarn deploy:staging # to deploy to Mumbai/Goerli
# yarn deploy:production # to deploy to Polygon/Mainnet

The deployed addresses should be output to the screen after the deployment is complete. If you miss that, you can always go to the deployments/<network> directory and look for the respective file.

3. Verify the Source Code for Contracts

This must be done for each network separately.

For Goerli or Mainnet you can use the etherscan-verify command from hardhat:

yarn hardhat --network <mumbai|polygon|goerli|mainnet> etherscan-verify

Note: For Polygon Mainnet and Mumbai testnet a separate ETHERSCAN_API_KEY is required created on https://polygonscan.com