Automatically Link IPFS CID To Each NFT in Collection

??? The metadata is supposed to be put on the chain, when minting the NFTs, not on IPFS.

What do you mean by “automatically”? Each NFT gets its own block of metadata …

… and in these individual blocks, you usually have the IPFS link with the CID of the individual image, not of the folder.

…, but of course it also works to use the CID of the folder with the path inside that folder, since this is just how folders on IPFS work.

Look for example at one of the minting transactions of SpaceBudz:
https://cardanoscan.io/transaction/12792e4952f5178938967fd6455d10014dcb53772a3c2f8c2fdaaa7eeb2cbe93?tab=metadata

There are a lot of metadata blocks for each of the NFTs minted in that transactions in there and each has a different IPFS link to the specific image for that specific NFT.

You can, of course, use some script in the scripting language of your choice to generate that large metadata file for the minting transaction.

In contrast to that, it has become quite fashionable to mint the NFTs on demand only if there is a user paying for it and then mint it directly to the address of the user.

Totally random example (I’m not at all into CNFTs, don’t know which count as good and which as bad projects there): This project says: “Send us some ADA and we will mint an NFT directly to your address.”
https://twitter.com/Cyberdemons1/status/1619123134921330689
So, this transaction https://cardanoscan.io/transaction/f9f1a0621cb70dd5afc3b570085e62521fe6539487151b065d5c8f7a9d1fd230 sending 45 ADA to that address is answered by this transaction https://cardanoscan.io/transaction/cee8fb5b1b9fca94a6fd4be51322fdd46b6ac090030e8dfc9ab4fe1b54d7969f a minute later, minting the NFT directly into the user’s address.

For this to work, the users have to trust you that you will keep your part of the deal, you have to have a script running somewhere that monitors your payment address and answers with minting transactions. And you have to prepare the metadata for each of these minting transactions beforehand. You can again use a script in a language of your choice to prepare those files with the individual links for each of your NFTs.

Another, even more professional way, is to mint using a dApp connection to a wallet and doing it in one transaction, where the user pays and you mint the NFT to their address at the same time. If you don’t want to learn how to program that on your own, there are several providers of more or less fancy solutions out there.

Again, totally random example: CardanoPunks can be minted on jpg.store: https://www.jpg.store/collection/cardanopunks?tab=minting
If I click through it, my Eternl asks me to sign a transaction, where I would pay and get the NFT in the very same moment:
screenshot-2023-01-29-04:35:00
Again, you’d have to provide individual metadata for the collection beforehand. Really don’t know how jpg.store and other such servcies – NMKR, Anvil, … – want that, how much assistance they give you in preparing that.

Of course, you could also write such a dApp yourself and make it more individual, fancy, tailored to your project.

1 Like