walletApproveErc20 method

  1. @override
Future<String> walletApproveErc20({
  1. required Wallet that,
  2. required String contract,
  3. required String amount,
  4. required EthTxOption ethParams,
  5. dynamic hint,
})
override

Implementation

@override
Future<String> walletApproveErc20(
    {required Wallet that,
    required String contract,
    required String amount,
    required EthTxOption ethParams,
    dynamic hint}) {
  return handler.executeNormal(NormalTask(
    callFfi: (port_) {
      var arg0 =
          cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockWallet(
              that);
      var arg1 = cst_encode_String(contract);
      var arg2 = cst_encode_String(amount);
      var arg3 =
          cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockEthTxOption(
              ethParams);
      return wire.wire_Wallet_approve_erc20(port_, arg0, arg1, arg2, arg3);
    },
    codec: DcoCodec(
      decodeSuccessData: dco_decode_String,
      decodeErrorData: dco_decode_AnyhowException,
    ),
    constMeta: kWalletApproveErc20ConstMeta,
    argValues: [that, contract, amount, ethParams],
    apiImpl: this,
    hint: hint,
  ));
}