solanasolana-web3jsmetaplexcandy-machine

How to generate and mint the same NFT gif multiple times?


I am currently working on a Solana project where there are 4 different gifs (mp4) and I would like to turn one of them into a collection of 1500 NFTs, the second into 500, the third into 190 and the forth into 10.

This will result in a total collection of 2200 NFTs each with their corresponding metadata (json) files that I can then use on the Candy Machine.

How should I do this?


Solution

  • For 1 mp4 in the candy machine the easiest solution would be to use hiddensettings.

    Since you have more than one I would propose to

    1. create a asset folder where only these four assets + json files are inside (+placeholder png image for each)
    2. Run the candy machine upload (This will upload all Assets and metadata it can find which is only 4)
    3. Open the cache file (in the .cache folder) and have a look at the items{} array. This is what you will have to modify now. Duplicate each item as often as needed. Make sure that onChain is false and each line you add gets a new index. For the index the easiest no code solution is to use excel and get a bit creative with it.
    4. After the cache file modification is done just run upload again to have the config lines written.

    If you want to use mp4 you should have animation_url in your metadata and additionally a png as image for wallets/services which don’t support mp4. The process above is the same though. For more info about this check the metaplex token metadata standard