open-dex/tests/TickLensTest.sol
2024-08-23 21:53:00 +03:00

16 lines
532 B
Solidity

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
pragma abicoder v2;
import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';
import '../lens/TickLens.sol';
/// @title Tick Lens contract
contract TickLensTest is TickLens {
function getGasCostOfGetPopulatedTicksInWord(address pool, int16 tickBitmapIndex) external view returns (uint256) {
uint256 gasBefore = gasleft();
getPopulatedTicksInWord(pool, tickBitmapIndex);
return gasBefore - gasleft();
}
}