eth_getStorageAt - HyperEVM

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

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

Parameters

Parameter
Type
Required
Description

address

string

Yes

Address of the contract.

position

string

Yes

Storage position (hex).

block

string

Yes

Block parameter (only "latest" supported).

Request

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

Response

Response (JSON)
{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}

Response Parameters

Field
Type
Description

result

string

Storage value at the position (32 bytes, hex).

Use Case

The eth_getStorageAt method is essential for:

  • Reading contract storage directly

  • Debugging smart contracts

  • Analyzing contract state

  • Security auditing

  • Reverse engineering contract data

Error Handling

Error Code
Message
Cause

-32602

Invalid params

Invalid address or position.

-32603

Internal error

Node issue.

Web3 Integration

Last updated

Was this helpful?