Skip to main content
Helpful?

PositionInfo

Git Source - Generated with forge doc

PositionInfo is a packed version of solidity structure. Using the packaged version saves gas and memory by not storing the structure fields in memory slots. Layout: 200 bits poolId | 24 bits tickUpper | 24 bits tickLower | 8 bits hasSubscriber Fields in the direction from the least significant bit: A flag to know if the tokenId is subscribed to an address uint8 hasSubscriber; The tickUpper of the position int24 tickUpper; The tickLower of the position int24 tickLower; The truncated poolId. Truncates a bytes32 value so the most signifcant (highest) 200 bits are used. bytes25 poolId; Note: If more bits are needed, hasSubscriber can be a single bit.

type PositionInfo is uint256;
Helpful?