Skip to main content

package

The package corresponding to the given address at the (optionally) given version.

When no version is given, the package is loaded directly from the address given. Otherwise, the address is translated before loading to point to the package whose original ID matches the package at address, but whose version is version. For non-system packages, this may result in a different address than address because different versions of a package, introduced by upgrades, exist at distinct addresses.

Note that this interpretation of version is different from a historical object read (the interpretation of version for the object query).

package(
address: SuiAddress!
version: Int
): MovePackage

Arguments

package.address ● SuiAddress! non-null scalar

package.version ● Int scalar

Type

MovePackage object

A MovePackage is a kind of Move object that represents code that has been published on chain. It exposes information about its modules, type definitions, functions, and dependencies.