SwapTo
Uniswap V2 - SwapTo
Description
Swaps on Uniswap V2 without slippage and with recipient
address
Method
swapTo_noSlippageProtection(uint256,bytes32,address,address[])
Input Parameters
Name
Plugin Type
Description
to
FctAddress
FCT Uniswap library
Method Parameters
Name
Plugin Type
Description
amount
FctValue
Amount to use in the swap OR Amount to receive in the swap. This depends on the swap method
method
FctString
(hashed)
Method string. In the FCT it will be a hashed value
recipient
FctAddress
Address which recieves the swap tokens
path
FctAddressList
An array of token addresses. path.length
must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
Returned Values
Name
Plugin Type
Description
amountIn
FctValue
amountOut
FctValue
tokenIn
FctAddress
tokenOut
FctAddress
Example
Example with initParams
Example without initParams
Learn more
Learn more about Uniswap here
Last updated