Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Dec 23, 2024
1 parent 0574944 commit 9e5b686
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 33 deletions.
3 changes: 1 addition & 2 deletions crates/sui-sdk-types/src/digest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 3 additions & 9 deletions crates/sui-sdk-types/src/effects/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
10 changes: 2 additions & 8 deletions crates/sui-sdk-types/src/execution_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ pub enum ExecutionError {
/// Arithmetic error, stack overflow, max value depth, etc."
MovePrimitiveRuntimeError { location: Option<MoveLocation> },
/// Move runtime abort
MoveAbort {
location: MoveLocation,
code: u64,
},
MoveAbort { location: MoveLocation, code: u64 },
/// Bytecode verification error.
VmVerificationOrDeserializationError,
/// MoveVm invariant violation
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 2 additions & 6 deletions crates/sui-sdk-types/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
12 changes: 4 additions & 8 deletions crates/sui-transaction-builder/src/unresolved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ pub struct GasPayment {
pub budget: Option<u64>,
}

#[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,
Expand All @@ -60,8 +59,7 @@ pub struct ObjectReference {
pub digest: Option<ObjectDigest>,
}

#[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 {
Expand All @@ -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")]
Expand Down Expand Up @@ -110,8 +107,7 @@ pub struct Input {
pub mutable: Option<bool>,
}

#[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 {
Expand Down

0 comments on commit 9e5b686

Please sign in to comment.