wormhole-icco/anchor-contributor
Karl Kempe ce72b3a4df
More certik findings (#69)
* LIB-01 | Possible to Use Incorrect Mint When Initializing a Sale

* LIB-02 | Denial-of-Service Attack Can Prevent Legitimate Sales From Initializing

* LIB-03 | Missing Owner Validation for `sale_token_mint`

* COT-02 | Uninitialized Token Accounts
2022-08-26 16:31:08 -05:00
..
migrations Refactor SDK (#68) 2022-08-16 09:54:02 -05:00
programs/anchor-contributor More certik findings (#69) 2022-08-26 16:31:08 -05:00
tests More certik findings (#69) 2022-08-26 16:31:08 -05:00
.gitignore Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05:00
.prettierignore Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05:00
Anchor.toml Refactor SDK (#68) 2022-08-16 09:54:02 -05:00
Cargo.lock Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
Cargo.toml Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05:00
README.md Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05:00
devnet.env Refactor SDK (#68) 2022-08-16 09:54:02 -05:00
package.json Certik: Fix Solana Contributor's ATA Validation (#61) 2022-08-03 13:31:34 -05:00
test.env Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
tsconfig.json Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05:00
unset.env Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
yarn.lock Refactor SDK (#68) 2022-08-16 09:54:02 -05:00

README.md

ICCO Built with Anchor

Dependencies

  • Solana CLI (1.10.24)
  • Anchor CLI (0.24.2)
  • yarn (1.22.*)
  • node (16.*)

Tests

Unit tests (which just runs cargo test).

yarn run unit-test

Integration test using Anchor's local validator, which includes Wormhole and Token Bridge interaction.

yarn run integration-test

NOTE: expect one failing test, which attempts to invoke Token Bridge program to transfer contributions to conductor.

Deploy

Currently there is only one deployment command in yarn, which deploys the contributor contract to devnet. If you deploy a new conductor, you will need to replace the existing CONDUCTOR_ADDRESS with that newly deployed contract address.

You need to specify a WALLET variable, which will be used to pay for deployment.

WALLET=path/to/your/key.json yarn run deploy-devnet

Other Notes

We manage compile-time constants with environment variables found in test.env and devnet.env. When it comes time to deploy to mainnet, make a corresponding mainnet.env file. If you inadvertently source these files outside of any of the provided scripts, you can run . unset.env to unset all these variables.