What's the best way to cap the total number of NFTs in a MultiversX collection?

I’ve been playing around with MultiversX and managed to set up an NFT collection. But now I’m stuck trying to figure out how to put a limit on the total number of NFTs that can be minted for this collection.

The docs mention something about taking away the creation role to stop new NFTs from being made. But that means I’d have to mint all the NFTs right away, which isn’t what I want.

Is there a better way to set a max number when I first set up the collection?

Also, I’m a bit confused about the different token types on MultiversX. Can anyone explain the main differences between EGLD, ESDT, SFT, and NFT? I’m especially curious about SFTs - how does the whole fungible to non-fungible thing work? Can they switch back and forth?

Any help would be awesome. Thanks!

I’ve encountered similar challenges with NFT collections on MultiversX. While removing the creation role is one approach, it’s not ideal for ongoing minting. A more flexible solution is implementing a smart contract to manage the minting process. You can define a maximum supply variable and increment a counter with each mint, automatically halting when the limit is reached.

Regarding token types:
EGLD serves as the network’s native currency.
ESDT tokens function similarly to standard fungible tokens.
NFTs represent unique, non-fungible assets.
SFTs (Semi-Fungible Tokens) combine fungible and non-fungible properties.

SFTs are particularly interesting as they allow for batches of similar items with unique attributes, which can be especially useful for collections with variations or limited editions. Consider if SFTs might suit your project’s needs better than traditional NFTs.

yo isaac, i feel ya on the nft cap struggle. smart contracts r def the way to go for this. u can set a max_supply variable n increment a counter each mint. when it hits the max, boom, no more minting.

for token types, think of it like:
EGLD = network fuel
ESDT = general tokens
NFT = one-of-a-kind
SFT = batch of similar but unique

SFTs r cool cuz they can b both fungibl n non-fungible at once. versatile stuff!

hey isaac31! i’ve been tinkering with multiversx too and ran into similar questions. :thinking:

have you looked into using smart contracts to handle the minting process? that might give you more control over the total number of nfts in your collection. you could set up a counter in the contract to keep track of how many have been minted and stop when it hits your max.

as for the token types, it can get a bit confusing right? from what i understand:

  • EGLD is the native coin of the network
  • ESDT are like standard tokens (think erc-20 on ethereum)
  • NFTs are unique tokens (like erc-721)
  • SFTs are semi-fungible, kinda in between (similar to erc-1155)

the SFT thing is pretty cool - they can have both fungible and non-fungible properties. like, you could have a bunch of identical game items (fungible) but each with a unique serial number (non-fungible).

what kind of project are you working on? sounds interesting! have you considered using SFTs instead of NFTs for your collection?