eth_call

The eth_call method executes a new message call immediately without creating a transaction on the blockchain. This method is essential for reading data from smart contracts, such as querying token balances, reading contract state, or calling view/pure functions.

It simulates a transaction execution without requiring gas fees or waiting for block confirmation, making it perfect for read-only contract interactions. Developers use this extensively for querying ERC-20 token balances, reading NFT metadata, checking allowances, validating transaction outcomes before sending, and calling any contract view function. The method executes against the state at a specific block, allowing both current and historical state queries without modifying the blockchain.


Parameters

parameter
type
description
transaction
object (required)
Transaction call object containing the details of the call
blockParameter
string (required)
Block number in hex format (e.g., '0x10d4f') or one of the string tags: 'latest', 'earliest', or 'pending'
Transaction Object Properties:
property
type
description
from
string (optional)
The address the call is sent from (20-byte hex string). If omitted, a zero address is used
to
string (required)
The address the call is directed to (20-byte hex string)
gas
string (optional)
Gas provided for the call execution (hex). If omitted, the node uses a default value
gasPrice
string (optional)
Gas price for the call (hex). Usually not necessary for read calls
value
string (optional)
Value sent with the call in wei (hex). Defaults to 0 if omitted
data
string (optional)
The encoded function call data (method signature and parameters encoded as hex)
Return Object
field
type
description
result
string
The return value of the executed contract function encoded as a hexadecimal string. This is the raw ABI-encoded return data which must be decoded based on the function's return type. For example, a uint256 return value would be a 32-byte hex string, while complex types like structs or arrays require ABI decoding.
Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?