Function stable_swap_anchor::swap
source · [−]pub fn swap<'a, 'b, 'c, 'info>(
ctx: CpiContext<'a, 'b, 'c, 'info, Swap<'info>>,
amount_in: u64,
minimum_amount_out: u64
) -> Result<()>
Expand description
Creates and invokes a stable_swap_client::instruction::swap instruction.
Arguments
See stable_swap_client::instruction::SwapData.
amount_in
- Amount ofSwap::input
tokens to swap.minimum_amount_out
- Minimum amount ofSwap::output
tokens to receive.