| 0x01 |
MODULE_HANDLES |
modulescript |
Resolves module identity by linking an address and module name. |
Description
Resolves module identity by linking an address and module name.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•address: points into ADDRESS_IDENTIFIERS and selects the package address where the module lives. •name: points into IDENTIFIERS and selects the module name string.
Example
•Address: 0 -> 0x1234...6789 •Name: 5 -> example
|
| 0x02 |
STRUCT_HANDLES |
modulescript |
Declares datatype identity and generic parameter constraints. In the latest binary-format source this table is named DATATYPE_HANDLES because the same handle space is used for structs and enum datatypes. |
Description
Declares datatype identity and generic parameter constraints. In the latest binary-format source this table is named DATATYPE_HANDLES because the same handle space is used for structs and enum datatypes.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•module: points into MODULE_HANDLES and resolves which module owns the datatype. •name: points into IDENTIFIERS and resolves the datatype name. •nominal resource: original vm.md meaning is a resource boolean (0/1). In modern Sui binaries this same byte stores an ability bitset: 0x1 COPY, 0x2 DROP, 0x4 STORE, 0x8 KEY. •type parameters: generic parameter metadata vector for this struct. •length: number of generic type parameters. •kind: legacy vm.md encoding is 0x1 ALL, 0x2 COPYABLE, 0x3 RESOURCE. Modern binaries use this slot as an ability-set bitmap: 0x1 COPY, 0x2 DROP, 0x4 STORE, 0x8 KEY. •phantom: whether the type parameter is phantom (1) or non-phantom (0). This metadata is present in modern format; legacy vm.md did not describe it explicitly.
Example
•Module: 0 -> 0x1234...6789::example •Name: 3 -> ExampleStruct •Nominal Resource: 0x07 -> COPY + DROP + STORE •Type Parameters: 1 -> length = 1 •Kind: 0xC -> T0: STORE + KEY •Phantom: 1 -> phantom = true
|
| 0x03 |
FUNCTION_HANDLES |
modulescript |
Indexes function identity and links parameter/return signatures. |
Description
Indexes function identity and links parameter/return signatures.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•module: points into MODULE_HANDLES and resolves which module owns the function. •name: points into IDENTIFIERS and resolves the function name. •parameters: points into SIGNATURES and resolves the function input types. •return: points into SIGNATURES and resolves output types. •type parameters: generic constraints for function type parameters. •length: number of generic type parameters. •kind: legacy vm.md encoding is 0x1 ALL, 0x2 COPYABLE, 0x3 RESOURCE. Modern binaries use this slot as an ability-set bitmap: 0x1 COPY, 0x2 DROP, 0x4 STORE, 0x8 KEY.
Example
•Module: 0 -> 0x1234...6789::example •Name: 30 -> wrap •Parameters: 2 -> (T0, address) •Return: 1 -> () •Type Parameters: 1 -> T0: STORE + KEY
|
| 0x04 |
FUNCTION_INSTANTIATIONS |
modulescript |
Binds a generic function handle to concrete or partially-resolved type arguments. |
Description
Binds a generic function handle to concrete or partially-resolved type arguments.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•handle: points into FUNCTION_HANDLES and selects the generic function. •instantiation: points into SIGNATURES and provides the concrete type arguments.
Example
•Handle: 9 -> 0x2::transfer::public_transfer •Instantiation: 14 -> (0x1234...6789::example::DummyCap)
|
| 0x05 |
SIGNATURES |
modulescript |
Stores reusable signature-token vectors referenced by handles, locals, and instantiations. |
Description
Stores reusable signature-token vectors referenced by handles, locals, and instantiations.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•length: number of tokens in this signature entry. •tokens: ordered list of SignatureToken values (primitives, datatypes, references, vectors, generics). •modern binaries also allow U16, U32, and U256 signature tokens.
Example
•Length: 2 •Tokens: •[0] 0x0::example::DummyCap •[1] &mut 0x2::tx_context::TxContext
|
| 0x06 |
CONSTANT_POOL |
modulescript |
Stores serialized constants loaded by LD_CONST. |
Description
Stores serialized constants loaded by LD_CONST.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•type: SignatureToken that defines how to interpret the constant bytes. •value: serialized bytes for the constant payload. •modern binaries can encode constants whose type token uses U16, U32, or U256.
Example
•Type: vector<u8> •Value: 4572726f72 ("Error")
|
| 0x07 |
IDENTIFIERS |
modulescript |
Interned identifier strings used by modules, structs, functions, fields, and variants. |
Description
Interned identifier strings used by modules, structs, functions, fields, and variants.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•identifier: UTF-8/ASCII identifier text.
Example
|
| 0x08 |
ADDRESS_IDENTIFIERS |
modulescript |
Address pool used by module handles and friend/module references. |
Description
Address pool used by module handles and friend/module references.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•address: fixed-width account address bytes. Address width is validated against runtime AccountAddress::LENGTH during deserialization.
Example
•Address: 0 -> 0x0000...0000
|
| 0x0A |
STRUCT_DEFINITIONS |
module |
Contains concrete datatype definitions and their declared field layout. |
Description
Contains concrete datatype definitions and their declared field layout.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•struct handle: points into STRUCT_HANDLES and selects the target struct. •field information: tagged payload that marks native vs declared field layout. Newer binaries can encode richer datatype forms aligned with enum-capable layouts. •fields: declared field list when the struct is not native. •name: points into IDENTIFIERS and resolves the field name string. •field type: SignatureToken describing the field type.
Example
•Struct Handle: 4 -> 0x1234...6789::example::WrappedCap •Field Information: DECLARED •Fields: •[0] id: 0x2::object::UID •[1] cap: T0
|
| 0x0B |
STRUCT_DEF_INSTANTIATIONS |
module |
Instantiates generic struct definitions with concrete or partial type arguments. |
Description
Instantiates generic struct definitions with concrete or partial type arguments.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•definition: points to the target generic struct definition/handle. •instantiation: points into SIGNATURES and provides type arguments. Modern code paths resolve this through DatatypeDefInstantiation in updated-format code.
Example
•Definition: 2 -> 0x1234...6789::example::Wrapper •Instantiation: 11 -> (T0)
|
| 0x0C |
FUNCTION_DEFINITIONS |
module |
Stores executable function bodies plus visibility, flags, acquires list, and code units. |
Description
Stores executable function bodies plus visibility, flags, acquires list, and code units.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•function: points into FUNCTION_HANDLES and selects which function this body belongs to. •visibility: version 1 folded visibility into the flags byte; version 2+ stores visibility separately as 0x0 PRIVATE, 0x1 PUBLIC, 0x2 SCRIPT, 0x3 FRIEND. •flags: version 2+ uses a separate flags byte. In current binaries the NATIVE bit remains, and version 5+ also uses ENTRY as bit 0x4. •acquires global resources: list of global resources touched by the function. •length: number of acquired resource entries. •resources: list of struct-definition indices for acquired resources. In Sui this list is expected to stay empty because object-based storage is used instead of Move global resources. •code unit: executable body metadata. •locals: points into SIGNATURES and defines local-register types for this frame. •code: bytecode instruction stream. •length: number of bytecode instructions. •bytecodes: opcode sequence executed by the VM. •jump tables: function-local branch-table metadata stored after the bytecode stream. Present in bytecode version 7+ enum-capable binaries. •count: ULEB128 number of jump tables attached to this function body. •tables: repeated jump-table entries. •head enum: ULEB128 ENUM_DEFINITIONS index for the enum head recorded in this entry. •branch count: ULEB128 number of branch destinations stored in this entry. •flag: one byte describing the table encoding. Current value 0x01 means FULL. •targets: ULEB128 code-offset vector stored in variant-tag order.
Example
•Function: 7 -> 0x1234...6789::example::wrap •Visibility: PUBLIC •Flags: ENTRY •Acquires Global Resources: [] •Code Unit: locals = sig[6], instruction_count = 18, jump_tables = 1 •Jump Table[0]: head_enum_idx = 0, branch_count = 2, flag = 0x01 (FULL), targets = [6, 13]
|
| 0x0D |
FIELD_HANDLES |
module |
Direct references to fields for non-generic field operations. |
Description
Direct references to fields for non-generic field operations.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•owner: points into STRUCT_DEFINITIONS and selects the struct that owns the field. •field: index of the field inside that struct declaration order.
Example
•Owner: 3 -> 0x1234...6789::example::WrappedCap •Field: 1 -> cap: T0
|
| 0x0E |
FIELD_INSTANTIATIONS |
module |
References fields where owner types include generic instantiation arguments. |
Description
References fields where owner types include generic instantiation arguments.
MoveVM Version •Introduced in Move bytecode version 1.
Fields
•handle: points into FIELD_HANDLES and selects the base field. •instantiation: points into SIGNATURES and provides owner type arguments.
Example
•Handle: 5 -> 0x1234...6789::example::Wrapper.value •Instantiation: 9 -> (T0)
|
| 0x0F |
FRIEND_DECLS |
module |
Declares friend modules for friend-visibility checks. Current Sui compiler flows (edition 2024) no longer emit this table; it is produced only in legacy edition builds that still allow friend declarations. |
Description
Declares friend modules for friend-visibility checks. Current Sui compiler flows (edition 2024) no longer emit this table; it is produced only in legacy edition builds that still allow friend declarations.
MoveVM Version •Introduced in Move bytecode version 2.
Fields
•address: points into ADDRESS_IDENTIFIERS and resolves friend module address. •name: points into IDENTIFIERS and resolves friend module name.
Example
•Address: 1 -> 0x0 •Name: 27 -> b
|
| 0x10 |
METADATA |
modulescript |
Opaque key/value metadata table accepted in newer binary versions. Move source code does not directly compile into this table; entries are usually produced by post-processing or custom emitters. |
Description
Opaque key/value metadata table accepted in newer binary versions. Move source code does not directly compile into this table; entries are usually produced by post-processing or custom emitters.
MoveVM Version •Introduced in Move bytecode version 5.
Fields
•key: metadata key bytes. •value: metadata value bytes. This table is accepted only from bytecode version >= 5 in current deserializer behavior.
Example
•Key: 646f635f75726c ("doc_url") •Value: 687474703a2f2f... ("http://...")
|
| 0x11 |
ENUM_DEFS |
module |
Defines enum datatypes, variant names, and per-variant field layouts. |
Description
Defines enum datatypes, variant names, and per-variant field layouts.
Fields
•enum handle: points into STRUCT_HANDLES and resolves the enum datatype identity. •enum flag: currently supported value is 0x02 (DECLARED). •variants: list of variant definitions. This table exists in modern Sui/post-vm.md formats and is gated by binary version. •variant name: points into IDENTIFIERS and resolves the variant name. •field count: number of fields held by this variant. •fields: per-variant field metadata. •field name: points into IDENTIFIERS and resolves the field name. •field type: SignatureToken describing the field type.
Example
•Enum Handle: 2 -> 0x1234...6789::example::ProbePlain •Enum Flag: 0x02 •Variants: •[0] variant name = Zero, field count = 0 •[1] variant name = One, field count = 1, fields = [ field name = n, field type = u64 ]
|
| 0x12 |
ENUM_DEF_INST |
module |
Instantiates generic enum definitions with concrete type arguments. |
Description
Instantiates generic enum definitions with concrete type arguments.
Fields
•enum definition: points into ENUM_DEFS. •instantiation: points into SIGNATURES for enum type arguments. Present only in modern enum-capable binary versions.
Example
•Enum Definition: 1 -> 0x1234...6789::example::ProbeOpt •Instantiation: 13 -> (u64)
|
| 0x13 |
VARIANT_HANDLES |
module |
Direct handle to a specific variant of an enum definition. |
Description
Direct handle to a specific variant of an enum definition.
Fields
•enum definition: points into ENUM_DEFS and selects the enum. •variant index: index of the target variant inside enum variant order. Used by PACK_VARIANT / UNPACK_VARIANT opcode family.
Example
•Enum Definition: 1 -> 0x1234...6789::example::ProbePlain •Variant Index: 0 -> Zero
|
| 0x14 |
VARIANT_INST_HANDLES |
module |
Handle to a specific variant on an instantiated generic enum. |
Description
Handle to a specific variant on an instantiated generic enum.
Fields
•enum instantiation: points into ENUM_DEF_INST. •variant index: index of the target variant inside enum variant order. Used by generic variant pack/unpack opcodes.
Example
•Enum Instantiation: 0 -> 0x1234...6789::example::ProbeOpt<u64> •Variant Index: 1 -> None
|