Call contract (read-only)
call_contractRuns a read-only eth_call against a contract and decodes the result. Nothing is signed or sent: state changes are discarded. Give either raw "data" (0x-hex calldata), or "function" plus "args":
function is a name ("balanceOf") resolved against "abi" (a JSON ABI you pass) or, when abi is omitted, the contract's verified ABI from the explorer; or a full signature such as "balanceOf(address) returns (uint256)", which needs no ABI.
args is a JSON array: integers as decimal strings (or 0x-hex), addresses and bytes as 0x-hex, arrays as arrays, tuples as objects or arrays. Optional: from, value_wei, and block (number or hash, for historical state on an archive node). Returns the raw return data and, when an ABI is known, the decoded values. A revert returns its reason (untrusted) instead. Example: {"to": "0xd106…a214", "function": "balanceOf(address) returns (uint256)", "args": ["0x45a1…0248"]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | contract address | |
| abi | No | contract ABI as a JSON string; when omitted the explorer's verified ABI is used | |
| args | No | function arguments as a JSON array; big integers as decimal strings | |
| data | No | raw 0x-hex calldata; alternative to function+args | |
| from | No | sender address (optional) | |
| block | No | block number, hash or "latest" (default) | |
| function | No | function name resolved via abi or the verified ABI, or a full signature such as "balanceOf(address) returns (uint256)" | |
| value_wei | No | LAX to send with the call, in wei (decimal) |