Setup Token Whitelist
This repo contains
- Token Whitelist program
- JavaScript bindings (using @solana/web3.js)
- Test client
- 1.
- 2.
Start a local Solana cluster:
$ solana-test-validator
Build token whitelist on-chain program
$ cd program
$ cargo build-bpf
Deploy the program to localnet using the command displayed when you run the build above. Note down the public-key of the program once deployed (this is the solrazr-token-whitelist program id) and do the following.
Update
TOKEN_WHITELIST_PROGRAM_ID
inside js/client/pubkeys.js
with the public-key generated aboveYou can use the JS client to test the program
$ cd js
$ npm run start
You can modify
js/cli/main.js
and js/cli/token-sale-test.js
to suit your needs.In order to run token sale program (https://github.com/solrazr-app/solr-token-sale), you need token whitelist map to be created.
You can find token whitelist map account printed to console when you run the JS client above. You need to use this account when initialising token sale.
Last modified 1yr ago