pub fn swap<T: Config>(
    pool_id: T::PoolId,
    from_index: u32,
    to_index: u32,
    in_amount: u128,
    min_out_amount: u128,
    to: T::AccountId,
    deadline: BlockNumberFor<T>
)
Expand description

Swap a amounts of currencies to get other.

Argument

  • pool_id: The id of pool.
  • from_index: The index of swap currency id.
  • to_index: The index of receive currency id.
  • in_amount: The amounts of currencies swap.
  • min_mint_amount: The min amount of receive currency.
  • deadline: Height of the cutoff block of this transaction

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::swap.