getAmountsOut method

Future<List<BigInt>> getAmountsOut({
  1. required BigInt amountIn,
  2. required List<String> path,
})

Implementation

Future<List<BigInt>> getAmountsOut({
  required BigInt amountIn,
  required List<String> path,
}) async {
  final function = abi.getFunction("getAmountsOut")!;

  final result = await readSafe(
    function: function.addValues(values: [amountIn, path]),
  );

  return [
    for (final r in result.outputs.first.value) r as BigInt,
  ];
}