approve method

Future<String> approve({
  1. required String sender,
  2. required String spender,
  3. required BigInt value,
  4. required Uint8List seed,
  5. EvmFeeInformation<EvmGasPrice>? feeInfo,
})

Implementation

Future<String> approve({
  required String sender,
  required String spender,
  required BigInt value,
  required Uint8List seed,
  EvmFeeInformation? feeInfo,
}) async {
  final function = abi.functions[1];
  assert(function.functionSelectorHex == "095ea7b3");

  return await interact(
    function: function.addValues(values: [spender, value]),
    seed: seed,
    sender: sender,
    feeInfo: feeInfo,
  );
}