debug_storageRangeAt - Robinhood
debug_storageRangeAt. Returns a range of storage entries for an account at a given block and transaction index.
debug_storageRangeAt - robinhood [Value: 20CU]
Returns a page of storage slots for a contract, evaluated at a specific transaction's position within a block
Use cases
- Enumerate a contract's full storage layout for migration or auditing tooling
- Debug mapping or array storage layout issues in a deployed contract
Constraints
- Requires an archive node for blocks other than recent ones
- Only the hashed storage keys are returned, not the pre-image slot numbers
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://lb.drpc.live/robinhood/{API-KEY} \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"debug_storageRangeAt",
"params":["0x54d353c9ebe37c05091f4e063d3f331e48cab4362ab0ff86f05ebea58138bf96", 0, "0x3ccC78545F675A188B7521F7f4b4791995752635", "0x0000000000000000000000000000000000000000000000000000000000000000", 10],
"id":1,
"jsonrpc":"2.0"}'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"storage": {
"0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56": {
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
"value": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
},
"nextKey": null
}
}Request params
idinteger
jsonrpcstring
methodstring
array
blockHashstring
The hash of the block to read storage at.
txIndexinteger
The index of the transaction within the block to evaluate storage after.
addressstring
The contract address to read storage for.
startKeystring
The paging offset, as the hash of a storage key.
limitinteger
The maximum number of storage entries to return in this page.
Response
200
A page of the contract's storage entries, plus a cursor for the next page if there is oneResponse params
object
idinteger
jsonrpcstring
resultobject
The requested page of contract storage.
object
storageobject
A map keyed by the hash of the storage slot, with the slot's key and value.
object
keystring
The storage slot key.
valuestring
The value stored at that slot.
nextKeystring
The hash of the next key if more storage remains in range, otherwise omitted.