Expand description
Move package.
This module contains the MovePackage and types necessary for describing its update behavior and linkage information for module resolution during execution.
Upgradeable packages form a version chain. This is simply the conceptual chain of package versions, with their monotonically increasing version numbers. Package { version: 1 } => Package { version: 2 } => …
The code contains terminology that may be confusing for the uninitiated,
like Module ID, Package ID, Storage ID and Runtime ID. For avoidance
of doubt these concepts are defined like so:
Package IDis the ObjectID representing the address by which the given package may be found in storage.Runtime IDwill always mean thePackage ID/Storage IDof the initially published package. For a non upgradeable package this will always be equal toStorage ID. For an upgradeable package, it will be theStorage IDof the package’s first deployed version.Storage IDis thePackage ID, and it is mostly used in to highlight that we are talking about the currentPackage IDand not theRuntime IDModule IDis the the type ModuleID.
Some of these are redundant and have overlapping meaning, so whenever
reasonable/necessary the possible naming will be listed. From all of these
Runtime ID and Module ID are the most confusing. Module ID may be used
with Runtime ID and Storage ID depending on the context. While Runtime ID is mostly used in name resolution during runtime, when a package with
its modules has been loaded.
Structs§
- Authenticator
Attribute - Authenticator
Metadata V1 - V1 of IOTA specific authenticator info metadata.
- FnInfo
- Additional information about a function
- FnInfo
Key - Uniquely identifies a function in a module
- Module
Metadata V1 - V1 of IOTA specific module metadata. Only includes authenticator info.
- Move
Package - Package
Metadata Key - Package
Metadata V1 - V1 of IOTA specific package metadata.
- Runtime
Module Metadata V1 - V1 of IOTA specific metadata.
- Runtime
Module Metadata Wrapper - IOTA specific metadata attached to the metadata section of file_format.
- Type
Origin - Store the origin of a data type where it first appeared in the version chain.
- Upgrade
Cap - Rust representation of
iota::package::UpgradeCap. - Upgrade
Info - Value for the MovePackage’s linkage_table.
- Upgrade
Receipt - Rust representation of
iota::package::UpgradeReceipt. - Upgrade
Ticket - Rust representation of
iota::package::UpgradeTicket.
Enums§
- Iota
Attribute - The list of iota attribute types recognized by the compiler.
- Package
Metadata - Enum for handling the PackageMetadata framework type. The PackageMetadata is IOTA specific metadata derived from a package and readable on-chain. This enums helps with the versioning, which is actually used as the object content, i.e., PackageMetadataV1 is the type used on-chain.
- Runtime
Module Metadata - IOTA specific metadata attached to the metadata section of file_format.
- Upgrade
Policy - Rust representation of upgrade policy constants in
iota::package.
Constants§
- PACKAGE_
METADATA_ KEY_ STRUCT_ NAME - PACKAGE_
METADATA_ MODULE_ NAME - PACKAGE_
METADATA_ V1_ STRUCT_ NAME - PACKAGE_
MODULE_ NAME - UPGRADECAP_
STRUCT_ NAME - UPGRADERECEIPT_
STRUCT_ NAME - UPGRADETICKET_
STRUCT_ NAME
Functions§
- derive_
package_ metadata_ id - get_
authenticator_ version_ from_ fun - is_
test_ fun - Checks if a function is annotated with one of the test-related annotations
- normalize_
deserialized_ modules - If
include_codeis set tofalse, the normalized module will skip function bodies but still include the signatures. - normalize_
modules - If
include_codeis set tofalse, the normalized module will skip function bodies but still include the signatures.
Type Aliases§
- FnInfo
Map - A map from function info keys to function info