diff --git a/.forge-snapshots/CLPoolManagerTest#setLmPool.snap b/.forge-snapshots/CLPoolManagerTest#setLmPool.snap index 39deca12..a31e3566 100644 --- a/.forge-snapshots/CLPoolManagerTest#setLmPool.snap +++ b/.forge-snapshots/CLPoolManagerTest#setLmPool.snap @@ -1 +1 @@ -26272 \ No newline at end of file +26295 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#setMasterChef.snap b/.forge-snapshots/CLPoolManagerTest#setMasterChef.snap index 48345f5c..19c0eed1 100644 --- a/.forge-snapshots/CLPoolManagerTest#setMasterChef.snap +++ b/.forge-snapshots/CLPoolManagerTest#setMasterChef.snap @@ -1 +1 @@ -30715 \ No newline at end of file +30760 \ No newline at end of file diff --git a/src/pool-cl/CLPoolManager.sol b/src/pool-cl/CLPoolManager.sol index 7e831347..f8ed16dd 100644 --- a/src/pool-cl/CLPoolManager.sol +++ b/src/pool-cl/CLPoolManager.sol @@ -2,6 +2,7 @@ // Copyright (C) 2024 PancakeSwap pragma solidity ^0.8.24; +import "./interfaces/ICLHooks.sol"; import {Fees} from "../Fees.sol"; import {ICLPoolManager} from "./interfaces/ICLPoolManager.sol"; import {IVault} from "../interfaces/IVault.sol"; @@ -10,9 +11,9 @@ import {CLPool} from "./libraries/CLPool.sol"; import {CLPosition} from "./libraries/CLPosition.sol"; import {PoolKey} from "../types/PoolKey.sol"; import {IPoolManager} from "../interfaces/IPoolManager.sol"; -import "./interfaces/ICLHooks.sol"; import {ICLDynamicFeeManager} from "./interfaces/ICLDynamicFeeManager.sol"; import {Hooks} from "../libraries/Hooks.sol"; +import {Tick} from "./libraries/Tick.sol"; import {CLPoolParametersHelper} from "./libraries/CLPoolParametersHelper.sol"; import {FeeLibrary} from "../libraries/FeeLibrary.sol"; import {PoolId, PoolIdLibrary} from "../types/PoolId.sol"; @@ -293,6 +294,14 @@ contract CLPoolManager is ICLPoolManager, Fees, Extsload { } } + function getPoolTickInfo(PoolId id, int24 tick) external view returns (Tick.Info memory) { + return pools[id].ticks[tick]; + } + + function getPoolBitmapInfo(PoolId id, int16 word) external view returns (uint256 tickBitmap) { + return pools[id].tickBitmap[word]; + } + /// @inheritdoc ICLPoolManager function setMasterChef(address _masterChef) external override onlyOwner { masterChef = _masterChef;