Solana: get NFT supply cap?

435 views Asked by At

How can I be sure a token will not be minted anymore?

In this tutorial we can see a maxSupply specified. How do I retrieve this value give a mint address?

https://solanacookbook.com/references/nfts.html#mint-the-nft

  await actions.mintNFT({
    connection,
    wallet: new NodeWallet(keypair),
    uri: 'https://34c7ef24f4v2aejh75xhxy5z6ars4xv47gpsdrei6fiowptk2nqq.arweave.net/3wXyF1wvK6ARJ_9ue-O58CMuXrz5nyHEiPFQ6z5q02E',
    maxSupply: 1
  });
1

There are 1 answers

2
technotechkid On

I believe the next step would be the following ->

await setAuthority(
  connection,
  fromWallet,            // Payer of the transaction fees
  mint,                  // Account 
  fromWallet.publicKey,  // Current authority 
  0,                     // Authority type: "0" represents Mint Tokens 
  null                   // Setting the new Authority to null
);

The setAuthority function will revoke minting privileges and ensure that you can not create additional tokens of this type. Note that this action cannot be undone.

resource: https://www.quicknode.com/guides/web3-sdks/how-to-mint-an-nft-on-solana , https://spl.solana.com/token#:~:text=ThawAccount%20instruction.%20The-,SetAuthority%20instruction,-can%20be%20used