2021-11-19 08:29:07 +00:00
|
|
|
pragma solidity ^0.7.6;
|
|
|
|
pragma abicoder v2;
|
|
|
|
|
|
|
|
interface UniswapV3Pool {
|
|
|
|
struct Slot0 {
|
|
|
|
uint160 sqrtPriceX96;
|
|
|
|
int24 tick;
|
|
|
|
uint16 observationIndex;
|
|
|
|
uint16 observationCardinality;
|
|
|
|
uint16 observationCardinalityNext;
|
|
|
|
uint8 feeProtocol;
|
|
|
|
bool unlocked;
|
|
|
|
}
|
|
|
|
|
|
|
|
function liquidity() external view returns (uint128);
|
|
|
|
|
|
|
|
function slot0() external view returns (Slot0 memory);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ISwapRouter {
|
|
|
|
struct ExactInputSingleParams {
|
|
|
|
address tokenIn;
|
|
|
|
address tokenOut;
|
|
|
|
uint24 fee;
|
|
|
|
address recipient;
|
|
|
|
uint256 deadline;
|
|
|
|
uint256 amountIn;
|
|
|
|
uint256 amountOutMinimum;
|
|
|
|
uint160 sqrtPriceLimitX96;
|
|
|
|
}
|
|
|
|
|
|
|
|
function exactInputSingle(ExactInputSingleParams calldata params)
|
|
|
|
external
|
|
|
|
payable
|
2021-11-19 14:22:34 +00:00
|
|
|
returns (uint256);
|
2021-11-19 08:29:07 +00:00
|
|
|
}
|