Skip to main content

PoolDataLibrary (V2)

Source reference for public revision e3b9d12. For deployed configuration, select the pool's engine on the parameter page.

Git Source

Title: A Panoptic Pool Data. Tracks the Uniswap Pool, the minEnforcedTick, and the maxEnforcedTick

Author: Axicon Labs Limited

Functions
​

storePoolData
​

Create a new PoolData given by UniswapV3Pool, min/maxEnforcedTick.

function storePoolData(
uint128 _maxLiquidityPerTick,
uint64 _poolId,
int24 _minEnforcedTick,
int24 _maxEnforcedTick,
bool _initialized
) internal pure returns (PoolData);

Parameters

NameTypeDescription
_maxLiquidityPerTickuint128The max liquidity per tick
_poolIduint64The poolId of the Uniswap pool
_minEnforcedTickint24The current minimum enforced tick for the pool in the SFPM
_maxEnforcedTickint24The current maximum enforced tick for the pool in the SFPM
_initializedbool

Returns

NameTypeDescription
<none>PoolDataThe new PoolData with the given IUniswapV3Pool and min/maxEnforcedTick

maxLiquidityPerTick
​

Get the maxLiquidityPerTick of self.

function maxLiquidityPerTick(PoolData self) internal pure returns (uint128);

Parameters

NameTypeDescription
selfPoolDataThe PoolData to retrieve the max liquidity from

Returns

NameTypeDescription
<none>uint128The maxLiquidityPerTick of self

poolId
​

Get the poolId of self.

function poolId(PoolData self) internal pure returns (uint64);

Parameters

NameTypeDescription
selfPoolDataThe PoolData to retrieve the poolId from

Returns

NameTypeDescription
<none>uint64The poolId of self

minEnforcedTick
​

Get the min enforced tick of self.

function minEnforcedTick(PoolData self) internal pure returns (int24);

Parameters

NameTypeDescription
selfPoolDataThe PoolData to retrieve the min enforced tick from

Returns

NameTypeDescription
<none>int24The min enforced tick of self

maxEnforcedTick
​

Get the max enforced tick of self.

function maxEnforcedTick(PoolData self) internal pure returns (int24);

Parameters

NameTypeDescription
selfPoolDataThe PoolData to retrieve the max enforced tick from

Returns

NameTypeDescription
<none>int24The max enforced tick of self

initialized
​

Get the initialized bool of self.

function initialized(PoolData self) internal pure returns (bool);

Parameters

NameTypeDescription
selfPoolDataThe PoolData to retrieve initialized flag from

Returns

NameTypeDescription
<none>boolThe initialized flag of self