Open Sceat opened 1 month ago
Thanks for the report @Sceat -- I've added @tzakian as our enums expert to take a look.
I would also offer a general caution about using the getNormalized*
family of JSONRPC methods though, as they are also not upgrade-aware, meaning that you could encounter some strangeness with package IDs as well.
We're still productionising our GraphQL API, so use at your own risk, but it has a much richer set of APIs for querying information about types, and they are both upgrade- and enum-aware.
you can get the full type layout of a fully-instantiated type:
and you can get information about a specific datatype (struct or enum), going down into its fields etc.
In order to generate bcs types from packages (https://github.com/Sceat/sui-bcs) I'm using
getNormalizedMoveModulesByPackage
which output any enum as atype.Struct
and that fails when usinggetNormalizedMoveStruct
Originally posted by @Sceat in https://github.com/MystenLabs/sui/issues/19512#issuecomment-2373052109
Reproduce