ExactInputSingle
Uniswap V3 Action Plugin - ExactInputSingle
Description
Swaps amountIn
of one token for as much as possible of another token
Method
exactInputSingle((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 | |
amountIn |
| Amount to spend in the swap | |
amountOutMinimum |
| Min amount to receive | |
sqrtPriceLimitX96 |
| ||
recipient |
| ||
deadline |
|
Returned Values
Name | Plugin Type | Description |
---|---|---|
amountOut |
| The amount of tokenOut received in the swap |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Uniswap V3 ExactInputSingle function here
Last updated