1.7 KiB
Building
Build the contracts by running make build
Testing
Run the tests by running make test
The tests can be found here tests/icco.js
Deploying ICCO to testnet
To deploy the Conductor and Contributor smart contracts to testnet you will need do the following:
-
Set up the ICCO deployment config:
icco_deployment_config.js
-
Each network in the deployment config has several parameters:
conductorChainId
- the network that theConductor
contract is (or will be) deployed tocontributorChainId
- the network thatContributor
contract will be deployed toauthority
- the public key of the KYC authority for the contributor- This value does not have to be set when deploying the
Conductor
contract.
- This value does not have to be set when deploying the
consistencyLevel
- number of confirmationswormhole
- the wormhole coreBridge addresstokenBridge
-the wormhole tokenBridge addressmnemonic
- private key for deployment walletrpc
- URL for deployment provider
-
The
conductorChainId
andcontributorChainId
should be the same only if both contracts are deployed on the same network -
ChainIDs for each network can be found here: https://docs.wormholenetwork.com/wormhole/contracts
-
-
Deploy the
Conductor
contract with the following command:- npx truffle migrate --f 2 --to 2 --network (
network key from icco_deployment_config.js
) --skip-dry-run
- npx truffle migrate --f 2 --to 2 --network (
-
Deploy the
Contributor
contract(s) with the following command:- npx truffle migrate --f 3 --to 3 --network (
network key from icco_deployment_config.js
) --skip-dry-run
- npx truffle migrate --f 3 --to 3 --network (
-
Follow the instructions in the README.md in
tools/
forContributor
contract registration