🔵 Base
debug_storageRangeAt

🛠️ debug_storageRangeAt RPC Method (Base Chain)

The debug_storageRangeAt method allows you to read smart contract storage from a specified block hash, transaction index, and storage key range. This method is useful for inspecting contract storage state during or after execution on Base, an Ethereum Layer 2 by Coinbase.

Parameters

  • block hash (required) — Hash of the block.
  • txIndex (required) — Transaction index at which storage should be inspected.
  • address (required) — Address of the contract to query.
  • startKey (optional) — Starting point in the contract's storage (usually a hashed key).
  • limit (required) — Number of storage entries to return.

Need RPC API keys?

Get 12.5M archival requests for free today.

Returns

  • storage — An object where each entry includes:
    • hash — The storage slot hash.
      • key — The original key mapped to that hash.
      • value — The value stored at that key.
  • nextKey (optional) — If present, this key can be used to continue iterating through storage entries.

Request

POST https://base-mainnet.chainnodes.org/YOUR-API-KEY

đź’ˇ Confusing?

Ask our experienced blockchain developers in Telegram

Example

  • HTTPS POST Request with a JSON-RPC call in the body
  • Replace YOUR-API-KEY with the API key from your CHAINNODES Dashboard (opens in a new tab)
  • You can use a different supported network by replacing base-mainnet
curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0xe9793319714333112d41473d33bc06556b6d32d347517b782eb1cdaec296a20b",5,"0xdAC17F958D2ee523a2206206994597C13D831ec7","0x00000000000000000000000000000000",2],"id":1}'

Body

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "storage": {
      "0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563": {
        "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "value": "0x000000000000000000000000c6cde7c39eb2f0f0095f41570af89efc2c1ea828"
      },
      "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6": {
        "key": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "value": "0x000000000000000000000000000000000000000000000000007d5a864f06b2d5"
      }
    },
    "nextKey": "0x0000000000000000000000000000000000000000000000000000000000000007"
  }
}