Execute a swap
execute_swapExecute exact-input single-hop swaps on Robinhood Chain using Uniswap v4. Dry-run mode returns plan without sending; real run enforces minAmountOut and uses Permit2 approvals.
Instructions
Execute an exact-input single-hop swap through Robinhood Chain's Uniswap v4 UniversalRouter (no deployed contract needed). SAFETY: dryRun defaults to true (returns the plan + which Permit2 approvals a real run would send, without sending); amountIn is capped by RHC_MAX_SWAP_AMOUNT; a real minAmountOut is always enforced (from the arg or a fresh quote minus slippageBps). ERC-20 input flows through Permit2. Output is taken to the signer. Requires RHC_PRIVATE_KEY to actually send.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | pool fee (default 3000) | |
| dryRun | No | default true; set false to actually send the transaction | |
| tokenIn | Yes | input token symbol or 0x address | |
| amountIn | Yes | human-readable input amount | |
| tokenOut | Yes | output token symbol or 0x address | |
| recipient | No | must equal the signer if given; output is always taken to the signer | |
| slippageBps | No | slippage tolerance in bps when minAmountOut omitted (default 50 = 0.5%) | |
| tickSpacing | No | pool tick spacing (default 60) | |
| minAmountOut | No | explicit minimum output (human units); overrides slippageBps |