ExactOutputSingle
Uniswap V3 Action Plugin - ExactOutputSingle
Description
Swaps as little as possible of one token for amountOut
of another token
Method
exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))
Input Parameters
Name | Plugin Type | Description |
---|---|---|
to |
| Swap Router address |
Method Parameters
Name | Plugin Type | Description |
---|---|---|
params.tuple |
|
"Params.tuple" parameters
Name | Plugin Type | Required? | Description |
---|---|---|---|
tokenIn |
| Token to spend | |
tokenOut |
| Token to receive | |
fee |
| Fee of the pool | |
amountOut |
| Amount to receive in the swap | |
amountInMaximum |
| Max amount to spend in the swap | |
sqrtPriceLimitX96 |
| ||
recipient |
| ||
deadline |
|
Returned Values
Name | Plugin Type | Description |
---|---|---|
amountIn |
| The amount of tokenIn spent in the swap |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Uniswap V3 ExactOutputSingle function here
Last updated