V3Estimator
Last updated
Last updated
This contract estimates v3 swap amounts
Github Link: (Will be updated after official launch)
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
pool
contract IUniswapV3Pool
The address of the pool
token
address
The token being swapped in
amountIn
uint256
The desired input amount
amountOut
uint256
The amount of the token that would be received
sqrtPriceX96After
uint160
The sqrt price after the swap
pool
contract IUniswapV3Pool
The address of the pool
token
address
The token being swapped out
amountOut
uint256
The desired output amount
amountIn
uint256
The amount required as the input for the swap in order to receive amountOut
sqrtPriceX96After
uint160
The sqrt price after the swap
pool
contract IUniswapV3Pool
The address of the pool
zeroForOne
bool
Is swap direction 0 -> 1?
amountSpecified
int256
The specified amount of token
amount0
int256
The changed amount of token0
amount1
int256
The changed amount of token1
sqrtPriceX96After
uint160
The sqrt price after the swap