wormhole-icco/anchor-contributor
Drew c97e36f6e3
Feature/fixed price sale (#43)
Adding the following features:
* Fixed-price sale configuration
* Lock-drop (cannot claim allocation until after lock period ended)
* KYC per sale
* Claim excess as separate method (due to lock-drop for allocation)
* Events to EVM contracts

Co-authored-by: Drew <dsterioti@users.noreply.github.com>
Co-authored-by: Karl Kempe <karlkempe@users.noreply.github.com>
Co-authored-by: skojenov <sekoje@users.noreply.github.com>
2022-06-14 17:04:05 -05:00
..
migrations Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -05:00
programs/anchor-contributor Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
tests Feature/fixed price sale (#43) 2022-06-14 17:04:05 -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 Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -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 Feature/fixed price sale (#43) 2022-06-14 17:04:05 -05:00
package.json Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -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 Solana ICCO Contract written using Anchor (#41) 2022-06-13 20:13:47 -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.