Position

Manages and updates the position information

get

Retrieves the position information for the given owner and tick range

function get(mapping(bytes32 => PositionInfo) storage self, address owner, int24 tickLower, int24 tickUpper) internal view returns (PositionInfo storage position)

Params:

Name

Type

Description

self

mapping(bytes32 => PositionInfo)

Storage mapping for position information

owner

address

The owner of the position

tickLower

int24

The lower tick of the position range

tickUpper

int24

The upper tick of the position range

Returns:

Name

Type

Description

position

PositionInfo

The info struct of the given position. See Types

update

Updates the position information based on the liquidity delta and growth information

function update(PositionInfo storage self, int128 liquidityDelta, GrowthX128 memory insideLast) internal

Params:

Name

Type

Description

self

PositionInfo

The info struct of the given position. See Types

liquidityDelta

int128

The change in pool liquidity for the position

insideLast

GrowthX128

The GrowthX128 info struct per unit of liquidity inside the tick range, as of the last update

Last updated