Skip to main content

Get contract state by prefix

POST 

/api/contract/get_prefix

Paged prefix scan of contract state. The body is the raw prefix bytes (at least 8 bytes).

The response is a VecPak map {rows, cursor}. rows is a VecPak map of key to value (an empty list when nothing matches), with the queried prefix stripped from each key. A page holds at most 1,000 rows or 1 MiB. cursor is the Base58 key of the page's last row, or nil on the last page; repeat the same request with ?cursor=<cursor> until it is nil. The SDK does this in sdk.contract.getPrefixEntries(). See Models.

Request​

Responses​

VecPak map {rows: map of key to value, cursor: string | nil}