sui holds the standardized Sui tables, following the Sui schema documented in the family overview. Sui treats everything on the chain as an object with an owner, which sets it apart from the other Move chains. Its blocks rows are checkpoints, the groups it batches transactions into, rather than blocks in the usual sense. The objects, transaction_objects and wrapped_objects tables record every version of every object a transaction touched.
Above the raw tables sits the rest of the catalog, and Sui shows up in two parts of it: the list of tokens we know about with their daily prices, and the tokenized assets issued on the chain. Tokens covers the token list and the daily price table. Real-world assets and Stablecoins cover the tokenized assets and their daily tables.
Tables
| Table | Since | Description |
|---|
blocks | 2023-05 | One row per checkpoint. |
transactions | 2023-05 | One row per transaction, with its gas costs and effects attached. |
events | 2023-05 | One row per event a transaction emitted. |
move_calls | 2023-05 | One row per Move call command a transaction executed. |
move_packages | 2023-05 | One row per package version published on chain. |
objects | 2023-04 | One row per object version a transaction wrote, with the object contents. |
transaction_objects | 2023-05 | One row per object a transaction touched, without the contents. |
wrapped_objects | 2023-05 | One row per object wrapped inside another object. |
objects starts a few weeks earlier than the rest, on 2023-04-12. Use transaction_objects when the question is which objects a transaction touched, and objects when what was in them matters.
Every table except blocks splits by day on block_timestamp, and blocks on timestamp. Bound that column in every query; without a bound the query reads the whole table.
blocks
transactions
events
move_calls
move_packages
objects
transaction_objects
wrapped_objects
Sui groups its transactions into checkpoints rather than blocks, and a checkpoint is what this table holds. blocks contains one row per checkpoint.| Column | Type | Description |
|---|
timestamp | TIMESTAMP | The time of the checkpoint. Partition column. |
number | INT64 | The checkpoint sequence number. |
digest | STRING | The digest of the checkpoint. |
previous_digest | STRING | The digest of the previous checkpoint. |
epoch | STRING | The epoch of the checkpoint. |
network_total_transactions | INT64 | The cumulative network transaction count at the checkpoint. |
timestamp_ms | STRING | The checkpoint timestamp, in milliseconds. |
sequence_number | STRING | The checkpoint sequence number as a string. |
validator_signature | STRING | The combined signature of the validators that approved the checkpoint. |
transaction_count | INT64 | The number of transactions in the checkpoint. |
Count checkpoints and the transactions in them per day. transactions contains one row per transaction, with what it cost to run and its effects, the chain’s own record of everything the transaction changed, attached to the row.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
digest | STRING | The digest of the transaction, the identifier used everywhere else. |
checkpoint | STRING | The checkpoint sequence number as a string. |
timestamp_ms | STRING | The transaction timestamp, in milliseconds. |
sender | STRING | The sending address. |
transaction_kind | STRING | The transaction kind, such as programmable transaction. |
is_system_txn | BOOL | Whether the transaction is a system transaction. |
is_sponsored_tx | BOOL | Whether the gas was paid by a sponsor. |
status | STRING | The execution status. |
computation_cost | BIGNUMERIC | The computation cost, in MIST. |
storage_cost | BIGNUMERIC | The storage cost, in MIST. |
storage_rebate | BIGNUMERIC | The storage rebate, in MIST. |
non_refundable_storage_fee | BIGNUMERIC | The non-refundable part of the storage fee, in MIST. |
total_gas_cost | BIGNUMERIC | The total gas cost, in MIST. |
gas_budget | BIGNUMERIC | The gas budget set by the sender. |
gas_price | BIGNUMERIC | The gas price paid. |
gas_owner | STRING | The address paying the gas. |
executed_epoch | STRING | The epoch the transaction executed in. |
transaction_json | STRING | The full transaction, as JSON text. |
effects_json | STRING | The full execution effects, as JSON text. |
balance_changes_json | STRING | The balance changes, as JSON text. |
Count transactions and successes by transaction kind on one day. An event is a note that published code writes when something happens inside it. events contains one row per event a transaction produced.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
transaction_digest | STRING | The digest of the emitting transaction. |
checkpoint | STRING | The checkpoint sequence number as a string. |
epoch | STRING | The epoch of the event. |
event_index | INT64 | The position of the event within the transaction. |
package_id | STRING | The package that defines the event type. |
module | STRING | The module that defines the event type. |
sender | STRING | The sender of the emitting transaction. |
event_type | STRING | The Move type of the event. |
event_json | STRING | The event payload, as JSON text. |
Rank the modules emitting the most events on one day. A Sui transaction is a list of commands, and a Move call is the command that runs a function in published code. move_calls contains one row per such call, naming the code and function it ran.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
transaction_digest | STRING | The digest of the calling transaction. |
checkpoint | STRING | The checkpoint sequence number as a string. |
epoch | STRING | The epoch of the call. |
cmd_index | INT64 | The position of the command within the transaction. |
package | STRING | The called package. |
module | STRING | The called module. |
function | STRING | The called function. |
Rank the most-called package functions on one day. A package is a published bundle of Move code, and upgrading one publishes a new version of it rather than replacing what was there. move_packages contains one row per version.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
transaction_digest | STRING | The digest of the publishing transaction. |
checkpoint | STRING | The checkpoint sequence number as a string. |
epoch | STRING | The epoch of the publish. |
package_id | STRING | The identifier of the package version. |
package_version | INT64 | The version number of the package. |
original_package_id | STRING | The identifier of the first version of the package. |
Count package versions published per day over one week. On Sui, everything a user holds is an object with an owner, and changing one produces a new version of it rather than editing it in place. objects contains one row per object version a transaction wrote, with the object’s contents on the row.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
transaction_digest | STRING | The digest of the writing transaction. |
checkpoint | STRING | The checkpoint sequence number as a string. |
object_id | STRING | The identifier of the object. |
version | INT64 | The version of the object after the write. |
digest_hash | STRING | The digest of the object version. |
object_status | STRING | The status of the write, such as created or mutated. |
owner_type | STRING | The ownership kind, such as address, object or shared. |
owner_address | STRING | The owning address, when address-owned. |
initial_shared_version | INT64 | The version at which the object became shared. |
storage_rebate | INT64 | The storage rebate held by the object. |
has_public_transfer | BOOL | Whether the object can be transferred publicly. |
object_type | STRING | The Move type of the object. |
object_json | STRING | The object contents, as JSON text. |
Count object writes by status on one day. transaction_objects contains one row per object a transaction touched, without the contents. Use it when the question is which objects were involved rather than what was in them.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
transaction_digest | STRING | The digest of the touching transaction. |
checkpoint | STRING | The checkpoint sequence number as a string. |
object_id | STRING | The identifier of the object. |
version | INT64 | The version of the object after the transaction. |
object_status | STRING | The status of the touch, such as created, mutated or deleted. |
Count objects touched by status on one day. An object can be placed inside another object, which is called wrapping: a card held in a deck, say. The inner one then belongs to the outer one instead of to an address. wrapped_objects contains one row per object a transaction wrapped.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing checkpoint. Partition column. |
block_number | INT64 | The sequence number of the containing checkpoint. |
transaction_digest | STRING | The digest of the wrapping transaction. |
checkpoint | STRING | The checkpoint sequence number as a string. |
object_id | STRING | The identifier of the wrapped object. |
root_object_id | STRING | The identifier of the object it is wrapped inside. |
root_object_version | INT64 | The version of the enclosing object. |
Count objects wrapped per day over one week.
Sample queries
Count transactions and gas costs by transaction kind on one day. Count the Sui tokens that have a daily USD price, day by day. Rank the tokenized assets deployed on Sui by circulating market cap.