wormhole-icco/ethereum
Karl 0a049aea61
Fix config (#32)
2022-05-16 15:56:23 -05:00
..
contracts evm: refactor contributor saleSealed (#31) 2022-05-16 15:52:28 -05:00
migrations Add testnet deployments and test application 2022-05-11 20:34:56 +00:00
scripts Fix registerChain 2022-04-24 15:18:05 +00:00
test Add tokenDecimals to initSale struct 2022-05-13 15:12:34 +00:00
.dockerignore Hello, world! 2022-04-22 16:16:56 +00:00
.env.template Hello, world! 2022-04-22 16:16:56 +00:00
.env.test Add ownerOnly methods to update certain parameters 2022-04-26 17:53:45 +00:00
.gitignore Add testnet deployments and test application 2022-05-11 20:34:56 +00:00
Makefile Fix truffle-config dependencies 2022-05-13 16:42:06 +00:00
README.md Update README.md 2022-05-13 13:58:42 -05:00
VERIFY.md Hello, world! 2022-04-22 16:16:56 +00:00
conductor_devnet.json Hello, world! 2022-04-22 16:16:56 +00:00
copy-from-container.sh Hello, world! 2022-04-22 16:16:56 +00:00
icco_deployment_config.js.sample Fix config (#32) 2022-05-16 15:56:23 -05:00
package-lock.json Upgrade elliptic to 6.5.4 (#30) 2022-05-16 15:25:18 -05:00
package.json Upgrade elliptic to 6.5.4 (#30) 2022-05-16 15:25:18 -05:00
truffle-config.js Fix truffle-config dependencies 2022-05-13 16:42:06 +00:00
truffle-verify-constants.patch Hello, world! 2022-04-22 16:16:56 +00:00

README.md

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:

  1. Set up the ICCO deployment config: icco_deployment_config.js

    • Each network in the deployment config has several parameters:

      • conductorChainId - the network that the Conductor contract is (or will be) deployed to
      • contributorChainId - the network that Contributor contract will be deployed to
      • authority - the public key of the KYC authority for the contributor
        • This value does not have to be set when deploying the Conductor contract.
      • consistencyLevel - number of confirmations
      • wormhole- the wormhole coreBridge address
      • tokenBridge -the wormhole tokenBridge address
      • mnemonic - private key for deployment wallet
      • rpc - URL for deployment provider
    • The conductorChainId and contributorChainId 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

  2. 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
  3. 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
  4. Follow the instructions in the README.md in tools/ for Contributor contract registration