post https://api.zan.top/node/v1/polygon/mainnet/
Executes a call to a read-only function of a smart contract immediately without creating a transaction on the blockchain.
Limits:
To prevent API abuse, the
gas
parameter in eth_estimateGas and eth_call is capped at 10x (1000%) the current block gas limit. You can recreate this behavior in your local test environment (Ganache, Besu, Geth or other client) via therpc.gascap
command-line option.
Request Parameters
- TRANSACTION CALL OBJECT [required]
- from: [optional] 20 Bytes - The address the transaction is sent from.
- to: 20 Bytes - The address the transaction is directed to.
- gas: [optional] hexadecimal value of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.
- gasPrice: [optional] hexadecimal value of the gasPrice used for each paid gas.
- maxPriorityFeePerGas: [optional] Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. See EIP-1559 transactions.
- maxFeePerGas: [optional] Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. See EIP-1559 transactions.
- value: [optional] hexadecimal value of the value sent with this transaction.
- data: [optional] Hash of the method signature and encoded parameters. See the Ethereum contract ABI specification.
- BLOCK PARAMETER [required] - a hexadecimal block number, or the string "latest", "earliest" or "pending". See the default block parameter.
Response
The return value of the executed contract method.
Result Fields
- RETURN VALUE - the return value of the executed contract method.
Examples
Example Responses
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000052663b0048aa576c0"
}