BNB Smart Chain
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
BNB Smart Chain
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getStorageAt reads one slot at a block boundary. debug_storageRangeAt goes much deeper: it walks a contract's storage slots in pages, starting from a key hash you supply and returning up to your requested limit, captured at the state that exists immediately after a specific transaction inside a block. On BNB Smart Chain (BSC), where BEP-20 contracts power apps such as Venus and PancakeSwap and gas is paid in BNB, that mid-block snapshot is exactly what an incident review needs. Issue the call against chain ID 56 at https://bsc.therpc.io/YOUR_API_KEY. The method rebuilds historical state, which is heavy work, so it leans on a debug-enabled archive node.
| # | 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 BNB Smart Chain 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). |
limit and follow nextKey page by page. Expect throttling on lower tiers.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