debug_storageRangeAt
The debug_storageRangeAt method returns a range of storage values for a given contract address at a specific block and transaction index. This method allows efficient pagination through contract storage without retrieving all storage slots at once.
This method is essential for analyzing contract state, debugging storage layout issues, and auditing contract data on the Kaia network. Developers can use it to inspect contract storage at specific points in time, verify storage slot values, understand how contracts organize their data, debug storage collisions, and build storage explorers. The pagination capability makes it practical to examine contracts with large storage footprints by retrieving storage in manageable chunks. This is particularly useful for reverse engineering contract behavior and verifying state transitions.
This method is available only on the full archive node.
Parameters
parameter | type | description |
|---|---|---|
blockHash | string (required) | Hash of the block (32-byte hex string with 0x prefix) |
txIndex | number (required) | Transaction index position in the block (integer) |
contractAddress | string (required) | Address of the contract whose storage to query (20-byte hex string with 0x prefix) |
keyStart | string (required) | Starting storage key (32-byte hex string with 0x prefix). Use '0x0000000000000000000000000000000000000000000000000000000000000000' to start from the beginning |
maxResult | number (required) | Maximum number of storage entries to return (integer) |
Return Object
The method returns an object containing storage entries and pagination information:
field | type | description |
|---|---|---|
storage | object | Map of storage keys to storage objects, where each object contains 'key' (the storage slot) and 'value' (the data stored at that slot) |
nextKey | string | The key to use for the next page of results, or null if this is the last page. Use this value as keyStart in the next call to retrieve the next batch of storage entries |
Request Example
Response Example