eth_call
Execute read-only smart contract calls to retrieve on-chain data without sending transactions.
Instructions
Execute a read-only smart contract call without creating a transaction.
Args:
to (string): Contract address to call (20-byte hex, e.g., '0x...').
data (string): ABI-encoded function call data (hex string starting with 0x).
network (string, optional): Ethereum network to query. Defaults to 'mainnet'.
Returns:
Hexadecimal string containing the return value of the executed contract method.
Examples:
"Read ERC20 balance": { "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "data": "0x70a08231000000000000000000000000..." }
"Query on Sepolia": { "to": "0x...", "data": "0x...", "network": "sepolia" }
Errors:
InvalidParams: When 'to' address or 'data' format is invalid.
InternalError: When contract execution reverts or Infura API fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The address of the contract to call. | |
| data | Yes | The data to send with the call. | |
| network | No | The Ethereum network to query, e.g., 'mainnet' or 'sepolia'. | mainnet |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |