aptos holds the standardized Aptos tables, following the Aptos-style schema documented in the family overview exactly, with no differences.
Tables
| Table | Since | Description |
|---|
blocks | 2022-10 | One row per block, with the first and last transaction version in it. |
transactions | 2022-10 | One row per transaction version, keyed on version. |
events | 2022-10 | One row per event a transaction emitted. |
changes | 2022-10 | One row per state change a transaction wrote. |
resources | 2022-10 | One row per account resource write or delete. |
modules | 2022-10 | One row per Move module publish or update. |
table_items | 2022-10 | One row per onchain table item write or delete. |
Columns
These schemas apply to Aptos and to Movement, which uses the same tables. A module is a published unit of Move code, the equivalent of a contract elsewhere. A resource is a piece of data stored under an account, such as its balance of a particular coin; the changes tables record what a transaction wrote to those.
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
changes
resources
modules
table_items
move_calls
move_packages
objects
transaction_objects
wrapped_objects
A block is a batch of transactions added to the chain. Aptos also numbers every transaction it has ever run, and that number is the transaction’s version, so each block covers a range of versions. blocks contains one row per block, carrying the first and last version in it.| Column | Type | Description |
|---|
timestamp | TIMESTAMP | The time the block was produced. Partition column. |
block_height | INT64 | The block height. |
first_version | STRING | The first transaction version in the block. |
last_version | STRING | The last transaction version in the block. |
block_hash | STRING | The hash of the block. |
Count blocks per day and the version range they cover. Not every transaction comes from a user: the chain writes its own bookkeeping entries into the same numbered sequence. transactions contains one row per transaction, identified by its version number, whichever kind it is: a user transaction, a block metadata entry, or a state checkpoint. The type column says which.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
hash | STRING | The hash of the transaction. |
timestamp | STRING | The onchain transaction timestamp, in microseconds. |
accumulator_root_hash | STRING | The accumulator root hash after the transaction. |
epoch | STRING | The epoch of the transaction. |
event_root_hash | STRING | The root hash of the transaction’s events. |
expiration_timestamp_secs | STRING | The expiration time set by the sender, in seconds. |
failed_proposer_indices | ARRAY<INT64> | The indices of proposers that failed in the round. |
gas_unit_price | STRING | The gas unit price, in octas. |
gas_used | STRING | The gas units consumed. |
id | STRING | The identifier of block metadata transactions. |
max_gas_amount | STRING | The gas limit set by the sender. |
previous_block_votes_bitvec | ARRAY<INT64> | The vote bitvector for the previous block. |
proposer | STRING | The proposer of the block, for block metadata transactions. |
round | STRING | The consensus round. |
sender | STRING | The sending account. |
sequence_number | STRING | The sender’s sequence number. |
state_change_hash | STRING | The hash of the transaction’s state changes. |
state_checkpoint_hash | STRING | The state checkpoint hash, when present. |
success | BOOL | Whether the transaction succeeded. |
type | STRING | The transaction type, such as user or block metadata. |
version | STRING | The global transaction version, the identifier used everywhere else. |
vm_status | STRING | The VM execution status. |
signature_type | STRING | The signature scheme used. |
signature_public_key | STRING | The signing public key. |
signature | STRING | The transaction signature. |
payload | JSON | The full transaction payload. |
payload_function | STRING | The entry function called, as address::module::function. |
payload_type | STRING | The payload type. |
payload_type_arguments | JSON | The generic type arguments of the call. |
payload_arguments | JSON | The arguments of the call. |
Count daily Aptos transactions and their success rate over one week. An event is a note that published code writes when something happens inside it: a transfer, a swap, a deposit. events contains one row per event a transaction produced.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
sequence_number | STRING | The sequence number of the event in its stream. |
transaction_hash | STRING | The hash of the emitting transaction. |
event_type | STRING | The Move type of the event. |
event_index | INT64 | The position of the event within the transaction. |
event_guid_account_address | STRING | The account address of the event stream. |
event_guid_creation_number | INT64 | The creation number of the event stream. |
data | JSON | The event payload. |
Count events by type on one day. Everything a transaction actually altered on the chain is recorded here. changes contains one row per alteration, of any kind. The tables that follow are slices of this one.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the writing transaction. |
changes_index | INT64 | The position of the change within the transaction. |
changes_type | STRING | The change type, such as write resource or delete resource. |
changes_address | STRING | The account address the change applies to. |
data_type | STRING | The Move type of the changed data. |
data | JSON | The changed data. |
changes | JSON | The raw change record. |
Count changes by type on one day. resources is the part of changes that touched data stored under an account, a coin balance for instance. One row per write or delete.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the writing transaction. |
changes_type | STRING | The change type. |
changes_index | INT64 | The position of the change within the transaction. |
changes_address | STRING | The account address the change applies to. |
resource_address | STRING | The address of the resource. |
data | JSON | The resource contents after the change. |
data_type | STRING | The Move type of the resource. |
state_key_hash | STRING | The state key hash of the resource slot. |
Rank resource types by writes on one day. modules contains one row per time Move code was published or upgraded, along with the functions and data types that code exposes.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the publishing transaction. |
changes_type | STRING | The change type. |
changes_index | INT64 | The position of the change within the transaction. |
changes_address | STRING | The account address the change applies to. |
module_address | STRING | The address the module lives under. |
module_name | STRING | The name of the module. |
exposed_functions | JSON | The public functions of the module. |
friends | JSON | The friend modules. |
structs | JSON | The struct definitions of the module. |
bytecode | STRING | The compiled module bytecode. |
state_key_hash | STRING | The state key hash of the module slot. |
Count module publishes and upgrades per day over one week. Move code can keep its own key-value store on the chain, and each entry in one is a table item. table_items contains one row per entry written or deleted.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the writing transaction. |
changes_type | STRING | The change type. |
changes_index | INT64 | The position of the change within the transaction. |
data | JSON | The raw item record. |
handle | STRING | The handle of the table. |
key | STRING | The key of the item. |
value | STRING | The value of the item after the change. |
state_key_hash | STRING | The state key hash of the item slot. |
Count table item writes and deletes per day over one week. 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
Rank entry functions by user transactions on one day. Rank the tokenized assets deployed on Aptos by circulating market cap. List the Aptos tokens that carried a daily price over one week.
Notes
resources, modules and table_items are slices of changes: the writes that touched data stored under an account, the ones that published or upgraded code, and the ones that wrote to a contract’s own key-value store.
Above the raw tables sits the rest of the catalog, and Aptos shows up in two parts of it: the list of tokens we know about, with the daily prices they carry, and the tokenized assets issued on the chain. No app or trading-pool table covers Aptos.
Tokenized assets and Stablecoins cover the tokenized assets and their daily tables. Tokens covers the token list and the daily price table.