swapExactTokensForEth method

Future<String> swapExactTokensForEth({
  1. required BigInt amountIn,
  2. required BigInt amountOutMin,
  3. required List<String> path,
  4. required String to,
  5. required BigInt deadline,
  6. required Uint8List seed,
  7. required String sender,
})

Implementation

Future<String> swapExactTokensForEth({
  required BigInt amountIn,
  required BigInt amountOutMin,
  required List<String> path,
  required String to,
  required BigInt deadline,
  required Uint8List seed,
  required String sender,
}) async {
  final function = abi.getFunction("swapExactTokensForETH")!;

  final result = await interact(
    seed: seed,
    sender: sender,
    function: function
        .addValues(values: [amountIn, amountOutMin, path, to, deadline]),
  );

  return result;
}