Mark Sackerberg
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
5
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Gumdrop - Notes from the office hours There is already a official documentation existing in the [Metaplex docs](https://docs.metaplex.com/airdrops/create-gumdrop). Nevertheless I want to extend them a little bit to show you my experiences and elaborate a bit. ## What is Gumdrop? 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. :::success Follow me on Twitter :bird:[@MarkSackerberg](https://twitter.com/MarkSackerberg) if you like my work. You can also DM me or :bird:[@9HOMIES](https://twitter.com/ninehomies) if you want to work together! ::: :::info Have a look at :bird:[SolSlimes](https://twitter.com/SolSlimesNFT) to see more of my work! ::: ## :memo: How to install? ### Clone & install Metaplex First things first: 1. clone metaplex from [github](https://github.com/metaplex-foundation/metaplex). Make sure that you have the current verison if you already have metaplex locally. 2. go into js folder (`cd js`) 3. run `yarn install` that's it. ### Host the frontend To claim a gumdrop a frontend website is needed. Currently Larry Wu from Solana is [hosting one](https://lwus.github.io/metaplex/claim). 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... 1. go into the gumdrop folder (`cd metaplex/js/packages/gumdrop`) 2. Do design changes as you like 3. run `yarn serve` 5. Serve the frontend whereever you like. (Cloudflare pages, vercel...) Ho to differs for each hoster so i will not go into details here, but `yarn build` will be needed for sure. You can find some information for setting up vercel in the FAQ. ## How to use? ### Step 1: Decide what can be claimed. Depending on what to claim (SPL token, print) you either need to do different preparations (e.g. create SPL tokens, create edition mints). ### Step 2: Prepare your drops Depending on what you want to give out do one of the following two options: #### Edition prints 1. You need a Master edition of the NFT you want to print copies of. You could create one on [NFTArmory](https://www.nftarmory.me/mint). 2. Note down the Mint of your master edition #### SPL Token 1. Install the Solana CLI [like this](https://docs.solana.com/cli/install-solana-cli-tools) 2. Set the keypair and environment `solana config set --keypair <path to your keypair> --url devnet` 3. Create your token `spl-token create-token --decimals 0` and note the mint! 4. Create a token account `spl-token create-account <mint>` 5. Mint as many tokens as you want to airdrop `spl-token mint <mint> <amount>` ### Step 3: Distribution List 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 <br> -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. <br> -DMs can look and fele like spam. <br> -Someone will scam users sooner or later with fake gumdrop DMs | Instead of using the inbuild function you can create other methods. See [FAQ](https://hackmd.io/6yf_s3p9T0OIUIgH3j_XRQ?both#4-Discord-as-distribution-method). | **email** | -[OTP](https://en.wikipedia.org/wiki/One-time_password) possible| -only via AWS<br>-you need to collect the addresses | **SMS** | -[OTP](https://en.wikipedia.org/wiki/One-time_password) possible| -only via AWS<br>-you need to collect the addresses Format of the distribution list is the following (stolen from the [Metaplex docs](https://docs.metaplex.com/airdrops/create-gumdrop#whitelist)). ``` [ { "handle": "<DISTRIBUTION-METHOD-SPECIFIC-HANDLE>", "amount": <GUMDROP-CLAIM-ALLOWANCE>, ["edition": <EDITION-NUMBER>] }, ...] ``` where - handle is the E-Mail address, Phone number or discord user id. (Again, more information in the [Metaplex docs](https://docs.metaplex.com/airdrops/create-gumdrop#whitelist)) - amount is the number of tokens / mints the user can get - edition is the number of the edition for the user. This is optional. NOT REQUIRED FOR CANDY MACHINE WHITELIST/ SPL TOKENS. ### Step 4: Create the gumdrop 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.** ```bash ts-node gumdrop-cli.ts create -e devnet --keypair <keypair location> --distribution-list <path to your distribution list JSON>` ``` #### What will be claimed? Depending on what to claim (NFT from candy, token, print) you either need to add different parameters. Choose one of those: ##### edition prints 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](https://docs.metaplex.com/airdrops/create-gumdrop#edition-prints) with Meta Gumdrop ##### SPL token drops 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](https://docs.metaplex.com/airdrops/create-gumdrop#token-airdrop) in the official documentation. #### Add your frontend 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"` #### Distribution method Using E-Mails can make sense. I hate SMS. And love Discord. That's why I show you the discord example. ##### Discord :::success 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: 1. get a bot token in the [Discord Developer Portal](https://discord.com/developers/applications). (Discord.js describes quite well how to [create a bot](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot)) 2. You should invite the bot into the Discord server where all your users are in. Again discord.js describes quite well [how to](https://discordjs.guide/preparations/adding-your-bot-to-servers.html#bot-invite-links) 3. let's extend our command. Add ``` --distribution-method discord --discord-token "<your discord token>" --otp-auth none --discord-guild <guild id> ``` ##### Email & SMS More on Mails/SMS through AWS [here](https://docs.metaplex.com/airdrops/create-gumdrop#distribution-method). #### Build your command You should now have your command together. Just run it. I've also collected some [examples](#Collection-of-whole-commands) of whole commands for you to compare. :::warning Excecuting the create command creates a new keypair json in the .log folder. SAVE IT. YOU NEED IT! ::: ### Close the gumdrop again! 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. #### Editions 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> ``` #### SPL Token ``` 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> ``` # Collection of whole commands This guide was somehow hard to follow? :sweat_smile: Don't worry. Here are all the commands you need: ### Edition prints 1. create gumdrop ``` 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> ``` 2. close gumdrop ``` 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> ``` ### Tokens 1. create gumdrop ``` 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> ``` 2. close gumdrop ``` 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> ``` # Caveats ## Discord The Discord integration has some minor caveats. E.g. 1. Links are send out via DM. (can bring some scam risk) 2. Not all DMs are send out all the time. (e.g. if someone only allows to receive DMs send by friends) 3. No OTP. ## E-Mail / SMS Currently only works with AWS. ## Update Authority 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](https://github.com/metaplex-foundation/metaplex/issues/1137). # FAQ ## 1. What does Gumdrop cost? 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. ## 2. How to host the frontend? 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. ![Vercel build settings](https://i.imgur.com/dCCGiRj.png) ## 3. Discord as distribution method? Possible. And I already used it in mainnet-beta twice. But(!) the included implementation has caveats: * many users don't allow DMs of users they are not friends with * often even fails to send DMs at some point (errors out) * DMs can be confused with spam * The more DMs we send with gumdrop the bigger the chance that scammers will do the same ### How to solve that? 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. :::info [DM me](https://twitter.com/MarkSackerberg) if you are interested in using this bot! I am sure together we can work it out for you. ::: ## Common errors ### TypeError: Max seed length exceeded Make sure that the UUID is correct. You can find the correct one in the cache file. It should be exactly 6 characters long. ### Module not found: Can't resolve '@oyster/common 1. Go to `js/packages/common` 2. run `yarn install` 3. run `yarn build` ### Error: Number can only safely store up to 53 bits Most likely you are doing an SPL token drop and your token has decimals, right? You encountered a gumdrop bug! Solution: 1. Check that you have enough tokens to drop in your wallet 2. Go into `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`); } ``` 3. Make sure that you calculate the amount for the distribution file like this: amount * 10^decimals you should now be able to create the gumdrop.

Import from clipboard

Paste your webpage below. It will be converted to Markdown.

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully