The pool the swap is going to be performed in.
The asset that will be swapped (deposited in the contract).
Either the amount to swap (deposit) or the amount to receive depending on the swapForExact
parameter.
The maximum amount of slippage allowed in performing the swap.
If true
then amount
is what you want to receive from the swap. Otherwise, it's an amount that you want to swap (deposit).
Either the amount to swap (deposit) or the amount to receive depending on the swapForExact
parameter.
The asset that will be swapped (deposited in the contract).
The asset that will be received.
The effect of the swap computed at the time of construction.
The pool the swap is going to be performed in.
The maximum amount of slippage allowed in performing the swap.
If true
then amount
is what you want to receive from the swap. Otherwise, it's an amount that you want to swap (deposit). Note that the contracts do not support the "swap exact for" swap. It works by calculating the amount to deposit on the client side and doing a normal swap on the exchange.
Creates the transactions needed to perform the swap trade and returns them as a transaction group ready to be signed and committed.
The account that will be performing the swap.
A transaction group that when executed will perform the swap.
Generated using TypeDoc
Swap class represents a swap trade on a particular pool.
Typically, users don't have to manually instantiate this class. Use Pool.prepareSwap instead.