Helpful?
IPositionManager
Git Source | Generated with forge doc
Inherits: INotifier
Interface for the PositionManager contract
Functions
modifyLiquidities
Unlocks Uniswap v4 PoolManager and batches actions for modifying liquidity
This is the standard entrypoint for the PositionManager
function modifyLiquidities(bytes calldata unlockData, uint256 deadline) external payable;
Parameters
Name | Type | Description |
---|---|---|
unlockData | bytes | is an encoding of actions, and parameters for those actions |
deadline | uint256 | is the deadline for the batched actions to be executed |
modifyLiquiditiesWithoutUnlock
Batches actions for modifying liquidity without unlocking v4 PoolManager
This must be called by a contract that has already unlocked the v4 PoolManager
function modifyLiquiditiesWithoutUnlock(bytes calldata actions, bytes[] calldata params) external payable;
Parameters
Name | Type | Description |
---|---|---|
actions | bytes | the actions to perform |
params | bytes[] | the parameters to provide for the actions |
nextTokenId
Used to get the ID that will be used for the next minted liquidity position
function nextTokenId() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The next token ID |
getPositionLiquidity
this value can be processed as an amount0 and amount1 by using the LiquidityAmounts library
function getPositionLiquidity(uint256 tokenId) external view returns (uint128 liquidity);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | the ERC721 tokenId |
Returns
Name | Type | Description |
---|---|---|
liquidity | uint128 | the position's liquidity, as a liquidityAmount |
getPoolAndPositionInfo
function getPoolAndPositionInfo(uint256 tokenId) external view returns (PoolKey memory, PositionInfo);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | the ERC721 tokenId |
Returns
Name | Type | Description |
---|---|---|
<none> | PoolKey | PositionInfo a uint256 packed value holding information about the position including the range (tickLower, tickUpper) |
<none> | PositionInfo | poolKey the pool key of the position |
Errors
NotApproved
Thrown when the caller is not approved to modify a position
error NotApproved(address caller);
DeadlinePassed
Thrown when the block.timestamp exceeds the user-provided deadline
error DeadlinePassed(uint256 deadline);