@chainfusion/erc-20-bridge-contracts v0.0.3
ChainFusion Contracts
This repository contains Solidity contracts with bridge logic
Development
Install Packages
$ npm installCompile Contracts
$ npm run compileRun Tests
$ npm run testDeployment
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.tsThe 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.tsVerify 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.ts8 months ago
8 months ago
8 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago