getProvideLiquidityTonTxParams method
Future<SenderArguments>
getProvideLiquidityTonTxParams(
{ - required InternalAddress userWalletAddress,
- required PtonV1 proxyTon,
- required InternalAddress otherTokenAddress,
- required BigInt sendAmount,
- required BigInt minLpOut,
- BigInt? forwardGasAmount,
- BigInt? queryId,
})
Implementation
Future<SenderArguments> getProvideLiquidityTonTxParams({
required InternalAddress userWalletAddress,
required PtonV1 proxyTon,
required InternalAddress otherTokenAddress,
required BigInt sendAmount,
required BigInt minLpOut,
BigInt? forwardGasAmount,
BigInt? queryId,
}) async {
final routerWalletAddress = await stonfiProvider!
.open(JettonMaster(otherTokenAddress))
.getWalletAddress(this.address);
final forwardPayload = createProvideLiquidityBody(
routerWalletAddress: routerWalletAddress,
minLpOut: minLpOut,
);
final forwardTonAmount =
forwardGasAmount ?? gasConstants.provideLpTon.forwardGasAmount;
return await proxyTon.getTonTransferTxParams(
queryId: queryId ?? BigInt.zero,
tonAmount: sendAmount,
destinationAddress: this.address,
refundAddress: userWalletAddress,
forwardPayload: forwardPayload,
forwardTonAmount: forwardTonAmount,
);
}