eth_call_contract
Execute a read-only eth_call against a smart contract. Params: to (contract address), data (hex-encoded calldata), block (default 'latest'). Returns the raw hex result. Use eth_encode_function to build calldata from a function signature and arguments.
Parameters3
| to | string | required | Contract address (hex, with or without 0x prefix) |
| data | string | required | Hex-encoded calldata (with or without 0x prefix) |
| block | string | null | optional | Block parameter ('latest', 'earliest', 'pending', or hex block number). Default: 'latest' |
Raw schema
{
"type": "object",
"properties": {
"to": {
"description": "Contract address (hex, with or without 0x prefix)",
"type": "string"
},
"data": {
"description": "Hex-encoded calldata (with or without 0x prefix)",
"type": "string"
},
"block": {
"description": "Block parameter ('latest', 'earliest', 'pending', or hex block number). Default: 'latest'",
"type": [
"string",
"null"
]
}
},
"required": [
"to",
"data"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "EthCallContractParams"
}