There is already a official documentation existing in the Metaplex docs. Nevertheless I want to extend them a little bit to show you my experiences and elaborate a bit.
Gumdrop can be used to create a candy machine whitelist, do airdrops of prints, distribute tokens… and for sure much more as soon as we get creative! Big thanks to Larry Wu for creating it!
Initially I was focusing on the candy machine whitelist here but already extended the document for token and edition drops.
Follow me on Twitter
Have a look at
First things first:
cd js
)yarn install
that's it.
To claim a gumdrop a frontend website is needed. Currently Larry Wu from Solana is hosting one. I think it's fine to use for testing, but no guarantee how long it will be up!
For your real gumdrop I would recommend your own gumdrop page. For that…
cd metaplex/js/packages/gumdrop
)yarn serve
yarn build
will be needed for sure. You can find some information for setting up vercel in the FAQ.Depending on what to claim (SPL token, print) you either need to do different preparations (e.g. create SPL tokens, create edition mints).
Depending on what you want to give out do one of the following two options:
solana config set --keypair <path to your keypair> --url devnet
spl-token create-token --decimals 0
and note the mint!spl-token create-account <mint>
spl-token mint <mint> <amount>
First you need to understand that the users will receive a personal URL that they will need to use to claim their gumdrop.
You can send out your whitelist access through Email, SMS (both based on AWS) or Discord. SMS and E-Mail can also be combined with OTP to make sure that the airdrop / whitelist NFT goes to the right person. If you choose "wallets" as distribution methods you will have to inform your users manually, but their wallet will be verified on mint.
You can also add wallets or even a manual identifier, but in that case you need to distribute the links to claim the drop yourself.
Method | Pro | Con | Comment |
---|---|---|---|
manual | none? | -manual URL distribution -no validation of minting user |
For debugging or testing. |
wallets | -validation of the minting wallet | -manual URL distribution | |
Discord | -Most of us are already using Discord | -distribution often fails. -DMs can look and fele like spam. -Someone will scam users sooner or later with fake gumdrop DMs |
Instead of using the inbuild function you can create other methods. See FAQ. |
-OTP possible | -only via AWS -you need to collect the addresses |
||
SMS | -OTP possible | -only via AWS -you need to collect the addresses |
Format of the distribution list is the following (stolen from the Metaplex docs).
[
{
"handle": "<DISTRIBUTION-METHOD-SPECIFIC-HANDLE>",
"amount": <GUMDROP-CLAIM-ALLOWANCE>,
["edition": <EDITION-NUMBER>]
},
...]
where
There is only one command. But I will break it down a bit.
The beginning is always the same. You will always need the following, but do NOT run it yet. We will add more parameters to the command in the next steps.
ts-node gumdrop-cli.ts create -e devnet --keypair <keypair location> --distribution-list <path to your distribution list JSON>`
Depending on what to claim (NFT from candy, token, print) you either need to add different parameters. Choose one of those:
You should already have created your Master edition and noted down the mint. Therefore you only need to add this to your command:
--claim-integration edition --edition-mint <mint of master edition>
Further information on edition prints with Meta Gumdrop
You should already have created your Master edition and noted down the mint. Therefore you only need to add this to your command:
--claim-integration transfer --transfer-mint <mint>
You can find more information on token drops in the official documentation.
If you want to use your own frontend you need to use the –host parameter. Keep in mind that the standard host might not be up forever!
--host "https://lwus.github.io/metaplex"
Using E-Mails can make sense. I hate SMS. And love Discord. That's why I show you the discord example.
This function is bugged. Not everyone will receive a DM with it's custom link.
DM me and we will set up a bot for you which will work.
For Discord you will need to:
--distribution-method discord --discord-token "<your discord token>" --otp-auth none --discord-guild <guild id>
More on Mails/SMS through AWS here.
You should now have your command together. Just run it.
I've also collected some examples of whole commands for you to compare.
Excecuting the create command creates a new keypair json in the .log folder. SAVE IT. YOU NEED IT!
Time's up? Alright. Again there are different things to consider depending on what can be claimed. You need this everytime:
ts-node gumdrop-cli.ts close -e devnet --base <keypair that was created on gumdrop create> --keypair <your initial keypair>
Wondering where to find the base keypair? Have a look into the .log folder.
For edition prints the close command would look like
ts-node gumdrop-cli.ts close -e devnet --base <keypair that was created on gumdrop create> --keypair <your initial keypair> --claim-integration edition ---edition-mint <mint of master edition>
ts-node gumdrop-cli.ts close -e mainnet-beta --base <keypair that was created on gumdrop create> --keypair <your initial keypair> --claim-integration transfer --transfer-mint <mint>
This guide was somehow hard to follow?
Don't worry. Here are all the commands you need:
ts-node gumdrop-cli.ts create -e devnet --keypair <keypair location> --distribution-list <path to your distribution list JSON> --claim-integration edition --edition-mint <mint> --distribution-method discord --discord-token <TOKEN> --otp-auth none --discord-guild <guild id>
ts-node gumdrop-cli.ts close -e devnet --base <keypair that was created on gumdrop create> --keypair <your initial keypair> --claim-integration edition ---edition-mint <mint of master edition>
ts-node gumdrop-cli.ts create -e devnet --keypair <keypair location> --distribution-list <path to your distribution list JSON> --claim-integration transfer --transfer-mint <mint> --distribution-method discord --discord-token <TOKEN> --otp-auth none --discord-guild <guild id>
ts-node gumdrop-cli.ts close -e devnet --base <keypair that was created on gumdrop create> --keypair <your initial keypair> --claim-integration transfer --transfer-mint <mint>
The Discord integration has some minor caveats. E.g.
Currently only works with AWS.
Using gumdrop you will (currently) not have the update authority over your NFTs minted through candy machine anymore. So if you want to update them later on you should not use gumdrop for now. See Github Issue.
The minting fees will be paid by your user. You only pay the costs for setting up the gumdrop. In my tests it was 0.00163168 SOL for a 450 Wallet drop.
I did it on cloudflare pages, but if you want to host on vercel the following screenshot might be helpful for you.
If you receive a white page as a result it might make sense to have a look at the package.json
and remove the line where the homepage is defined.
Possible. And I already used it in mainnet-beta twice. But(!) the included implementation has caveats:
From my point of view the best solution is to use "wallets" as distribution method to have user validation and collect the wallets and send the URLs yourself. To make it easier and better I've created a Discord bot where the users can register their wallet and later claim there gumdrop claim link.
DM me if you are interested in using this bot!
I am sure together we can work it out for you.
Make sure that the UUID is correct. You can find the correct one in the cache file. It should be exactly 6 characters long.
js/packages/common
yarn install
yarn build
Most likely you are doing an SPL token drop and your token has decimals, right? You encountered a gumdrop bug! Solution:
metaplex/js/packages/cli/src/helpers/gumdrop/claimant.ts
and remove these three lines (Currently starting at line 205):if (new BN(creatorTokenInfo.amount, 8, 'le').toNumber() < totalClaim) {
throw new Error(`Creator token account does not have enough tokens`);
}