This is how to create a whitelist with candymachine v2. The metaplex guides are already quite extensive, but here is a step by step guide.
With candy machine v2 you do not add wallets to a whitelist. Instead a token is used to verify that a minting wallet is whitelisted. You will need to create one and send it to your users (or have them mint it with gumdrop).
Let's go!
solana config set --keypair <path to your keypair> --url devnet
spl-token create-token --decimals 0
and note the mint. MAKE SURE TO USE DECIMALS 0!spl-token create-account <mint>
spl-token mint <mint> <amount>
You have different possibilities to give the SPL token to your users and you need to decide how.
Depending on the size of your whitelist airdropping can come with heavy costs. An alternative to airdropping could be to use Gumdrop - Notes from the office hours
Amount of wallets | Airdrop | Gumdrop |
---|---|---|
1 | 0.00204428 SOL | 0.014 SOL |
100 | 0.204428 SOL | 0.015 SOL |
1000 | 2.04428 SOL | 0.016 SOL |
Now that this is clear. How to do it?
Either write a quick bash script or use one of the existing tools like
Short tutorial:
-urls-
in it's name in a subfolder called .log
. This is where you have all links for your users inside to "claim" their gumdrop. You need to distribute those e.g. with a discord bot. (DM me.)More information on Gumdrop can be found in the official docs
Set up your candy machine v2 as normal and add your token mint into the whitelist. The Docs are already quite extensive with different examples.
Nevertheless here is one example config.json
When using whitelist you can not use the gatekeeper at the same time. Disabling it for the private mint is not an issue since validation is done through the SPL token. Nevertheless you should enable it again before the public mint to avoid botters
Everyone holding the token will now be able to mint from your candy machine before the go live date.