Skip to main content
EVM
Archive

eth_getStorageAt

Summary: Get value from storage

This request returns the value from the given storage position of the provided contract's or externally owned account's (EOA).

Parameters

address string
required

A string identifier for the contract or EOA address (20 bytes).

Pattern: ^0x[0-9a-fA-F]{40}$


storageSlot string
required

The storage position or index, in hexadecimal.

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$


block anyOf
required

Block number, block hash, or string tag.

Block number string

Block number in hexadecimal.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Block tag enum

See the default block parameter.

  • earliest: The lowest numbered block the client has available.
  • finalized: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination.
  • latest: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
  • pending: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool.

Enum:
"earliest"
"finalized"
"latest"
"pending"
Block hash string

32 byte hex value.

Pattern: ^0x[0-9a-f]{64}$

Returns

eth_getStorageAtResponse string

The data stored in the specified storage position at the specified address, in hexadecimal.

Pattern: ^0x[0-9a-f]*$

Customize request
Parameter
Value
string
string
latest
anyOf
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0x7d43aabc515c356145049227cee54b608342c0ad","0x5","latest"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "\"0x00000000000000000000000034dfa1226f8b3e36fe597b34eea809a2b5c0bbf9"
}