wormhole-icco/ethereum
Reptile 77e588e613
EVM Certik Findings (#70)
ICC-01

Co-authored-by: Drew <dsterioti@users.noreply.github.com>
2022-08-26 16:23:19 -05:00
..
contracts EVM Certik Findings (#70) 2022-08-26 16:23:19 -05:00
migrations Refactor SDK (#68) 2022-08-16 09:54:02 -05:00
scripts Fix registerChain 2022-04-24 15:18:05 +00:00
test EVM Certik Findings (#70) 2022-08-26 16:23:19 -05: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
CONDUCTOR_ERROR_CODES.md Halborn findings (#66) 2022-08-15 16:49:38 -05:00
Makefile Fix truffle-config dependencies 2022-05-13 16:42:06 +00:00
README.md Certik Findings - EVM (#58) 2022-07-27 12:11:04 -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 Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
package-lock.json Upgrade elliptic to 6.5.4 (#30) 2022-05-16 15:25:18 -05:00
package.json Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
truffle-config.js Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05: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.

Conductor Error Codes

The Conductor's revert strings are codified, please see CONDUCTOR_ERROR_CODES.md here.

Deploying ICCO to EVM testnets

To deploy the Conductor and Contributor smart contracts to testnet, follow the procedure below.

Set up the ICCO deployment config. Each network in icco_deployment_config.js 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
  • 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

There is a sample config that you can copy to icco_deployment_config.js to help you get started.

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.

Deploy the Conductor contract with the following command, where your_network corresponds to a network name from icco_deployment_config.js.

npm run deploy-conductor your_network

And deploy the Contributor contract(s) for any network you want to collect contributions from.

npm run deploy-contributor your_network

These commands work for mainnet networks you configure, too. After deploying your contracts, follow the instructions in the README.md in tools/ for Contributor contract registration.