Closed ganeshrajanbaboo closed 7 months ago
Please ignore this question. The issue was not in the call. It was where I collected back the return value from the call and update my firestore database. It was a cast issue in the way I accepted them back.
I am using web3dart with flutter for calling a smart contract view function from my android application. The call errs: Invalid argument: Instance of '_BigIntImpl'. The Solidity function requires String input like so:
The function was tested fine from Remix. Now I am integrating it with my flutter application like so:
The function is expected to retrieve details of input string memory _customer. In my case the input argument "id" is a UID of the form say, 9UlY5QpsmONa5bw1ZAV3yAdTwNL2. params of web3dart call is a List which take a list of input arguments. I have ensured that id is a string by checking its runtimeType and put it in a List. I have even tried with hardcoded literals. So my only argument is a string and nothing indicative of a BigInt.
However, every time I get the same error: Invalid argument: Instance of '_BigIntImpl'
Here is my contract Abi: