From bfa96dd416a8a467ab8c49f4d9f7ce035126fa4b Mon Sep 17 00:00:00 2001 From: Todd Nowacki Date: Sun, 8 Jan 2023 16:08:57 -0800 Subject: [PATCH] [json] Add modified_at_versions to SuiTransactionEffects - Added missing field present in TransactionEffects but not for the JSON copy of it --- crates/sui-json-rpc-types/src/lib.rs | 5 +++++ crates/sui-open-rpc/src/examples.rs | 1 + 2 files changed, 6 insertions(+) diff --git a/crates/sui-json-rpc-types/src/lib.rs b/crates/sui-json-rpc-types/src/lib.rs index 5876c834e83f9..18b3e94b1e600 100644 --- a/crates/sui-json-rpc-types/src/lib.rs +++ b/crates/sui-json-rpc-types/src/lib.rs @@ -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, @@ -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, shared_objects: to_sui_object_ref(effect.shared_objects), transaction_digest: effect.transaction_digest, created: to_owned_ref(effect.created), diff --git a/crates/sui-open-rpc/src/examples.rs b/crates/sui-open-rpc/src/examples.rs index a655a8b2ce869..745f089d0b6fd 100644 --- a/crates/sui-open-rpc/src/examples.rs +++ b/crates/sui-open-rpc/src/examples.rs @@ -505,6 +505,7 @@ impl RpcExampleProvider { storage_cost: 100, storage_rebate: 10, }, + modified_at_versions: vec![], shared_objects: vec![], transaction_digest: TransactionDigest::new(self.rng.gen()), created: vec![],