TriportRPC

eth_getStorageAt

Last updated:

eth_getStorageAt reads a single 32-byte word directly out of a contract's storage trie. Every smart contract has a flat key→value storage space indexed by 256-bit slot numbers; this method returns the raw value at one slot, exactly as the EVM sees it, as a 0x-prefixed 32-byte hex string.

Use it to inspect contract state that is not exposed by a public getter — for example, reading a proxy's implementation slot, a token's packed balance/total state, or any internal variable when you have computed its slot. By varying the third parameter (the block tag) you can read the slot as of the latest block, a pending block, or any historical block height.

You are responsible for knowing the layout of the contract you are querying. Solidity assigns simple state variables to sequential slots starting at 0, while mapping and dynamic-array entries live at slots derived with keccak256. The method does no decoding: a slot that has never been written returns all-zeroes (0x0000…0000).

Parameters

This method takes no parameters.

Returns

eth_getStorageAt return value
FieldType
resultobject

Examples

curl https://triport.io/eth \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"id":1,"method":"eth_getStorageAt","params":[],"jsonrpc":"2.0"}'
const res = await fetch("https://triport.io/eth", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/eth",
    headers={"Authorization": "Bearer <api-key>"},
    json={"id":1,"method":"eth_getStorageAt","params":[],"jsonrpc":"2.0"},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 1 per call.

FAQ

What does eth_getStorageAt do?
Returns the 32-byte value stored at a given storage slot of a contract, at a specific block.
How many credits does eth_getStorageAt cost?
eth_getStorageAt costs 1 credit(s) per call on Triport by default.
Is eth_getStorageAt available over WebSocket?
eth_getStorageAt is an HTTP JSON-RPC method.