Invalid type for argument in function call. Invalid implicit conversion from struct storageTank.AddLiquidityParams storage ref to struct LiquidityManagement.AddLiquidityParams memory requested.
AddLiquidityParams params = AddLiquidityParams(0xdAC17F958D2ee523a2206206994597C13D831ec7,0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 3, 0x7858E59e0C01EA06Df3aF3D20aC7B0003275D4Bf,34,34,address(this).balance,USDT.balanceOf(address(this)),0,0);
function stakeCombinedLiquidity() public {
lM.addLiquidity(params);
require(msg.sender == address(this),'');
}
//This is the function I am trying to pass the struct in
``` function addLiquidity(AddLiquidityParams memory params) public
returns (
uint128 liquidity,
uint256 amount0,
uint256 amount1,
IUniswapV3Pool pool
)
{
PoolAddress.PoolKey memory poolKey =
PoolAddress.PoolKey({token0: params.token0, token1: params.token1, fee: params.fee});
pool = IUniswapV3Pool(PoolAddress.computeAddress(factory, poolKey));
// compute the liquidity amount
{
(uint160 sqrtPriceX96, , , , , , ) = pool.slot0();
uint160 sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(params.tickLower);
uint160 sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(params.tickUpper);
liquidity = LiquidityAmounts.getLiquidityForAmounts(
sqrtPriceX96,
sqrtRatioAX96,
sqrtRatioBX96,
params.amount0Desired,
params.amount1Desired
);
}
(amount0, amount1) = pool.mint(
params.recipient,
params.tickLower,
params.tickUpper,
liquidity,
abi.encode(MintCallbackData({poolKey: poolKey, payer: msg.sender}))
);
require(amount0 >= params.amount0Min && amount1 >= params.amount1Min, 'Price slippage check');
}