approveTx method

Future<RawEvmTransaction> approveTx({
  1. required String sender,
  2. required String spender,
  3. required BigInt value,
  4. EvmFeeInformation<EvmGasPrice>? feeInfo,
})

Implementation

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

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