getAmountsIn method

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

Implementation

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

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

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