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 of Swap::input tokens to swap.
  • minimum_amount_out - Minimum amount of Swap::output tokens to receive.