SolRazr
  • Home
  • SolRazr Introduction
    • What is SolRazr?
    • Tradable Allocations
    • Developer Tools
  • SOLR Token
    • Token Utility
    • Token Economics
  • Launchpad
    • How does IDO work?
    • Setup Token Whitelist
    • Setup Token Sale (IDO)
  • Developer Tools
    • SolRazr Build
  • SolRazr Technology
    • Token Sale (IDO) Architecture
    • Prevention against DDoS and Bots
    • Scaling Solution
  • FAQ
    • General FAQ
    • Public IDO FAQ
    • Airdrop FAQ
    • Staking & IDO FAQ
Powered by GitBook
On this page
  • Environment Setup
  • Build And Deploy Token Whitelist Program
  • Running JS Client To Create Token Whitelist
  • Using Token Whitelist In Token Sale

Was this helpful?

  1. Launchpad

Setup Token Whitelist

PreviousHow does IDO work?NextSetup Token Sale (IDO)

Last updated 3 years ago

Was this helpful?

Clone the repo from

This repo contains

  • Token Whitelist program

  • JavaScript bindings (using @solana/web3.js)

  • Test client

Environment Setup

  1. Install the latest Rust stable from

  2. Install Solana v1.6.6 or later from

Build And Deploy Token Whitelist Program

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 above

Running JS Client To Create Token Whitelist

You 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.

Using Token Whitelist In Token Sale

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.

In order to run token sale program (), you need token whitelist map to be created.

https://github.com/solrazr-app/token-whitelist
https://rustup.rs/
https://docs.solana.com/cli/install-solana-cli-tools
https://github.com/solrazr-app/solr-token-sale