Inherits: IUniswapV3MintCallback, ILOPoolImmutableState
Internal functions for safely managing liquidity in Uniswap V3
Called to msg.sender
after minting liquidity to a position from IUniswapV3Pool#mint.
liqiuidity is allways in range so we don't need to check if amount0 or amount1 is 0
function uniswapV3MintCallback(uint256 amount0Owed, uint256 amount1Owed, bytes calldata data) external override;
Parameters
Name | Type | Description |
---|---|---|
amount0Owed |
uint256 |
The amount of token0 due to the pool for the minted liquidity |
amount1Owed |
uint256 |
The amount of token1 due to the pool for the minted liquidity |
data |
bytes |
Any data passed through by the caller via the IUniswapV3PoolActions#mint call |
Add liquidity to an initialized pool
function _addLiquidity(AddLiquidityParams memory params) internal returns (uint256 amount0, uint256 amount1);
struct AddLiquidityParams {
IUniswapV3Pool pool;
uint128 liquidity;
}