createDirectAddLiquidityBody method
Cell
createDirectAddLiquidityBody({})
Implementation
Cell createDirectAddLiquidityBody({
required BigInt amount0,
required BigInt amount1,
required InternalAddress userWalletAddress,
BigInt? minimumLpToMint,
BigInt? queryId,
InternalAddress? refundAddress,
InternalAddress? excessesAddress,
Cell? customPayload,
BigInt? customPayloadForwardGasAmount,
}) {
return beginCell()
.storeUint(DexOpCodes.DIRECT_ADD_LIQUIDITY.op, 32)
.storeUint(queryId ?? BigInt.zero, 64)
.storeCoins(amount0)
.storeCoins(amount1)
.storeCoins(minimumLpToMint ?? BigInt.from(1))
.storeCoins(customPayloadForwardGasAmount ?? BigInt.zero)
.storeAddress(userWalletAddress)
.storeMaybeRef(customPayload)
.storeRef(beginCell()
.storeAddress(refundAddress ?? userWalletAddress)
.storeAddress(excessesAddress ?? refundAddress ?? userWalletAddress)
.endCell())
.endCell();
}