Pre-signing check of a contract call (unsigned, nothing sent)
contract_approve_callPre-signing verdict for one EVM contract call: builds the calldata, re-encodes it with the full ABI and exact signature, builds an unsigned tx (placeholder nonce and gas; the wallet sets the real ones), approves the calldata against the ABI (blocktools evmApproveCall: ok, unknown_selector or bad_calldata) and checks the unsigned tx with blocktools verifyTx. verifyTx refuses by default an approval of 2^128 or more, unasserted inner calls (multicall, Safe) and delegatecall; optional expect_spender, expect_amount, expect_unlimited, expect_recipient, expect_value, allow_inner_call and allow_delegatecall state what the user intends (failures such as spender_not_expected, amount_not_expected, recipient_not_expected, value_not_expected). Returns verdict pass or fail with reasons, the data, target and value, verifyTx's CHECK THESE text and its approvals, transfers and inner_calls. Show the verdict before the user signs; do not send on fail. SwapChan never signs, sends or broadcasts. 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>",
"function": "<function>"
},
"name": "contract_approve_call"
}
}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). | |
| args | No | Arguments in order; arrays/tuples as JSON lists, big numbers as decimal strings. | |
| value | No | Wei to send (payable functions only) | |
| 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). | |
| function | Yes | Function name, or the full signature for overloads, e.g. "balanceOf" or "get(uint256)" | |
| expect_value | No | Exact native value in wei; else value_not_expected | |
| expect_amount | No | Exact approval or transfer amount (base units); else amount_not_expected | |
| expect_spender | No | Spender any approval must name; else spender_not_expected | |
| allow_inner_call | No | Inner calls allowed inside multicall / Safe, as "TO:SELECTOR"; else inner_calls_not_asserted | |
| expect_recipient | No | Recipient any token transfer must pay; else recipient_not_expected | |
| expect_unlimited | No | Allow an unlimited approval to expect_spender (needs expect_spender; not with expect_amount) | |
| allow_delegatecall | No | Targets a Safe delegatecall may reach; else delegatecall |