feat(interfaces): add concentrated-liquidity pool and callback interfaces
This commit is contained in:
1 parent
6cc20bd1e4
commit
ab61aa0ecf
3 files changed
+100
No files matched your search
@@ -0,0 +1,88 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity 0.8.36;
|
||||
|
||||
interface IFluxClPool {
|
||||
event Initialize(uint160 sqrtPriceX96, int24 tick);
|
||||
event Mint(
|
||||
address sender,
|
||||
address indexed owner,
|
||||
int24 indexed tickLower,
|
||||
int24 indexed tickUpper,
|
||||
uint128 amount,
|
||||
uint256 amount0,
|
||||
uint256 amount1
|
||||
);
|
||||
event Collect(
|
||||
address indexed owner,
|
||||
address recipient,
|
||||
int24 indexed tickLower,
|
||||
int24 indexed tickUpper,
|
||||
uint128 amount0,
|
||||
uint128 amount1
|
||||
);
|
||||
event Burn(
|
||||
address indexed owner,
|
||||
int24 indexed tickLower,
|
||||
int24 indexed tickUpper,
|
||||
uint128 amount,
|
||||
uint256 amount0,
|
||||
uint256 amount1
|
||||
);
|
||||
event Swap(
|
||||
address indexed sender,
|
||||
address indexed recipient,
|
||||
int256 amount0,
|
||||
int256 amount1,
|
||||
uint160 sqrtPriceX96,
|
||||
uint128 liquidity,
|
||||
int24 tick
|
||||
);
|
||||
|
||||
function factory() external view returns (address);
|
||||
function token0() external view returns (address);
|
||||
function token1() external view returns (address);
|
||||
function fee() external view returns (uint24);
|
||||
function tickSpacing() external view returns (int24);
|
||||
function maxLiquidityPerTick() external view returns (uint128);
|
||||
function liquidity() external view returns (uint128);
|
||||
function feeGrowthGlobal0X128() external view returns (uint256);
|
||||
function feeGrowthGlobal1X128() external view returns (uint256);
|
||||
|
||||
function slot0()
|
||||
external
|
||||
view
|
||||
returns (
|
||||
uint160 sqrtPriceX96,
|
||||
int24 tick,
|
||||
uint16 observationIndex,
|
||||
uint16 observationCardinality,
|
||||
uint16 observationCardinalityNext,
|
||||
bool unlocked
|
||||
);
|
||||
|
||||
function initialize(uint160 sqrtPriceX96) external;
|
||||
function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes calldata data)
|
||||
external
|
||||
returns (uint256 amount0, uint256 amount1);
|
||||
function collect(
|
||||
address recipient,
|
||||
int24 tickLower,
|
||||
int24 tickUpper,
|
||||
uint128 amount0Requested,
|
||||
uint128 amount1Requested
|
||||
) external returns (uint128 amount0, uint128 amount1);
|
||||
function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1);
|
||||
function swap(
|
||||
address recipient,
|
||||
bool zeroForOne,
|
||||
int256 amountSpecified,
|
||||
uint160 sqrtPriceLimitX96,
|
||||
bytes calldata data
|
||||
) external returns (int256 amount0, int256 amount1);
|
||||
|
||||
function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
|
||||
function observe(uint32[] calldata secondsAgos)
|
||||
external
|
||||
view
|
||||
returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity 0.8.36;
|
||||
|
||||
interface IFluxMintCallback {
|
||||
function fluxMintCallback(uint256 amount0Owed, uint256 amount1Owed, bytes calldata data) external;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity 0.8.36;
|
||||
|
||||
interface IFluxSwapCallback {
|
||||
function fluxSwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;
|
||||
}
|
||||
Reference in new issue
Block a user