BNB Smart Chain
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
BNB Smart Chain
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Every account on BNB Smart Chain lives inside a Merkle-Patricia trie rooted in each block header: its BNB balance, nonce, code hash, and storage. eth_getProof returns an account's core fields together with cryptographic trie proofs for that account and any storage slots you request, so a verifier can confirm the values against a known state root rather than trusting the node. Issue the request to https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 and you receive accountProof plus a storageProof array, the raw material for trustless reads from a fast-finality PoSA chain.
totalSupply storage slot against a trusted block header.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | address | string (hex) | Ja | The account to generate proofs for. |
| 2 | storageKeys | array of string (hex) | Ja | Storage slots to include in the storage proof. |
| 3 | blockTag | string | Nein | Block at which to generate the proof.Standard: latest |
| Typ | Beschreibung |
|---|---|
| object | Object containing: address, balance (hex wei), codeHash (hex), nonce (hex), storageHash (hex), accountProof (array of hex-encoded RLP trie nodes), storageProof (array of {key, value, proof} objects). |
Try it live in the BNB Smart Chain playground.
| Code | Meldung | Ursache |
|---|---|---|
-32602 | Invalid params | Address malformed or a storage key is not 32 bytes. |
-32000 | Missing trie node | Block is too old and the node has pruned state (non-archive node). |
eth_getStorageAt is far less work.accountProof up to its root and match it against the stateRoot in that block's header. Skip that step and the data proves nothing.Parameter
0x-prefixed 20-byte address
array of 32-byte hex slot indices, may be empty []
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"