-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add functions to update collection name and max supply #78
Conversation
2c47d20
to
ba626b0
Compare
@@ -45,6 +47,14 @@ module minter::collection_properties { | |||
tokens_transferable_by_collection_owner: CollectionProperty, | |||
} | |||
|
|||
#[resource_group_member(group = aptos_framework::object::ObjectGroup)] | |||
struct CollectionPropertiesV2 has copy, drop, key { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason we can't add this to CollectionProperties? Is it because this is an upgrade to an already deployed contract?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right.
mutable_name: bool, | ||
mutable_max_supply: bool, | ||
): CollectionPropertiesV2 { | ||
CollectionPropertiesV2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need access control?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to emit an event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just creates the resource. We emit an event when they initialize this for the collection.
No need for access control, anyone can create this for a resource they own. This is just a struct with values.
mutable_max_supply: bool, | ||
) acquires CollectionPropertiesV2 { | ||
let property = &mut authorized_borrow_mut_v2(collection_owner, collection).mutable_max_supply; | ||
set_property(property, mutable_max_supply, string::utf8(b"mutable_max_supply")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it too late for us to deprecate something like event Mutation
? Why don't we just define a new event type for each new type of mutation? mutated_field_name
feels typo-prone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, we do this for collection module in Aptos and don't see any problems with this.
ba626b0
to
98aae9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, both clients who're using token minter on mainnet are fine with redeployment, lets redeploy with fields added to the original collectionproperties
98aae9d
to
9189b4e
Compare
9189b4e
to
f1ed95f
Compare
Description
Add support for: