From 9e5b6865925fe6d2331c4c186c2bbd09723f7484 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Mon, 23 Dec 2024 11:07:06 -0600 Subject: [PATCH] m --- crates/sui-sdk-types/src/digest.rs | 3 +-- crates/sui-sdk-types/src/effects/v2.rs | 12 +++--------- crates/sui-sdk-types/src/execution_status.rs | 10 ++-------- crates/sui-sdk-types/src/transaction/mod.rs | 8 ++------ crates/sui-transaction-builder/src/unresolved.rs | 12 ++++-------- 5 files changed, 12 insertions(+), 33 deletions(-) diff --git a/crates/sui-sdk-types/src/digest.rs b/crates/sui-sdk-types/src/digest.rs index 867734221..d4dd26f65 100644 --- a/crates/sui-sdk-types/src/digest.rs +++ b/crates/sui-sdk-types/src/digest.rs @@ -6,8 +6,7 @@ )] #[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))] pub struct Digest( - #[cfg_attr(feature = "serde", serde(with = "DigestSerialization"))] - [u8; Self::LENGTH], + #[cfg_attr(feature = "serde", serde(with = "DigestSerialization"))] [u8; Self::LENGTH], ); impl Digest { diff --git a/crates/sui-sdk-types/src/effects/v2.rs b/crates/sui-sdk-types/src/effects/v2.rs index 6e1547122..067e69631 100644 --- a/crates/sui-sdk-types/src/effects/v2.rs +++ b/crates/sui-sdk-types/src/effects/v2.rs @@ -88,17 +88,11 @@ pub enum UnchangedSharedKind { digest: ObjectDigest, }, /// Deleted shared objects that appear mutably/owned in the input. - MutateDeleted { - version: Version, - }, + MutateDeleted { version: Version }, /// Deleted shared objects that appear as read-only in the input. - ReadDeleted { - version: Version, - }, + ReadDeleted { version: Version }, /// Shared objects in cancelled transaction. The sequence number embed cancellation reason. - Cancelled { - version: Version, - }, + Cancelled { version: Version }, /// Read of a per-epoch config object that should remain the same during an epoch. PerEpochConfig, } diff --git a/crates/sui-sdk-types/src/execution_status.rs b/crates/sui-sdk-types/src/execution_status.rs index 2b3a47e4e..551c27d9d 100644 --- a/crates/sui-sdk-types/src/execution_status.rs +++ b/crates/sui-sdk-types/src/execution_status.rs @@ -74,10 +74,7 @@ pub enum ExecutionError { /// Arithmetic error, stack overflow, max value depth, etc." MovePrimitiveRuntimeError { location: Option }, /// Move runtime abort - MoveAbort { - location: MoveLocation, - code: u64, - }, + MoveAbort { location: MoveLocation, code: u64 }, /// Bytecode verification error. VmVerificationOrDeserializationError, /// MoveVm invariant violation @@ -118,10 +115,7 @@ pub enum ExecutionError { // Post-execution errors // /// Effects from the transaction are too large - EffectsTooLarge { - current_size: u64, - max_size: u64, - }, + EffectsTooLarge { current_size: u64, max_size: u64 }, /// Publish or Upgrade is missing dependency PublishUpgradeMissingDependency, diff --git a/crates/sui-sdk-types/src/transaction/mod.rs b/crates/sui-sdk-types/src/transaction/mod.rs index b5ea8c836..fddb28ba7 100644 --- a/crates/sui-sdk-types/src/transaction/mod.rs +++ b/crates/sui-sdk-types/src/transaction/mod.rs @@ -135,12 +135,8 @@ pub enum EndOfEpochTransactionKind { AuthenticatorStateExpire(AuthenticatorStateExpire), RandomnessStateCreate, DenyListStateCreate, - BridgeStateCreate { - chain_id: super::CheckpointDigest, - }, - BridgeCommitteeInit { - bridge_object_version: u64, - }, + BridgeStateCreate { chain_id: super::CheckpointDigest }, + BridgeCommitteeInit { bridge_object_version: u64 }, } #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/sui-transaction-builder/src/unresolved.rs b/crates/sui-transaction-builder/src/unresolved.rs index 4d60665bd..84afac113 100644 --- a/crates/sui-transaction-builder/src/unresolved.rs +++ b/crates/sui-transaction-builder/src/unresolved.rs @@ -45,8 +45,7 @@ pub struct GasPayment { pub budget: Option, } -#[derive(Clone, Debug)] -#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] #[serde(rename = "UnresolvedObjectReference")] pub struct ObjectReference { pub object_id: ObjectId, @@ -60,8 +59,7 @@ pub struct ObjectReference { pub digest: Option, } -#[derive(Clone, Debug, PartialEq, Eq)] -#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(rename = "UnresolvedInputKind")] #[serde(rename_all = "snake_case")] pub enum InputKind { @@ -78,8 +76,7 @@ pub enum InputKind { /// /// If used in the context of transaction builder, make sure to call `tx.resolve` function on the /// transaction builder to resolve all unresolved inputs. -#[derive(Clone, Debug, Default, PartialEq, Eq)] -#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(rename = "UnresolvedInput")] pub struct Input { #[serde(skip_serializing_if = "Option::is_none")] @@ -110,8 +107,7 @@ pub struct Input { pub mutable: Option, } -#[derive(Clone, Debug, PartialEq, Eq)] -#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(rename = "UnresolvedValue")] #[serde(try_from = "serde_json::Value", into = "serde_json::Value")] pub enum Value {