hedera-sdk-js icon indicating copy to clipboard operation
hedera-sdk-js copied to clipboard

RangeError: Offset is outside the bounds of the DataView

Open ochikov opened this issue 2 years ago • 0 comments

Description

Trying to use ContractCallQuery and call a function with new ContractFunctionParameters().addUint24(10000) or new ContractFunctionParameters().addInt24(10000) results to:

/Users/ognyanchikov/Projects/hedera-js/hello-hedera-js-sdk/node_modules/@hashgraph/sdk/lib/contract/ContractFunctionParameters.cjs:2073
  func(byteoffset, value);
  ^

RangeError: Offset is outside the bounds of the DataView

Steps to reproduce

  1. Compile the contract from this isssue.
  2. Deploy it.
  3. Try to call getLotsOfData with ContractCallQuery with following input param:
.setFunction(
      "getLotsOfData",
      new ContractFunctionParameters().addUint24(10000)
    )

The call throws an error:

RangeError: Offset is outside the bounds of the DataView

Additional context

No response

Hedera network

mainnet, testnet, previewnet, other

Version

v2.18.3

Operating system

macOS

ochikov avatar Oct 14 '22 14:10 ochikov