Contract ABI and functions (Read/Write Contract)
contract_abiLoad an EVM contract's ABI like a block explorer's Contract tab: Sourcify first, then Etherscan (when configured), else pass abi. Follows EIP-1967 proxies (shows the implementation's functions, calls still go to the proxy). Returns read (view/pure) and write functions with signatures, selectors, inputs, outputs and payable flags, plus warnings (third-party ABI, proxy, no code). Read-only. Powered by blocktools (ABI coding). How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chainId": "<chainId>",
"address": "<address>"
},
"name": "contract_abi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | No | Optional ABI JSON to use instead of the Sourcify / Etherscan lookup (labelled as pasted; not checked against source). | |
| address | Yes | Contract address (0x...) | |
| chainId | Yes | EVM chain id or name (1 eth, 8453 base, 42161 arbitrum, 10 optimism, 137 polygon, 56 bnb, 43114 avalanche, 59144 linea, 534352 scroll). |