1

My question is similar to this one Link. I don't see any satisfactory answer on that question?. Is there a method to fetch all the nfts minted by a particular smart contract?

1 Answer 1

1

You can have the NFTs (mints) as a PDA. then use getProgramAccounts to get the PDAs that have a data size of 82 bytes (mint size)

This will return all mint PDAs derived from your program.

2
  • I did not understand having NFTs as PDA.. can u pls explain a little more..?
    – Lobo1897
    Commented Aug 9, 2022 at 14:55
  • memcmp: { offset: 8, bytes: creator.publicKey.toBase58(), } can i add something like this to fetch nfts of specific publickey?
    – Lobo1897
    Commented Aug 10, 2022 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.