Skip to content

feat: replace MoveObject with SDK version#11431

Merged
thibault-martinez merged 6 commits intodevelopfrom
sdk-replacement/22-MoveObject
May 7, 2026
Merged

feat: replace MoveObject with SDK version#11431
thibault-martinez merged 6 commits intodevelopfrom
sdk-replacement/22-MoveObject

Conversation

@thibault-martinez
Copy link
Copy Markdown
Member

@thibault-martinez thibault-martinez commented May 5, 2026

Description of change

This PR is part of the ongoing effort to consolidate blockchain types in the
canonical iota-rust-sdk. Types that are needed by both clients/SDK consumers
and the node should live in iota-rust-sdk and be imported from there, instead
of being defined twice (once in iota-types, once in the SDK).

This PR replaces MoveObject (previously defined in iota-types) with the
SDK version from iota-sdk-types. To keep the diff small and avoid touching
every call site, the SDK type is re-exported from iota-types under the
original name MoveObject, so most existing imports continue to work
unchanged.

Notes

  • In the SDK, the type is named MoveStruct. It is re-exported as
    pub use iota_sdk_types::MoveStruct as MoveObject; from
    iota-types::object.
  • Because Rust does not allow impl blocks on foreign types, the inherent
    methods previously defined on MoveObject (e.g. new_from_execution,
    new_gas_coin, new_coin, update_contents, get_layout,
    to_move_struct, get_total_iota, get_coin_balances, etc.) have been
    moved to a sealed extension trait MoveObjectExt. Call sites that use these
    methods now import MoveObjectExt alongside MoveObject.
  • The struct field type_ is renamed to object_type to match the SDK
    definition; accessors and direct field uses are updated accordingly.
  • The hand-written move_object_to_sdk / sdk_object_to_move conversions in
    iota_sdk_types_conversions.rs are removed since MoveObject and the SDK's
    MoveStruct are now the same type.

@iota-ci iota-ci added dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group. labels May 5, 2026
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/21-Command branch from 4f22aa1 to b186db4 Compare May 6, 2026 07:37
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/22-MoveObject branch from d464de1 to 2a4f488 Compare May 6, 2026 07:40
@thibault-martinez thibault-martinez marked this pull request as ready for review May 6, 2026 07:40
@thibault-martinez thibault-martinez requested review from a team and alexsporn as code owners May 6, 2026 07:40
@DaughterOfMars DaughterOfMars changed the title feat: replace MoveObject with SDK version (#10795) feat: replace MoveObject with SDK version May 6, 2026
Comment thread crates/iota-types/src/object.rs
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/21-Command branch from b186db4 to eaffd8e Compare May 6, 2026 09:39
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/22-MoveObject branch from 6013d02 to ea4d0f9 Compare May 6, 2026 11:16
Base automatically changed from sdk-replacement/21-Command to develop May 6, 2026 14:09
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/22-MoveObject branch from ea4d0f9 to 8d485e4 Compare May 6, 2026 14:13
Comment thread crates/iota-core/src/authority.rs Outdated
Comment thread crates/iota-core/src/authority.rs Outdated
Comment thread crates/iota-core/src/authority.rs Outdated
Replace MoveObject with SDK version

---------

Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
@thibault-martinez thibault-martinez force-pushed the sdk-replacement/22-MoveObject branch from 3967d64 to 50a41a3 Compare May 6, 2026 15:41
thibault-martinez and others added 2 commits May 6, 2026 17:49
Co-authored-by: Roman Overko <63564739+roman1e2f5p8s@users.noreply.github.com>
Comment thread crates/iota-indexer/src/ingestion/common/prepare.rs Outdated
Co-authored-by: Roman Overko <63564739+roman1e2f5p8s@users.noreply.github.com>
@thibault-martinez thibault-martinez merged commit b171de8 into develop May 7, 2026
35 checks passed
@thibault-martinez thibault-martinez deleted the sdk-replacement/22-MoveObject branch May 7, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group.

Projects

None yet

Development

Successfully merging this pull request may close these issues.