extract
Extracts up to three Uniswap positions from zipped. Each position consists of an int24 lower and
int24 upper, and will be included in the output array iff lower != upper. The output array is flattened
such that lower and upper ticks are next to each other, e.g. one position may be at indices 0 & 1, and another
at indices 2 & 3.
The output array's length will be one of {0, 2, 4, 6}. We do not validate that lower < upper, nor do
we check whether positions actually hold liquidity. Also note that this function will revert if zipped
contains duplicate positions like [-100, 100, -100, 100].
function extract(uint256 zipped) pure returns (int24[] memory positionsOfNonZeroWidth);
Parameters
| Name | Type | Description |
|---|---|---|
zipped | uint256 | Encoded Uniswap positions. Equivalent to the layout of int24[6] storage yourPositions |
Returns
| Name | Type | Description |
|---|---|---|
positionsOfNonZeroWidth | int24[] | Flattened array of Uniswap positions that may or may not hold liquidity |