Hello, 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 detailsOption 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:
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
Hello, folks, I've been struggling a bit in order to understand what's the difference between
set_and_verify_collection
andverify_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
andcollection_metadata
(which takes*ctx.accounts.collection_metadata.key
) accounts. So, probably thecollection_metadata
refers to the NFT created with bycreate_metadata_accounts_v3
, whosedetails
parameter isSome(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 adetails
Option
other thanNone
? And, the most important, how do I derive it's address? Rn, I'm passing the collection metadata derived access like that:Last but not least, I've noticed that both
set_and_verify_collection
andverify_collection
both acceptcollection_authority_record
, should I derive another PDA just for that, or settingSome(ctx.accounts.signer.key())
will suffice?I'm using
anchor_spl
0.28, which depends onmpl-token-metadata
^1.11Thanks in advance