Candy Machine V2 FAQ
March 10th, 2022
tags: faq, solana, metaplex, candy machine

Consider getting one of my NFTs https://vol2.shapes.ltd/ :)

If you have any trouble with Candy Machine deployment, Frontend, Whitelist, reveals, reach out on Twitter @halaprix

d
d

Questions

0. Debug with the tool.

1. I need a frontend for my candy machine

React:

Material-UI v4
Material-UI v4

Svelte:

2. What should I do if my upload fails?

Usually you just have to rerun the upload.

3. What upload method should I use ?

arwaeve is the most stable one so far and it works on both mainnet-beta and devnet.

4. I get 429 errors, what to do?

You should use a private RPC or one of the available ones https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ for devnet, or
https://ssc-dao.genesysgo.net/ for Mainnet

5. My NFTs are mintend in random order?!

It's a feature not a bug. You can' change it - they will always be minted in random order.

6. I get the signatureUnsubscribe error: Invalid subscription id. error, what to do?

Nothing - let's call it a light error and treat it as a warning.

7. I can't use mint_one_token or mint_multiple_tokens from CLI!

Check if:

  • captcha is on (you get Error: Transaction failed: Custom program error: 0x1783)

8. Are there any restrictions in the JSON files ?

Yes, a few:

  • name max 31 chars more info here
  • symbol max 10 chars no spaces
  • max 4 creators
  • creators shares must add up to 100

9. I need to update my existing NFTs, what can I do?

!!! Your CM can't be withdrawn for the Metaplex CLI method to work! :::

  • you can use metaboss, there are plenty of options:
    • update metadata of single NFT metaboss update data --keypair <PATH_TO_KEYPAIR> --account <MINT_ACCOUNT> --new-data-file <PATH_TO_NEW_DATA_FILE>
    • update metadata of multiple NFTs metaboss update data-all --keypair <PATH_TO_KEYPAIR> --data-dir <PATH_TO_DATA_DIR>
    • update only URI of single NFT metaboss update uri --keypair <PATH_TO_KEYPAIR> --account <MINT_ACCOUNT> --new-uri <NEW_URI>
    • update only URI of multiple NFTs metaboss update uri-all --keypair <PATH_TO_KEYPAIR> --json-file <PATH_TO_JSON_FILE>
    • you can use the same Metaplex CLI you used to upload the Candy machine:
      ts-node candy-machine-v2-cli.ts update_existing_nfts_from_latest_cache_file -e devnet -k <path to keyfile> -cp <path to config.json> -c <cache file name> -nc <new cache file name> where the new cache file includes updated links. This method updates URIs only!

10. How much will it cost me ?

Your fee is a sum of two ingredients: Solana rent and Arweave upload fee:

  • RENT - On average you will pay 0.016SOL per NFT, so 1.6SOL per 1000 and 16 SOL per 10k. This can be withdrawn after the CM is fully minted ( or before, but the CM will stop working)
  • Arweave upload fee can be calculated here. At the moment of writing it's 7$ per GB.
  • If you are using IPFS - the upload is free, you need to provide the keys to the pinning service.

11. How should I number my assets?

REMEMBER #1 First asset pair is 0.json and 0.png - not 1.json and 1.png.

REMEMBER #2 in your 0.json the name of the NFT should be Name #1 not Name #0

12. My upload failed but I have been charged XX SOL, what to do?

If your upload command failed, but charged you a fee (CM has been created, but not written to cache - no files in ./cache or there is no program segment in the file) - use withdraw:
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts withdraw -e devnet -k <path to keyfile>
You can add--dry at the end of the command to check the amount and don't withdraw it.

If you are getting timeouts try using metaboss:
metaboss withdraw cm-v2 <CANDY_MACHINE_ID> -k <PATH_TO_KEYPAIR>

13. I need to create the hash list!

You can create the list of NFT mint addresses only after the mint has finished - you can create it during the mint, but it will be only partial.

  • use metaboss:
    metaboss snapshot mints --candy-machine-id <CANDY_MACHINE_ID> --v2 --output <OUTPUT_DIR>
  • use Metaplex CLI:
    ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts get_all_mint_addresses -e devnet -k <path to keyfile> -c <cache file suffix>

14. What is the contract address for the collection?

No it's not like Solidity. Each NFT has a different address.

15. How do I modify the frontend?

Most of the frontend work is done in React -> https://www.codecademy.com/learn/react-101 -> still won't work ? Then you can ask 🙂

Feel free to contact me if you need to have it done.

@halaprix my DMs are open!

16. Are there any limits to the image size?

For arweave storage method, the image size must be at least 25kB and less than 10Mb. For arweave-sol the upper limit is 100Mb.

17. I need to airdrop my WL token, how?

