-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[token] added functions to rotate collectiondata fields #5265
Conversation
d94441a
to
851e5a3
Compare
851e5a3
to
d054fe0
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.
need to check the tokendata maximum mutation to be bigger or equal to supply as well
6ce323c
to
b5544fe
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.
Are we not emitting events for these mutations?
assert_collection_exists(creator_address, collection_name); | ||
let collection_data = table::borrow_mut(&mut borrow_global_mut<Collections>(creator_address).collection_data, collection_name); | ||
// cannot change maximum from 0 and cannot change maximum to 0 | ||
assert!(collection_data.maximum != 0 && maximum !=0, error::invalid_argument(EINVALID_MAXIMUM)); |
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.
nit: space after maximum !=
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 it's really hard to add events for now given the current event framework, but we're going to add events in the future? cc @areshand
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.
yes, we have a proposal. Now just need to add a converter at API side to deserialize propertyMap properly https://www.notion.so/aptoslabs/Add-General-Token-Events-9ee2eb3c95fe49fb8367879331b7e91f
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.
Thank you, Chloe! The Markdown LGTM.
b5544fe
to
9798f00
Compare
78843fa
to
389273f
Compare
389273f
to
63b93ee
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
^
Test Plan
unit tests
This change is