Closed saberistic closed 7 months ago
Having a max supply of 0
is one of the pre-requisites to be a master edition account – and ultimately a collection – similar to the other conditions that need to be satisfied on the function. The error is the same since it will only happen when an "invalid" master edition account is used.
Understood, it could save me hours if those errors were slightly different. I could immediately figure what is wrong rather than debugging manually figuring which condition is not satisfied. Thanks for great work.
Agree with your point, perhaps we can make sure the documentation is clear on the "constraints" that are validated by the program. There is a bit of a balance between the granularity of the errors, e.g., we could create errors for every single validation or we can have more "generic" error with better documentation.
Team, today I while working on verifying a collection I was logging an error on cluster saying
Collection must be a unique Master Edition
. So naturally started fiddling withcollection_master_edition
account ofVerifySizedCollectionItem
function but no bono!Further debugging I figured problem was supply being set to
None
instead ofSome(0)
and hence the following line was being triggered: https://github.com/metaplex-foundation/mpl-token-metadata/blob/main/programs/token-metadata/program/src/assertions/collection.rs#L145-L147But what I am puzzling with is why the name of the error is the same for all other exceptions in this function? Does this supply mismatch deserve its own error?