ce72b3a4df
* 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 |
||
---|---|---|
.. | ||
migrations | ||
programs/anchor-contributor | ||
tests | ||
.gitignore | ||
.prettierignore | ||
Anchor.toml | ||
Cargo.lock | ||
Cargo.toml | ||
README.md | ||
devnet.env | ||
package.json | ||
test.env | ||
tsconfig.json | ||
unset.env | ||
yarn.lock |
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.