-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding verify_collection
, unverify_collection
, and set_and_verify_collection
to Bubblegum
#687
Conversation
verify_collection
and unverify_collection
to Bubblegum
caff926
to
80a2a90
Compare
Workflow |
- Same functionality as token-metadata versions of these functions. - Uses some existing assertion functions from token-metadata. - Adding new `BubblegumError` variants. - Add code to prevent minting with collection `verified` set to true.
…nctions. - Verify that user-provided metadata results in same hash as user-provided `data_hash`. - This is done to ensure that creator and collection verification functions only modify the verified flag in the metadata and do not pick up other extraneous changes. - This was already being done with the creator hash in creator verification. - Also made change to use helper functions to do creator and data hashing in one place.
- Add instruction to token-metadata that allows for a Bubblegum PDA to modify the size of a sized collection. - Add `bubblegum_program_authority` PDA in Bubblegum `CollectionVerification` struct to be used as a signing PDA. - Add CPI call in Bubblegum to modify size of a sized collection. - Modify `assert_collection_verify_is_valid` in token-metadata to make it more usable with Bubblegum and simplify usage in Bubblegum.
ac72a35
to
634f233
Compare
Reran API gen for token-metadata and bubblegum and picked up the changes. |
Workflow |
verify_collection
and unverify_collection
to Bubblegumverify_collection
, unverify_collection
, and set_and_verify_collection
to Bubblegum
- Require that either the tree authority signed this transaction, or the tree authority is the collection update authority. - Add `payer` to both creator and collection verification instructions. - Regenerating API. - Renaming `bubblegum_program_authority` to `bubblegum_signer` and adding a PDA seed. - Some additional minor changes to existing logic.
16a6df4
to
8d0ac5b
Compare
00825fc
to
55238e8
Compare
- Also fix BubblegumSetCollectionSize instruction processor to call `bubblegum_set_collection_size()`. - Also regenerate API.
55238e8
to
f251483
Compare
5bbb35d
to
da22b07
Compare
Workflow |
Workflow |
I have regenerated api for token-metadata |
I have regenerated api for bubblegum |
Notes
BubblegumError
variants.verified
set to true.assert_has_collection_authority()
from token-metadata to verify.set_and_verify_collection()
require that either the tree authority signed this transaction, or the tree authority is the collection update authority.payer
to both creator and collection verification instructions.Discussion items
a. At first I thought we did but it looks like this is currently not allowed in existing token-metadata program.
b. Also it will require adding additional accounts to
mint_v1()
which does not seem like what we want right now.c. A solution that might work well is in a follow-on PR add a separate
mint_to_collection_v1()
instruction that takes all the required collection accounts.d. Alternatively we could just say for minting to a collection you just have to do
mint_v1()
followed byverify_collection()
. To be honest in this case we don't even needset_and_verify_collection()
because we would just set it as unverified inmint_v1()
.set_and_verify_collection()
, this PR requires that either the tree authority signed this transaction, or the tree authority is the collection update authority which means the leaf update is approved via proxy, when we later callassert_has_collection_authority()
.a. This is similar to logic in token-metadata for
set_and_verify_collection()
except this logic also allows the tree authority (which we are treating as the leaf metadata authority) to be different than the collection authority (actual or delegated). The token-metadata program required them to be the same.