read_contract
Retrieve data from smart contracts by calling view/pure functions without modifying blockchain state, gas fees, or signing. Supports 30+ Ethereum-compatible networks.
Instructions
Read data from a smart contract by calling a view/pure function. This doesn't modify blockchain state and doesn't require gas or signing.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
abi | Yes | The ABI (Application Binary Interface) of the smart contract function, as a JSON array | |
args | No | The arguments to pass to the function, as an array (e.g., ['0x1234...']) | |
contractAddress | Yes | The address of the smart contract to interact with | |
functionName | Yes | The name of the function to call on the contract (e.g., 'balanceOf') | |
network | No | Network name (e.g., 'ethereum', 'optimism', 'arbitrum', 'base', 'polygon') or chain ID. Defaults to Ethereum mainnet. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"abi": {
"description": "The ABI (Application Binary Interface) of the smart contract function, as a JSON array",
"type": "array"
},
"args": {
"description": "The arguments to pass to the function, as an array (e.g., ['0x1234...'])",
"type": "array"
},
"contractAddress": {
"description": "The address of the smart contract to interact with",
"type": "string"
},
"functionName": {
"description": "The name of the function to call on the contract (e.g., 'balanceOf')",
"type": "string"
},
"network": {
"description": "Network name (e.g., 'ethereum', 'optimism', 'arbitrum', 'base', 'polygon') or chain ID. Defaults to Ethereum mainnet.",
"type": "string"
}
},
"required": [
"contractAddress",
"abi",
"functionName"
],
"type": "object"
}