Skip to content

Commit

Permalink
refactor: Remove has_public_transfer in MoveStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Nov 1, 2024
1 parent dd7b331 commit a777d4d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions crates/iota-rust-sdk/src/types/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ pub struct MoveStruct {
serde(with = "::serde_with::As::<serialization::BinaryMoveStructType>")
)]
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
Expand Down Expand Up @@ -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(),
}),
Expand Down Expand Up @@ -564,7 +559,6 @@ mod serialization {
schemars(rename = "MoveStruct")
)]
struct ReadableMoveStruct {
has_public_transfer: bool,
#[serde(with = "::serde_with::As::<crate::_serde::Base64Encoded>")]
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::Base64"))]
contents: Vec<u8>,
Expand All @@ -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 {
Expand Down Expand Up @@ -650,7 +643,6 @@ mod serialization {
(
ObjectType::Struct(type_),
ReadableObjectData::Move(ReadableMoveStruct {
has_public_transfer,
contents,
}),
) => {
Expand All @@ -661,7 +653,6 @@ mod serialization {

ObjectData::Struct(MoveStruct {
type_,
has_public_transfer,
version,
contents,
})
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -809,7 +799,6 @@ mod serialization {
(
ObjectType::Struct(type_),
ReadableObjectData::Move(ReadableMoveStruct {
has_public_transfer,
contents,
}),
) => {
Expand All @@ -820,7 +809,6 @@ mod serialization {

ObjectData::Struct(MoveStruct {
type_,
has_public_transfer,
version,
contents,
})
Expand Down

0 comments on commit a777d4d

Please sign in to comment.