POST
/
efb0a5eccd2caa5135eb54eba6f7f300
curl --request POST \
  --url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "id": 1,
  "params": [
    "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
    "0x7",
    "latest"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}

Optimism API method eth_getStorageAt retrieves the value from a specific storage position of a contract at a given address. This method is useful for inspecting the state of smart contracts at specific points in their execution or at a particular block.

This example makes a call to slot 7 of the USDC contract on the Optimism Mainnet.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • address — the address of the contract to access.
  • position — the storage position to inspect, given as a hexadecimal value.
  • block — the block number (in hexadecimal) or one of the strings "earliest", "latest", or "pending", indicating the state to consider. The default is "latest".

Response

  • result — the value from the specified storage position at the given address, returned as a hexadecimal string.

Use case

The eth_getStorageAt method is essential for:

  • Developers and auditors who need to verify the state and behavior of smart contracts by inspecting their storage.
  • DApps that require access to contract state that is not exposed through contract methods.
  • Tools and services that monitor contract state for changes, updates, or anomalies.

Body

application/json
jsonrpc
string
default:2.0
required
method
string
default:eth_getStorageAt
required
id
integer
default:1
required
params
string[]
required

Response

200 - application/json
The value from the specified storage position
jsonrpc
string
id
integer
result
string