2

I'm trying to use an array in my smart contract, however I'm getting this error:

Type instantiation is excessively deep and possibly infinite

let tokenid: FixedArray<ByteString,1000>;

Is it possible to use such type, and if so how should I use it?

mpapec
  • 50,217
  • 8
  • 67
  • 127

1 Answers1

3

It is a issue.

try to install the latest hotfix version:

npm i scrypt-ts@beta

after that, you can do this:

let tokenid: FixedArray<ByteString,1000> = fill(toByteString(""), 1000);
qtom zheng
  • 66
  • 2