simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
441 stars 270 forks source link

Value not in Range #239

Closed Solido closed 2 years ago

Solido commented 2 years ago

I use abi to gen my class and tried on basic contracts like metacoin or even basic functions like

function greet() public view returns (string memory) { return greeting; }

This function is an extract of the default example from HardHat dev tool.

Any call seems to debord the buffer when a value should be returned.

[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: RangeError: Value not in range: 32
#0      _rangeCheck (dart:typed_data-patch/typed_data_patch.dart:5075:5)
#1      _ByteBuffer.asUint8List (dart:typed_data-patch/typed_data_patch.dart:1917:5)
#2      _IntTypeBase.decode (package:web3dart/src/contracts/abi/integers.dart:37:31)
#3      TupleType.decode (package:web3dart/src/contracts/abi/tuple.dart:106:29)
#4      ContractFunction.decodeReturnValues (package:web3dart/src/contracts/abi/abi.dart:273:30)
#5      Web3Client.call (package:web3dart/src/core/client.dart:354:21)

Do you need any help on the lib?

Thank you for this large piece of work, Robert