metaplex-foundation/solita

[feat]: Support for non-uniform Data Enums

ngundotra opened this issue · 3 comments

Right now, Solita is unable to handle IDL types that have the following structure:

  {
      "name": "VoteThreshold",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "YesVotePercentage",
            "fields": [
              "u8"
            ]
          },
          {
            "name": "QuorumPercentage",
            "fields": [
              "u8"
            ]
          },
          {
            "name": "Disabled"
          }
        ]
      }
    }

Would be helpful for automatically maintaining SDKs like for SPL Governance.

Could you have another go? I think #72 might have fixed this as well.
This now handles mixed enums i.e. with data and scalar variants.

Yes this is done! Thank you Thorsten :)