addLiquidityETHTx method

Future<RawEvmTransaction> addLiquidityETHTx({
  1. required String token,
  2. required BigInt amountTokenDesired,
  3. required BigInt amountETHMin,
  4. required BigInt amountTokenMin,
  5. required String to,
  6. required BigInt deadline,
  7. required String sender,
  8. required BigInt amountETHDesired,
})

Implementation

Future<RawEvmTransaction> addLiquidityETHTx({
  required String token,
  required BigInt amountTokenDesired,
  required BigInt amountETHMin,
  required BigInt amountTokenMin,
  required String to,
  required BigInt deadline,
  required String sender,
  required BigInt amountETHDesired,
}) async {
  final function = abi.getFunction("addLiquidityETH")!;
  final result = await buildTransactionForFunction(
    value: amountETHDesired,
    sender: sender,
    function: function.addValues(values: [
      token,
      amountTokenDesired,
      amountTokenMin,
      amountETHMin,
      to,
      deadline,
    ]),
  );
  return result;
}