Read contract
read_contractCall a view or pure function on a smart contract and return its decoded result without sending a transaction. Use this to read on-chain data at a specific block.
Instructions
Call a view or pure function on a contract and return its decoded result. Nothing is sent to the chain. For state-changing functions, use simulate_call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | Yes | ABI containing the function (a single fragment is enough). Either a JSON ABI (array of items, or a single item), or human-readable signatures such as ["function balanceOf(address owner) view returns (uint256)", "event Transfer(address indexed from, address indexed to, uint256 value)"]. | |
| args | No | Function arguments in order. Integers may be numbers or decimal/0x-hex strings (use strings above 2^53). Tuples may be arrays or objects keyed by component name. | |
| block | No | Block to read at. Defaults to latest. An integer block number or a tag: latest, safe, finalized, earliest, pending. | |
| address | Yes | Contract address. 0x followed by 40 hex characters. | |
| functionName | Yes | Name of the function to call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Decoded return value. Integers are decimal strings; multiple outputs are an array or object. | |
| address | Yes | ||
| signature | Yes | The resolved function signature, e.g. balanceOf(address). | |
| functionName | Yes |