Avalanche
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Avalanche
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
eth_call executes a read-only message call against the Avalanche C-Chain EVM without broadcasting a transaction or spending any AVAX. The node simulates the call against a chosen block's state and returns the function's raw output, so it is the workhorse behind every "view" lookup on Avalanche — token balances, DEX prices, allowance checks. Point it at https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114) and nothing is written to the chain; you only read its state.
balanceOf, decimals, symbol, or totalSupply for tokens like USDC or WAVAX on the C-Chain.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transaction | object | Sim | 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 | Sim | Block at which to execute the call. Use hex block number or a named tag.Padrão: latest |
| 3 | stateOverrides | object | Não | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers. |
| Tipo | Descrição |
|---|---|
| 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 Avalanche playground.
| Código | Mensagem | 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 can shift between your call and actual transaction inclusion; with ~1–2s C-Chain blocks the window is short but real, so do not treat the result as a settlement guarantee.3 or -32000), not as a special field in the result — always handle the error path and decode the revert reason from the error data.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.