Bigmap Table
GET /tables/bigmaps?args
Lists bigmap allocations and the most recent state of each bigmap. Use this table only when you have a very good reason, e.g. to search through all bigmaps of all contracts efficiently. A better way might be to use the explorer API endpoints.
- Schema
- Response
- Example
Field | Description |
---|---|
row_id uint64 | Unique row identifier. |
bigmap_id int64 | Unique on-chain id of the bigmap. |
account_id uint64 | Unique row_id of the account that owns the bigmap. |
alloc_height int64 | Height at which the bigmap was allocated on-chain. |
alloc_time datetime | Timestamp at which the bigmap was allocated on-chain. |
alloc_block hash | Hash of the block in which the bigmap was allocated. |
update_height int64 | Height at which the bigmap was last updated. |
update_time datetime | Timestamp at which the bigmap was last updated. |
update_block hash | Hash of the block in which the bigmap was last updated. |
delete_height int64 | Height when bigmap was deleted. |
delete_time datetime | Time of deletion. |
delete_block hash | Block hash at which bigmap was deleted. |
key_type string | Hex string with Micheline encoded type for bigmap keys. |
value_type string | Hex string with Micheline encoded type for bigmap values. |
n_keys int64 | Number of live bigmap keys after the last update. |
n_updates int64 | Total number of updates. |
[
[
9066, // row_id
9058, // bigmap_id
1478230, // account_id
1585347, // alloc_height
9, // n_keys
9, // n_updates
1585347, // update_height
0, // delete_height
"KT1PvEyN1xCFCgorN92QCfYjw3axS6jawCiJ", // contract
1628005298000, // alloc_time
"BLHBYPnzrqEszy6ZswFQkhc727hDbsYVNnWCTppdQnmqsh1fWDz", // alloc_block
1628005298000, // update_time
"BLHBYPnzrqEszy6ZswFQkhc727hDbsYVNnWCTppdQnmqsh1fWDz", // update_block
0, // delete_time
"", // delete_block
"0362", // key_type
"075e07650965000003ed076...", // value_type
]
]
curl "https://api.tzpro.io/tables/bigmaps?limit=1&order=desc"
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
)
// create a new query object
q := tzpro.DefaultClient.Contract.NewBigmapQuery()
// add filters and configure the query to list all active keys
q.WithLimit(1).WithOrder(tzstats.OrderDesc)
// execute the query
list, err := q.Run(context.Background())
// walk bigmaps
for _, row := range list.Rows {
// access BigmapRow structs
}