0

I am trying to sign a transanction off chain but it's giving me that error.

var data = contract.function('permit').encodeCall([
      credentialsA.address,
      appOwnerCredentials.address,
      1000,

      deadline,
      0,
      Uint8List(32),
      Uint8List(32),
    ]);

the code above is what is generating the error below

E/flutter ( 6175): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'int' is not a subtype of type 'BigInt' of 'data'
E/flutter ( 6175): #0      UintType.encode (package:web3dart/src/contracts/abi/integers.dart)
E/flutter ( 6175): #1      TupleType.encode (package:web3dart/src/contracts/abi/tuple.dart:71:14)
E/flutter ( 6175): #2      ContractFunction.encodeCall (package:web3dart/src/contracts/abi/abi.dart:267:10)
E/flutter ( 6175): #3      Contract.transferDymeFrom (package:dymer2/models/contract.dart:1161:41)
E/flutter ( 6175): <asynchronous suspension>
E/flutter ( 6175): 

I am trying to use the "permit" function in erc20 token

toyota Supra
  • 3,181
  • 4
  • 15
  • 19

1 Answers1

0

Have you used the 'data' variable anywhere?

Sneka
  • 13
  • 4
  • naa, just that one, I even changed the variable name to something different. it still give the same error with that name "data". So I don't think it's something about the variable name. – Tabi Serebour Aug 02 '23 at 15:01
  • https://github.com/simolus3/web3dart/issues/118 go through the link above; it might give you some ideas. – Sneka Aug 03 '23 at 07:33