bnbchain-mcp

Official
by bnb-chain
MIT License
353
2

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

NameRequiredDescriptionDefault
abiYesThe ABI of the smart contract function, as a JSON array
argsNoThe arguments to pass to the function
contractAddressYesThe address of the smart contract to interact with
functionNameYesThe name of the function to call on the contract
networkNoNetwork 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" }
ID: t6zbvd82tr