addLiquidityTx method

Future<RawEvmTransaction> addLiquidityTx({
  1. required String tokenA,
  2. required String tokenB,
  3. required BigInt amountADesired,
  4. required BigInt amountBDesired,
  5. required BigInt amountAMin,
  6. required BigInt amountBMin,
  7. required String to,
  8. required BigInt deadline,
  9. required String sender,
})

Implementation

Future<RawEvmTransaction> addLiquidityTx({
  required String tokenA,
  required String tokenB,
  required BigInt amountADesired,
  required BigInt amountBDesired,
  required BigInt amountAMin,
  required BigInt amountBMin,
  required String to,
  required BigInt deadline,
  required String sender,
}) async {
  final function = abi.getFunction("addLiquidity")!;
  final result = await buildTransactionForFunction(
    sender: sender,
    function: function.addValues(
      values: [
        tokenA,
        tokenB,
        amountADesired,
        amountBDesired,
        amountAMin,
        amountBMin,
        to,
        deadline,
      ],
    ),
  );
  return result;
}