folks, I've been struggling a bit in order to understand what's the difference between set_and_verify_collection and verify_collection. As per what I (believe I could) understand, the first one sets a regular NFT as a MPL collection, while the second one only verifies it.

I've noticed a few things, though.

In both methods, I've seen that the instruction needs both metadata and collection_metadata (which takes *ctx.accounts.collection_metadata.key ) accounts. So, probably the collection_metadata refers to the NFT created with by create_metadata_accounts_v3, whose details parameter is Some(CollectionDetails::V1 { size: 10 }), for instance. Now, the metadata refers to what, specifically? Should I create a new metadata account in order to provide that data? If so, should it be mutable? Should it also provide a details Option other than None? And, the most important, how do I derive it's address? Rn, I'm passing the collection metadata derived access like that:

 const collectionMetadataAddress = findMetadataPda(umi, {
      mint: publicKey(collectionMintKeypair.publicKey)

Last but not least, I've noticed that both set_and_verify_collection and verify_collection both accept collection_authority_record, should I derive another PDA just for that, or setting Some(ctx.accounts.signer.key()) will suffice?

I'm using anchor_spl 0.28, which depends on mpl-token-metadata ^1.11

Thanks in advance

1 Answer 1


According to the code at https://github.com/metaplex-foundation/mpl-token-metadata/blob/87af91762ff056a1dc7ccba84be06cea2491510b/programs/token-metadata/program/src/instruction/collection.rs#L90:

Allows the same Update Authority (Or Delegated Authority) on an NFT and Collection to perform update_metadata_accounts_v2 with collection and [verify_collection] on the NFT/Collection in one instruction.

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.