You can use one of the community created scripts, that can be found on the Metaplex Discord server.

Feel free to contact me if you need to airdrop WL token, project tokens, SOL etc.
my DMs are open!

18. The Candy machine is not burning my WL tokens!

Your WL token has to have 0 decimals, if not only a decimal part will be burnt during the mint and not "entire" token. This is how it should be created:

spl-token create-token --decimals 0
spl-token create-account [token address]
spl-token mint [token address] 10

19. My mint interface is not working, the button is disabled.

Don't use https://api.mainnet-beta.solana.com/ => https://docs.metaplex.com/community#rpc.

You can use :
https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899/ for Devnet, or

https://ssc-dao.genesysgo.net/ for Mainnet

20. I need to know all available commands, right now!

Use ts-node \metaplex\js\packages\cli\src\candy-machine-v2-cli.ts help

21. I can't withdraw my Candy machine .

If you are getting timeouts try using metaboss:
metaboss withdraw cm-v2 <CANDY_MACHINE_ID> -k <PATH_TO_KEYPAIR>

22. I want to make a reveal.

You can use update_existing_nfts_from_latest_cache_file for the reveal or all Metaboss methods mentioned earlier.

23. What the hell is wrong with the -c parameter?

The -c parameter is used to set the cache name. If you use -c final and -e mainnet-beta - the name of your cache file will be ./cache/mainnet-beta-final.json

24. Phantom is grouping my NFTs in a peculiar way?!

25. Is there any additional fee/ can I mint for free as authority?

For each mint there is an additional fee (on top of the price) ~0.02SOL - it is the fee for the account that will hold your NFT. Even if you are the autority, you will pay this fee as it is Solana blockchain related (not conencted with CM).

26. Read the freaking docs! :)

27. Where are the generative art commands?

They were depreciated in the main Metplex repository, you can find them here https://github.com/halaprix/simple-NFT-generator

28. Most common whitelist set up.

  1. Create the WL token in terminal:
spl-token create-token --decimals 0
# you will receive the token address - use it in the next commands
spl-token create-account [token address]
# 10 is an examplary amount of tokens to mint - use whatever you need
spl-token mint [token address] 10
  1. In your config.json replace "whitelistMintSettings": null, with:
"whitelistMintSettings": {
    "mode" : { "burnEveryTime": true },
    "mint" : "7nE1GmnMmDKiycFkpHF7mKtxt356FQzVonZqBWsTWZNf",
    "presale" : true,
    "discountPrice" : 0.5
}

where:

  • mint is the token address from step 1.
  • discountPrice is the price for whitelist token holders
  • presale defines if WL token holders can mint before the public sale (goLiveDate)
  • "burnEveryTime": true - is the default setting where with eachminted NFT one WL token will be burnt in the user wallet. Alternatively you can replace it with “neverBurn” : true to allow multiple mints with one WL token

Error list

1770 => IncorrectOwner: Account does not have correct owner!
1771 => Uninitialized: Account is not initialized!
1772 => MintMismatch: Mint Mismatch!
1773 => IndexGreaterThanLength: Index greater than length!
1774 => NumericalOverflowError: Numerical overflow error!
1775 => TooManyCreators: Can only provide up to 4 creators to candy machine (because candy machine is one)!
1776 => UuidMustBeExactly6Length: Uuid must be exactly of 6 length
1777 => NotEnoughTokens: Not enough tokens to pay for this minting
1778 => NotEnoughSOL: Not enough SOL to pay for this minting
1779 => TokenTransferFailed: Token transfer failed
177A => CandyMachineEmpty: Candy machine is empty!
177B => CandyMachineNotLive: Candy machine is not live!
177C => HiddenSettingsConfigsDoNotHaveConfigLines: Configs that are using hidden uris do not have config lines they have a single hash representing hashed order
177D => CannotChangeNumberOfLines: Cannot change number of lines unless is a hidden config
177E => DerivedKeyInvalid: Derived key invalid
177F => PublicKeyMismatch: Public key mismatch
1780 => NoWhitelistToken: No whitelist token present
1781 => TokenBurnFailed: Token burn failed
1782 => GatewayAppMissing: Missing gateway app when required
1783 => GatewayTokenMissing: Missing gateway token when required
1784 => GatewayTokenExpireTimeInvalid: Invalid gateway token expire time
1785 => NetworkExpireFeatureMissing: Missing gateway network expire feature when required
1786 => CannotFindUsableConfigLine: Unable to find an unused config line near your random number index
1787 => InvalidString: Invalid string
1788 => SuspiciousTransaction: Suspicious transaction detected
1789 => CannotSwitchToHiddenSettings: Cannot Switch to Hidden Settings after items available is greater than 0

Subscribe to halaprix
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.
More from halaprix

Skeleton

Skeleton

Skeleton