Build MC↔MG Swap Transaction
build_amm_swap_txBuild a two-step plan to swap MEGACHAD↔MEGAGOONER through MegaChadLP: ERC20.transfer(pair, amountIn) → pair.swap(amountAIn, amountBIn, to). MegaChadLP has no on-chain minOut — verify your received balance after the swap. Slippage is computed off-chain and surfaced as minOut.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Input token | |
| amount | Yes | Input amount in human units (e.g. "1000") | |
| recipient | Yes | Receive address (0x...) | |
| slippageBps | No | Slippage tolerance in bps (default 200 = 2%) |