Base
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Base
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getStorageAt reads the raw 32-byte value held at a single storage slot of a contract, letting you inspect state that no public view function exposes. Base runs a standard EVM as Coinbase's OP Stack optimistic rollup that settles to Ethereum L1 and pays gas in ETH, so its storage layout follows the same Solidity slot rules as Ethereum mainnet. Point the call at https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105) with a contract address, a slot index, and a block tag. The result is the 32-byte value at that slot, hex-encoded and left-padded with zeros.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | address | string (hex) | نعم | The contract whose storage to read. |
| 2 | storageSlot | string (hex) | نعم | Storage position to read. For mappings, this is the keccak256-derived slot. |
| 3 | blockTag | string | لا | Block at which to read.الافتراضي: latest |
| النوع | الوصف |
|---|---|
| string (hex) | 32-byte hex-encoded value stored at the slot, left-padded with zeros. |
Try it live in the Base playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Address or slot index is malformed. |
-32000 | Missing trie node | Historical block pruned on a non-archive node. |
keccak256(abi.encode(key, baseSlot)), so compute that hash before reading.المعاملات
0x-prefixed 20-byte contract address
0x-prefixed 32-byte slot index (e.g. "0x0")
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"