Creating A Whitelist Token With Candy Machine V2

Phase 1: Setting up your environment

sh -c "$(curl -sSfL https://release.solana.com/v1.9.5/install)"
solana --version
curl https://release.solana.com/v1.9.5/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs
C:\solana-install-tmp\solana-install-init.exe v1.9.5
solana --version

Phase 2: Creating your token

$ cargo install spl-token-cli
$ solana config set --url //cluster url
solana-keygen new --outfile {$folder}/keypair-name.json
solana config set --keypair <your keypair>
solana-keygen verify <your keypair> keypair-name.json
solana airdrop 10 <your keypair> --url https://devnet.solana.com
spl-token create-token
spl-token create-account <your token identifier>
spl-token mint <your token identifier> <number of tokens>

Phase 3: Creating your whitelist settings.

git clone -b v1.1.1 https://github.com/metaplex-foundation/metaplex.git ~/metaplex
yarn install --cwd ~/metaplex/js/
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts --version
~\metaplex\js\packages\cli\config.json
{
"price": 1.0,
"number": 10,
"gatekeeper": null,
"solTreasuryAccount": "<YOUR WALLET ADDRESS>",
"splTokenAccount": null,
"splToken": null,
"goLiveDate": "25 Dec 2021 00:00:00 GMT",
"endSettings": null,
"whitelistMintSettings": null,
"hiddenSettings": null,
"storage": "arweave-sol",
"ipfsInfuraProjectId": null,
"ipfsInfuraSecret": null,
"awsS3Bucket": null,
"noRetainAuthority": false,
"noMutable": false
}
  • Price: The price of your collection/token. If you don’t intend to use the whitelist token for presale privileges, you can put 0.
  • Number: This is the number of items in your assets folder.
  • Gatekeeper: This is a captcha developed to reduce bots. To activate this, change this aspect to:
"gatekeeper": {
"gatekeeperNetwork" : "ignREusXmGrscGNUesoU9mxfds9AiYTezUKex2PsZV6",
"expireOnUse" : true
}
  • SolTreasuryAccount: The account you intend to use for receiving payment in SOL.
  • SplTokenAccount: This is the account that receives proceeds for the spl-token sale — that is if you want to sell them.
  • SplToken: This is the mint address of the token that will be used as a means of payment.
  • GoLiveDate: This is the date you intend for your collection to go live.
  • WhitelistMintSettings: This is where you configure everything concerning your whitelisting token:
"whitelistMintSettings": {
"mode" : { "burnEveryTime": true },
"mint" : <your token unique id>
"presale" : true,
"discountPrice" : null
}
"mode" : { "neverBurn": true },
  1. Allows the creation of larger drops since the metadata is not stored on-chain.
  2. Allows for the creation of hide-and-reveal drops, where users discover which item(s) they minted after the mint is complete.
"hiddenSettings": {
"name":"My Hidden Collection ",
"uri":"uri",
"hash":"44kiGWWsSgdqPMvmqYgTS78Mx2BKCWzd"
}
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload -e devnet -k ~/.config/solana/devnet.json -cp ~\metaplex\js\packages\cli\config.json -c example ~\metaplex\js\packages\cli\assets

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nwosu Rosemary

Nwosu Rosemary

Data Scientist || Machine Learning enthusiast and hobbyist