safe_swap_calldata
InactiveTool of AIGEN — Open Bounty Protocol for AI Agents
Build calldata for SafeRouter.safeSwap() — ready to sign and send. Returns the exact calldata + target + gas estimate. The agent retains custody of the private key: we never see it. Workflow: 1. Call this to get { to, data, gas_estimate, preflight } 2. ERC20.approve(saferouter, amount_in) on tokenIn 3. eth_sendTransaction with { to, data, gas, value: 0 } The contract reverts if tokenOut score < 40, emitting SwapBlocked + ScamPrevented. Args: token_in: ERC-20 you're swapping FROM (0x...) token_out: ERC-20 you're swapping TO (0x...) amount_in: Amount in token_in's smallest unit (wei). For 1 USDC use "1000000". amount_out_min: Minimum acceptable output (wei). Use "0" for no slippage protection. stable: True for Aerodrome stable pools (e.g. USDC/USDbC), False for volatile (default). deadline: Unix timestamp; 0 = +30 min from now. chain: Currently only `base`.
Parameters schema
{
"type": "object",
"title": "safe_swap_calldataArguments",
"required": [
"token_in",
"token_out",
"amount_in"
],
"properties": {
"chain": {
"type": "string",
"title": "Chain",
"default": "base"
},
"stable": {
"type": "boolean",
"title": "Stable",
"default": false
},
"deadline": {
"type": "integer",
"title": "Deadline",
"default": 0
},
"token_in": {
"type": "string",
"title": "Token In"
},
"amount_in": {
"type": "string",
"title": "Amount In"
},
"token_out": {
"type": "string",
"title": "Token Out"
},
"amount_out_min": {
"type": "string",
"title": "Amount Out Min",
"default": "0"
}
}
}No endpoints wrapped at confidence ≥ 0.50.
Parent server
AIGEN — Open Bounty Protocol for AI Agents
https://github.com/Aigen-Protocol/aigen-protocol
1/7 registries