BNB Smart Chain
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
BNB Smart Chain
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | transaction | object | Oui | 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 | Oui | Block at which to execute the call. Use hex block number or a named tag.Défaut : latest |
| 3 | stateOverrides | object | Non | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers. |
| Type | Description |
|---|---|
| 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 | Message | Cause |
|---|---|---|
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.Paramètres
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.