Base
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Base
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
debug_storageRangeAt reads the raw storage trie of a contract deployed on Base, the Coinbase-built OP Stack rollup that settles to Ethereum L1 and meters gas in ETH. Given a block hash, a transaction index within that block, and a contract address, the node reconstructs the EVM state immediately after that transaction executed and returns a paginated slice of the contract's storage slots. Send the request to https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105). Because Base storage layouts mirror Ethereum's, each page is a map of keccak-hashed slot keys to their {key, value} pairs, with a nextKey cursor you feed back as startKey to walk the rest of the contract.
startKey to the final nextKey — for a post-mortem after an unexpected on-chain event.n-1 and index n within the same Base block.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockHash | string | Sí | Hash of the block containing the transaction of interest. |
| 2 | txIndex | integer | Sí | Index of the transaction within the block after whose execution the storage is read. |
| 3 | contractAddress | string | Sí | Address of the contract whose storage to inspect. |
| 4 | startKey | string | Sí | Storage key hash from which to begin iteration. Use `0x0000…0000` to start from the beginning. |
| 5 | limit | integer | Sí | Maximum number of storage entries to return in one call. |
| Tipo | Descripción |
|---|---|
| object | `{storage: Record<keyHash, {key: string, value: string}>, nextKey?: string}` — `nextKey` is present when more entries follow and can be passed as `startKey` for the next page. |
Try it live in the Base playground.
| Código | Mensaje | Causa |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Any required parameter is missing, malformed, or txIndex is out of range for the block. |
-32000 | block not found | Block hash not found or the node lacks state for that block (archive node required for historical blocks). |
keccak256(key . slot) yourself to match a value back to a Solidity variable.limit and follow nextKey rather than trying to pull the entire trie in one call.Parámetros
0x-prefixed 32-byte block hash
0-based index
0x-prefixed 20-byte address
0x-prefixed 32-byte storage key hash
e.g. 1024