Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 1.78 KB

README.md

File metadata and controls

81 lines (61 loc) · 1.78 KB

Token Bridge Contracts

Contract coverage

Coverage Status

Install dependencies

Use node 16. Install node https://nodejs.org/es/ Then install dependencies

npm install

Running test

npm run test
npm run lint
npm run coverage

Configure networks

Edit the hardhat configuration file

module.exports = {
  // See https://hardhat.org/config/
  // to customize your hardhat configuration
  networks: {
    development: {
      host: "127.0.0.1",
      port: 8545,
      network_id: "*" // Match any network id
    },
    rskregtest: {
      host: "127.0.0.1",
      port: 4444,
      network_id: "*" // Match any network id
    },
  }
};

Deploy contracts

Launch the local network

ganache-cli --verbose

Deploy using hardhat to the desire network

npm run deploy --network <network>

Examples

npm run  deploy --network development
npm run  deploy --network rskregtest

This will also generate the json files for that network with the addresses of the deployed contracts that will be called by the federator.

Using HardHat

After the deployments usign hardhat deploy, you will be able to verify all the deployed contracts using an script

$~ verify-script -n <networkName>

The network name is defined at hardhat.config.js

Contracts

  • All the contracts to be deployed from now on should use the abidecoder v2
  • So, at the .sol contracts add the pragma abicoder v2; at the top, right after the pragma solidity version, like this: image