Build unsigned Comfy swap
comfy_build_swap_txBuild an unsigned ComfyRouter swap transaction from a fresh quote with sell-side approval steps, so an external wallet can review and sign without exposing keys.
Instructions
Build an UNSIGNED ComfyRouter transaction from a fresh quote. Sells include conditional ERC20-to-Permit2 and Permit2-to-router approval transactions, in order. Recipient receives output; the signing wallet supplies input. No keys, signatures or transaction submission. Values are decimal wei strings.
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": {
"token": "<token>",
"side": "<side>",
"amount": "<amount>",
"slippage_bps": "<slippage_bps>",
"recipient": "<recipient>"
},
"name": "comfy_build_swap_tx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| token | Yes | ||
| amount | Yes | Exact decimal human units: native 0G for buys, tokens for sells. No exponents. | |
| recipient | Yes | ||
| slippage_bps | Yes |