read_contract
Retrieve data from smart contracts by calling view/pure functions using the contract address, ABI, and function name. Supports multiple networks including BSC, Ethereum, and Base.
Instructions
Read data from a smart contract by calling a view/pure function
Input Schema
Name | Required | Description | Default |
---|---|---|---|
abi | Yes | The ABI of the smart contract function, as a JSON array | |
args | No | The arguments to pass to the function | |
contractAddress | Yes | The address of the smart contract to interact with | |
functionName | Yes | The name of the function to call on the contract | |
network | No | Network name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet. | bsc |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"abi": {
"description": "The ABI of the smart contract function, as a JSON array",
"type": "array"
},
"args": {
"description": "The arguments to pass to the function",
"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",
"type": "string"
},
"network": {
"default": "bsc",
"description": "Network name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet.",
"type": "string"
}
},
"required": [
"contractAddress",
"abi",
"functionName"
],
"type": "object"
}