-
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
[framework][object] Introduce ability to recreate objects after deletion #15576
base: igor/add_to_property_map
Are you sure you want to change the base?
[framework][object] Introduce ability to recreate objects after deletion #15576
Conversation
⏱️ 53m total CI duration on this PR
|
/// Used to (re)create object at a given address | ||
enum CreateAtAddressRef has drop, store { | ||
RecreateV1 { | ||
object: address, | ||
owner: address, | ||
guid_creation_num: u64, | ||
untransferable: bool, | ||
allow_ungated_transfer: bool, | ||
transfer_events: event::EventHandle<TransferEvent> | ||
}, | ||
} |
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.
Replace enum CreateAtAddressRef with a struct containing the same fields to be compatible with Move v1
Spotted by Graphite Reviewer (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
/// Used to (re)create object at a given address | ||
enum CreateAtAddressRef has drop, store { | ||
RecreateV1 { | ||
object: address, | ||
owner: address, | ||
guid_creation_num: u64, | ||
untransferable: bool, | ||
allow_ungated_transfer: bool, | ||
transfer_events: event::EventHandle<TransferEvent> | ||
}, | ||
} |
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.
Replace enum CreateAtAddressRef with a struct since Move 2 enum features are not yet enabled. Suggested replacement:
struct CreateAtAddressRef has drop, store {
object: address,
owner: address,
guid_creation_num: u64,
untransferable: bool,
allow_ungated_transfer: bool,
transfer_events: event::EventHandle
}
Spotted by Graphite Reviewer (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
9993745
to
b9bd71c
Compare
eb16207
to
7092a12
Compare
/// Cannot delete_and_can_recreate with TombStone present. | ||
const ETOMBSTONE_CANNOT_BE_PRESENT: u64 = 10; |
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.
The error code 10
is already used by EBURN_NOT_ALLOWED
, so ETOMBSTONE_CANNOT_BE_PRESENT
should use a different value (such as 11
) to avoid ambiguous error handling. Having two different error conditions share the same code could make debugging more difficult and impact error reporting accuracy.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
b9bd71c
to
80291e3
Compare
7092a12
to
5cbb160
Compare
80291e3
to
1094f18
Compare
5cbb160
to
e5f2580
Compare
1094f18
to
4ce5c7c
Compare
e5f2580
to
57414cf
Compare
4ce5c7c
to
38d0b84
Compare
57414cf
to
700d668
Compare
38d0b84
to
979fae3
Compare
700d668
to
b8a9b02
Compare
979fae3
to
e86528e
Compare
b8a9b02
to
e0c474e
Compare
e86528e
to
9836448
Compare
e0c474e
to
95d8c20
Compare
9836448
to
2817048
Compare
95d8c20
to
627e416
Compare
Description
How Has This Been Tested?
Key Areas to Review
Type of Change
Which Components or Systems Does This Change Impact?
Checklist