-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[json] Add modified_at_versions to SuiTransactionEffects #7237
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1870,6 +1870,10 @@ pub struct SuiTransactionEffects { | |
// The status of the execution | ||
pub status: SuiExecutionStatus, | ||
pub gas_used: SuiGasCostSummary, | ||
// The version that every modified (mutated or deleted) object had before it was modified by | ||
// this transaction. | ||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub modified_at_versions: Vec<(ObjectID, SequenceNumber)>, | ||
// The object references of the shared objects used in this transaction. Empty if no shared objects were used. | ||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub shared_objects: Vec<SuiObjectRef>, | ||
|
@@ -1916,6 +1920,7 @@ impl SuiTransactionEffects { | |
Ok(Self { | ||
status: effect.status.into(), | ||
gas_used: effect.gas_used.into(), | ||
modified_at_versions: effect.modified_at_versions, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Separate issue, but wondering why the existing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Originally |
||
shared_objects: to_sui_object_ref(effect.shared_objects), | ||
transaction_digest: effect.transaction_digest, | ||
created: to_owned_ref(effect.created), | ||
|
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 style, the pair
(ObjectID, SequenceNumber)
, does not seem in line with the rest of this struct, but I was unsure if I should make a type just for this case.Any advice @patrickkuo?
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.
We use custom type (e.g.
SuiObjectRef
) to give the values names before serialisation to make it more readable.IIRC this is preferred in typescript? CC @666lcz for comments