Open zamrokk opened 1 year ago
Followup from Slack:
Rodrigo Quelhas: You could use this: https://romarq.github.io/michelson-sdk/types#variant https://romarq.github.io/michelson-sdk/taquito
It would be great to integrate this types on the taqueria plugin generating the classes
Hi Taquito team :smiley: Is it possible to bring more tooling around packing Ligo variants ? Not the first time I need to play with Michelson and pack all myself like this
Is it possible to have a special taquito class for variants, so I can just pass this class while packing to bytes ?
Maybe is also a 2-question in 1, when generating Typescript types with taqueria plugin, only storage is exported, not intermediary types inside the storage definition itself. Most of the type I need to redefine locally an nested type from storage type to be able to use it on my code. The example above is variant that is stored somewhere on the storage, but I need to pass it "packed" on one of the entrypoint (that is a bit of context from above example)
The perfect DX would be to have this variant exported on a taqueria generated type along with the storage (in this example type action = {...} ) and then be able to pass it to the Michelson encoder pack function (without the need to do all manual trick above that requires too high level knowledge of Michelson for a standard developer :/ )