Skip to main content
POST
/
eth_getStorageAt
curl --request POST \
  --url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xAc586b65F3cd0627D2D05AdB8EF551C9d2D76E12",
    "0x0",
    "latest"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}
Monad API method that returns the value from a storage position at a given address. This method allows you to read the raw storage of smart contracts, which is useful for debugging and analyzing contract state.
Get you own node endpoint todayStart 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

  • data — the 20-byte address of the storage.
  • quantity — the position in the storage as a hexadecimal string.
  • quantity|tag — the block number as a hexadecimal string, or one of the following block tags:
    • latest — the most recent block in the canonical chain
    • earliest — the genesis block
    • pending — the pending state/transactions

Response

  • result — the value at this storage position, encoded as a 32-byte hexadecimal string.

eth_getStorageAt code examples

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

async function getStorageAt() {
  const contractAddress = "0xAc586b65F3cd0627D2D05AdB8EF551C9d2D76E12";
  const position = "0x0"; // Storage slot 0
  const value = await provider.getStorage(contractAddress, position);
  console.log(`Storage value at position 0: ${value}`);
}

getStorageAt();

Use case

A practical use case for eth_getStorageAt is reading private or internal state variables from smart contracts that are not exposed through public getter functions, or verifying that a contract’s storage layout matches expected values during audits.

Body

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

Response

200 - application/json

The value at the storage position.

jsonrpc
string
id
integer
result
string