Module move_package

Module move_package 

Source
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 ID is the ObjectID representing the address by which the given package may be found in storage.
  • Runtime ID will always mean the Package ID/Storage ID of the initially published package. For a non upgradeable package this will always be equal to Storage ID. For an upgradeable package, it will be the Storage ID of the package’s first deployed version.
  • Storage ID is the Package ID, and it is mostly used in to highlight that we are talking about the current Package ID and not the Runtime ID
  • Module ID is 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§

AuthenticatorAttribute
AuthenticatorMetadataV1
V1 of IOTA specific authenticator info metadata.
FnInfo
Additional information about a function
FnInfoKey
Uniquely identifies a function in a module
ModuleMetadataV1
V1 of IOTA specific module metadata. Only includes authenticator info.
MovePackage
PackageMetadataKey
PackageMetadataV1
V1 of IOTA specific package metadata.
RuntimeModuleMetadataV1
V1 of IOTA specific metadata.
RuntimeModuleMetadataWrapper
IOTA specific metadata attached to the metadata section of file_format.
TypeOrigin
Store the origin of a data type where it first appeared in the version chain.
UpgradeCap
Rust representation of iota::package::UpgradeCap.
UpgradeInfo
Value for the MovePackage’s linkage_table.
UpgradeReceipt
Rust representation of iota::package::UpgradeReceipt.
UpgradeTicket
Rust representation of iota::package::UpgradeTicket.

Enums§

IotaAttribute
The list of iota attribute types recognized by the compiler.
PackageMetadata
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.
RuntimeModuleMetadata
IOTA specific metadata attached to the metadata section of file_format.
UpgradePolicy
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_code is set to false, the normalized module will skip function bodies but still include the signatures.
normalize_modules
If include_code is set to false, the normalized module will skip function bodies but still include the signatures.

Type Aliases§

FnInfoMap
A map from function info keys to function info