2

I have been trying to mint an NFT using the native TokenMintTransaction() function, but it keeps returning the MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED error. Since the documentation is terrible I have a hard time finding out what the error actually means.

I used the exact same code as explained in their docs:(https://docs.hedera.com/guides/getting-started/try-examples/create-and-transfer-your-first-nft)

let nftCreate = await new TokenCreateTransaction()
  .setTokenName("diploma")
  .setTokenSymbol("GRAD")
  .setTokenType(TokenType.NonFungibleUnique)
  .setDecimals(0)
  .setInitialSupply(0)
  .setTreasuryAccountId(treasuryId)
  .setSupplyType(TokenSupplyType.Finite)
  .setMaxSupply(250)
  .setSupplyKey(supplyKey)
  .freezeWith(client);

let nftCreateTxSign = await nftCreate.sign(treasuryKey);
let nftCreateSubmit = await nftCreateTxSign.execute(client);
let nftCreateRx = await nftCreateSubmit.getReceipt(client);
let tokenId = nftCreateRx.tokenId;

CID = ["**********************************************"];

let mintTx = await new TokenMintTransaction()
  .setTokenId(tokenId)
  .setMetadata([Buffer.from(CID)])
  .freezeWith(client);

let mintTxSign = await mintTx.sign(supplyKey);
let mintTxSubmit = await mintTxSign.execute(client);
let mintRx = await mintTxSubmit.getReceipt(client);

So what am I doing wrong here?

Nick Parsons
  • 45,728
  • 6
  • 46
  • 64
Nal Luksic
  • 175
  • 6

1 Answers1

0

I seem to have found an answer. Testnet has reached the maximum amount of NFTs that can be minted (5 million). The devs are currently looking into ways to increase this limit.

Nal Luksic
  • 175
  • 6