BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
A contract on BNB Smart Chain keeps its state in 32-byte slots. eth_getStorageAt reads one of those slots directly. No ABI and no getter function required. You supply the contract address plus the slot index and a block tag, and the method returns the raw 32-byte word found there, zero-padded on the left. Since BNB Smart Chain is a geth-equivalent EVM funded by BNB, the slot layout matches what any Solidity compiler would produce. Send the call to https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 when you need to peek at storage the contract never exposes publicly.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 BNB Smart Chain 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)), which you must hash before querying.المعاملات
0x-prefixed 20-byte contract address
0x-prefixed 32-byte slot index (e.g. "0x0")
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"