BNB Smart Chain
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
BNB Smart Chain
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | transaction | object | Sí | 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 | Sí | Block at which to execute the call. Use hex block number or a named tag.Predeterminado: latest |
| 3 | stateOverrides | object | No | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers. |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
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.Parámetros
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.