eth_getStorageAt - Mantle

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

This method returns the value from a storage position at a given address on the Mantle network.

Parameters

Parameter
Type
Description

address

string

20-byte storage address

position

string

Storage position (hex)

blockParameter

string

Block number in hex, or "latest", "earliest", "pending"

Request examples

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

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Response Parameters

Field
Type
Description

jsonrpc

string

JSON-RPC protocol version ("2.0")

id

string

Request identifier matching the request

result

string

Value at storage position (32 bytes, hex)

Use Case

The eth_getStorageAt method is essential for:

  • Reading raw contract storage

  • Smart contract state inspection

  • Protocol analysis

  • Security auditing

  • Debugging contract behavior

  • Direct storage slot access

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

-32602

Invalid params

Invalid address or position

Web3 Integration

Last updated

Was this helpful?