Skip to main content

Objects


Facts

Fact Sheet

  • Addressses are not objects
  • Objects are the instantiation (creation) of a move module's struct
  • Coins (including gas), other NFT and/or arbitrary structures are objects
  • Not all objects are addressable on the chain. To be addressable, structs must have the has key ability
  • Addressable objects are identified by a 32 byte array usually represented as a hex string. For example: 0x002bd2d4aac5da6af372a842baf98590213a6bf4160eb0b46ec0cc3d626b42d3
  • Addressable objects can be queried from client SDK or CLI by it's hex string identifier
  • In addition to field values, queried objects also reveal other attributes such as owner
  • Objects ownership may be one of: AddressOwner, ObjectOwner, Shared or Immutable
  • With the exception of objects with Immutable ownership, objects can be modified by the module that created them
  • Manipulating the data returned from querying an object has no effect on the chain objects data

Fetch and Inspect an Object

CLI

sui client object 0x002bd2d4aac5da6af372a842baf98590213a6bf4160eb0b46ec0cc3d626b42d3

Fetch Active Address Owner Objects

CLI

sui client objects

Fetch Multiple Objects

CLI

Not supported

Object Fetch Options

Sui RPC API allows you to specify options when fetching objects to determine what
kind of information you want returned. The following key values are the available options:

{
  "showType": true,
  "showOwner": true,
  "showPreviousTransaction": true,
  "showDisplay": true,
  "showContent": true,
  "showBcs": true,
  "showStorageRebate": true
}

Using the above in your object fetch calls would return all information about the object.
However; you can choose individual flags individually or in combination.

CLI

Not supported