Ethereum
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Ethereum
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
debug_storageRangeAt walks the raw storage trie of a contract on Ethereum mainnet (chain ID 1, native coin ETH) and hands back a page of slots exactly as they stood after a chosen transaction executed inside a block. You point it at a block hash, a transaction index within that block, and a contract address, then iterate from a starting storage key. Because mainnet contracts can hold huge storage tries, the result comes back paginated — a nextKey cursor tells you where to resume. Send the request to https://ethereum.therpc.io/YOUR_API_KEY. This is execution-layer introspection, so it needs a debug-enabled archive node to reach the historical state.
txIndex and txIndex - 1, isolating exactly which slots a drained protocol touched.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockHash | string | نعم | Hash of the block containing the transaction of interest. |
| 2 | txIndex | integer | نعم | Index of the transaction within the block after whose execution the storage is read. |
| 3 | contractAddress | string | نعم | Address of the contract whose storage to inspect. |
| 4 | startKey | string | نعم | Storage key hash from which to begin iteration. Use `0x0000…0000` to start from the beginning. |
| 5 | limit | integer | نعم | Maximum number of storage entries to return in one call. |
| النوع | الوصف |
|---|---|
| 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 Ethereum playground.
| الكود | الرسالة | السبب |
|---|---|---|
-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). |
mapping(address => uint) entry is stored at keccak256(key . slot), so you have to recompute the hash yourself to know which logical field a slot belongs to — the method does no decoding for you.block not found unless you hit an archive node.limit, follow nextKey across pages, and don't try to pull an entire stablecoin's balance trie in a single call.المعاملات
0x-prefixed 32-byte block hash
0-based index
0x-prefixed 20-byte address
0x-prefixed 32-byte storage key hash
e.g. 1024