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.
eth_call runs a contract function as a pure simulation against a chosen block's state. BNB Smart Chain, the BNB-native geth-equivalent EVM that hosts PancakeSwap and Venus, executes the bytecode locally and hands back the ABI-encoded output. Nothing is broadcast. No validator includes the call, and not a single wei of BNB leaves the caller's account. Send the request to https://bsc.therpc.io/YOUR_API_KEY at chain ID 56, and the result matches exactly what the contract would have produced on-chain.
balanceOf, decimals, symbol, or totalSupply for any token contract.getReserves or quote a spot price directly from a Venus market.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | transaction | object | Ja | Transaction object. Required fields: `to` (target contract). Optional: `from` (msg.sender), `gas` (hex), `gasPrice` (hex), `value` (hex wei), `data` (ABI-encoded calldata). |
| 2 | blockTag | string | object | Ja | Block at which to execute the call. Use hex block number or a named tag.Standard: latest |
| 3 | stateOverrides | object | Nein | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers. |
| Typ | Beschreibung |
|---|---|
| string | Hex-encoded return data from the executed function. Decode with the contract ABI. If the call reverts, an error with code -32000 or 3 is returned instead. |
Try it live in the BNB Smart Chain playground.
| Code | Meldung | Ursache |
|---|---|---|
3 | execution reverted | The EVM reverted the call. Error data contains the revert reason. |
-32602 | invalid argument | Malformed transaction object or missing required `to` field. |
-32000 | execution reverted | Node-level revert without revert data (e.g. out-of-gas within the call, or require with no message). |
latest reflects that instant only. With ~3s BSC blocks, state can shift before your transaction is mined, so treat the value as advisory rather than a promise.Parameter
Transaction object. Required fields: `to` (target contract). Optional: `from` (msg.sender), `gas` (hex), `gasPrice` (hex), `value` (hex wei), `data` (ABI-encoded calldata).
"latest" | "safe" | "finalized" | "earliest" | "pending" | hex block number
Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers.