0

I would like to create a collection and then add nft to it. The code I use:

 const a = (
    await metaplex
      .nfts()
      .create({
        name: "My off-chain name",
        uri: "https://arweave.net/y5e5DJsiwH0s_ayfMwYk-SnrZtVZzHLQDSTZ5dNRUHA",
        sellerFeeBasisPoints: 250,
        isCollection: true,
      })
      .run()
  ).nft;

  const { nft } = await metaplex
    .nfts()
    .create({
      name: "My off-chain name",
      uri: "https://metadata.degods.com/g/9999.json",
      sellerFeeBasisPoints: 250,
      collection: findMetadataPda(a.mint.address),
    })
    .run();

  await metaplex.nfts().verifyCollection({
    mintAddress: nft.mint.address,
    collectionMintAddress: a.mint.address,
  });

the problem is that the above code snippet creates 2 separate nft but I would like the first nft to be the nft collection

1
  • Did you manage to solve this? I think the new nft is not getting verified collection as part of the collection. And the docs also mention that there should be boolean property named Verified set to true. I could not figure out how to make it successful.
    – JohnVersus
    Commented Sep 11, 2022 at 14:31

1 Answer 1

1

What you're experiencing is correct.

A collection points to parent/collection NFT that is created and referenced to.

Your entire collection should point to the collection NFT you created.

For more information about MCC collections on Solana you can check out the Metaplex site below :)

https://docs.metaplex.com/programs/token-metadata/certified-collections#collection-nfts

1
  • Oh thanks, i saw this site but idk why these tokens are not linked on explorer.solana.com (collection name do not appear on scanner) Collection: BMvGhd5ng6PCun7qY9gYRw91VetgmMponKz8EsDdKhbJ someNft: F7b2yg8KrAHFCNaFvoLjK8bUaZR4RVgzii5Xt8hy79c6
    – pu0238
    Commented Aug 31, 2022 at 21:47

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.