From a777d4d57fc2dadd168ac26d50b0eca6631d2d6a Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Fri, 1 Nov 2024 17:17:16 +0800 Subject: [PATCH] refactor: Remove has_public_transfer in MoveStruct --- crates/iota-rust-sdk/src/types/object.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/crates/iota-rust-sdk/src/types/object.rs b/crates/iota-rust-sdk/src/types/object.rs index d94704a..2c3a70b 100644 --- a/crates/iota-rust-sdk/src/types/object.rs +++ b/crates/iota-rust-sdk/src/types/object.rs @@ -190,10 +190,6 @@ pub struct MoveStruct { serde(with = "::serde_with::As::") )] pub type_: StructTag, - /// DEPRECATED this field is no longer used to determine whether a tx can - /// transfer this object. Instead, it is always calculated from the - /// objects type when loaded in execution - pub has_public_transfer: bool, /// Number that increases each time a tx takes this object as a mutable /// input This is a lamport timestamp, not a sequentially increasing /// version @@ -321,7 +317,6 @@ mod serialization { name: Identifier::new("foo").unwrap(), type_params: Vec::new(), }, - has_public_transfer: true, version: 12, contents: ObjectId::ZERO.into(), }), @@ -564,7 +559,6 @@ mod serialization { schemars(rename = "MoveStruct") )] struct ReadableMoveStruct { - has_public_transfer: bool, #[serde(with = "::serde_with::As::")] #[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::Base64"))] contents: Vec, @@ -574,7 +568,6 @@ mod serialization { fn readable_object_data(&self) -> ReadableObjectData { match &self.data { ObjectData::Struct(struct_) => ReadableObjectData::Move(ReadableMoveStruct { - has_public_transfer: struct_.has_public_transfer, contents: struct_.contents.clone(), }), ObjectData::Package(package) => ReadableObjectData::Package(ReadablePackage { @@ -650,7 +643,6 @@ mod serialization { ( ObjectType::Struct(type_), ReadableObjectData::Move(ReadableMoveStruct { - has_public_transfer, contents, }), ) => { @@ -661,7 +653,6 @@ mod serialization { ObjectData::Struct(MoveStruct { type_, - has_public_transfer, version, contents, }) @@ -740,7 +731,6 @@ mod serialization { fn readable_object_data(&self) -> ReadableObjectData { match &self.data { ObjectData::Struct(struct_) => ReadableObjectData::Move(ReadableMoveStruct { - has_public_transfer: struct_.has_public_transfer, contents: struct_.contents.clone(), }), ObjectData::Package(package) => ReadableObjectData::Package(ReadablePackage { @@ -809,7 +799,6 @@ mod serialization { ( ObjectType::Struct(type_), ReadableObjectData::Move(ReadableMoveStruct { - has_public_transfer, contents, }), ) => { @@ -820,7 +809,6 @@ mod serialization { ObjectData::Struct(MoveStruct { type_, - has_public_transfer, version, contents, })