For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getStorageAt - Flashblocks

Example code for the eth_getStorageAt Flashblock method. Complete guide on how to use eth_getStorageAt Flashblock in GetBlock Web3 documentation.

This returns the value stored at a specific storage slot of a contract. When called with "pending", reflects storage changes from every transaction preconfirmed into the latest Flashblock — letting applications read intermediate contract state before block seal.

Parameters

Parameter
Type
Required
Description

address

DATA (20 bytes)

Yes

Contract address

slot

QUANTITY

Yes

Storage slot index (hex)

block

QUANTITY

TAG

Yes

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getStorageAt",
    "params": [
        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "0x0",
        "pending"
    ],
    "id": "getblock.io"
}'
import axios from 'axios';

const data = JSON.stringify({
    "jsonrpc": "2.0",
    "method": "eth_getStorageAt",
    "params": [
        "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "0x0",
        "pending"
    ],
    "id": "getblock.io"
});

const config = {
    method: 'post',
    url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
    headers: {
        'Content-Type': 'application/json'
    },
    data: data
};

axios(config)
    .then(response => console.log(JSON.stringify(response.data, null, 2)))
    .catch(error => console.log(error));

Response Example

Response Parameters

Field
Type
Description

result

DATA (32 bytes)

Value at the storage slot, reflecting preconfirmed state

Use Cases

  • Reading contract state that has been updated by preconfirmed transactions

  • Monitoring internal state changes in real-time (e.g. AMM reserves, oracle prices)

  • Auditing tools that need to-the-Flashblock state visibility

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?