Closed janniksam closed 9 months ago
The discriminant is encoded on just one byte in our encoding format, so it is not possible to have a standard enum with 256 variants or more.
Having such large enums is not a great practice. However, if you really need such an enum, you should write the encoding/decoding function explicitly, in which you can encode the discriminant on more than 1 byte.
Oh, sorry, just now realized what the issue is. So just the error message. Fair, will fix.
Fixed as of release 0.47.0.
I think I found either a bug in the logic or a cosmetic wording inaccuracy:
this is a check I found here.
You can't build your contract if you have exactly 256 variants. Either this is a bug and should say
< 257
or the text should saymore than 255 variants not supported
.Example enum: