KibblePool.sol
32 lines · sha256 8404971067394dca6e21aee3ee3669c9709ecda0e92683e63dd5ecf4105cceff · Raw
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.26; |
| 3 | |
| 4 | import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol"; |
| 5 | import {Currency} from "@uniswap/v4-core/src/types/Currency.sol"; |
| 6 | import {IHooks} from "@uniswap/v4-core/src/interfaces/IHooks.sol"; |
| 7 | import {TickMath} from "@uniswap/v4-core/src/libraries/TickMath.sol"; |
| 8 | import {KibbleConstants as K} from "./KibbleConstants.sol"; |
| 9 | |
| 10 | /// @title KibblePool |
| 11 | /// @notice The single HYPE / KIBBLE pool: native HYPE = currency0, KIBBLE = currency1, fee 0.3%, |
| 12 | /// tickSpacing 60, no hook. Positions are full range. |
| 13 | library KibblePool { |
| 14 | function key(address kibble) internal pure returns (PoolKey memory) { |
| 15 | return PoolKey({ |
| 16 | currency0: Currency.wrap(address(0)), |
| 17 | currency1: Currency.wrap(kibble), |
| 18 | fee: K.POOL_FEE, |
| 19 | tickSpacing: K.TICK_SPACING, |
| 20 | hooks: IHooks(address(0)) |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | function tickLower() internal pure returns (int24) { |
| 25 | return TickMath.minUsableTick(K.TICK_SPACING); |
| 26 | } |
| 27 | |
| 28 | function tickUpper() internal pure returns (int24) { |
| 29 | return TickMath.maxUsableTick(K.TICK_SPACING); |
| 30 | } |
| 31 | } |
| 32 |