0.0.2 • Published 1 year ago

@chainfusion/erc-20-bridge-contracts v0.0.2

Weekly downloads
-
License
LGPL-3.0
Repository
-
Last release
1 year ago

ChainFusion Contracts

This repository contains Solidity contracts with bridge logic

Development

Install Packages

$ npm install

Compile Contracts

$ npm run compile

Run Tests

$ npm run test

Deployment

First of all, copy .env.example into .env and set up all required variables inside

Deploy Contracts

In this example we are deploying to ternopil testnet. To deploy to different chain, --network parameter should be changed.

Deployment involves running two scripts in sequence. The first script is deployed once, on ChainFusion network and used to create the BridgeApp that allows to register an app and set its addresses for each chain.

$ npx hardhat --network ternopil run scripts/deploy-chainfusion.ts

The second script is deployed each time for a new chain, deploys the main contracts that are responsible for the bridge logic and sets the BridgeApp address in the ERC20Bridge contract.

$ npx hardhat --network bg1 run scripts/deploy-chain.ts

Verify Contracts

To verify contracts, you need to specify network, contract address and constructor parameters (if present).

$ npx hardhat --network goerli verify <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>

Or you can set VERIFY variable to true while deploying contracts to automatically verify them afterwards.

$ VERIFY=true npx hardhat --network ternopil run scripts/deploy-chainfusion.ts
0.0.2

1 year ago

0.0.1

1 year ago

0.0.1-rc.4

1 year ago

0.0.1-rc.3

1 year ago

0.0.1-rc.2

1 year ago

0.0.1-rc.1

1 year ago