Skip to main content

state_queryStorageAt

Using the supplied key, get storage entries beginning with the block hash that is indicated in the second parameter.

Example Request and Result for state_queryStorageAt method

In this section, we provide an illustrative example of a request made to retrieve details contents using the state_queryStorageAt method. Additionally, we present the resulting response containing information about the storage entries starting with the block hash provided.

Parameters

FieldsTypeDescription
blockhashstring

The hash of a specific block in the chain. If not provided, the request will return the runtime version from the latest block.

keys*

array<string>

An array representing the key or keys for which you want to retrieve storage entries

info

The example in this section uses a non-existing project id.

Make sure you replace it with your Vara Mainnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Retrieve storage entries, using the provided key, starting from the specified block

POST https://vara-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription
blockhashstring0xe0ee3872c50b4d0d8ca568679beb7e9e29e6d2caa30a52085c0a34b3a137e734
keys*array[string][0x06de3d8a54d27e44a9d5ce189618f22d4e7b9012096b41c4eb3aaf947f6ea429]
{
"jsonrpc": "2.0",
"result": [
{
"block": "0x1d9ef9fefbc7f42ebd468df1546796518332884c1df90db1bf01b97b3fadf736",
"changes": [
[
"0x06de3d8a54d27e44a9d5ce189618f22d4e7b9012096b41c4eb3aaf947f6ea429",
null
]
]
}
],
"id": 1
}

Curl Request example

curl --location 'https://vara-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "state_queryStorageAt",
"params":
{
"keys":["0x06de3d8a54d27e44a9d5ce189618f22d4e7b9012096b41c4eb3aaf947f6ea429"],
"blockhash": "0xe0ee3872c50b4d0d8ca568679beb7e9e29e6d2caa30a52085c0a34b3a137e734"
}
}'