anchorpy icon indicating copy to clipboard operation
anchorpy copied to clipboard

`anchorpy client-gen` fails with error: "unknown variant `alias`, expected `struct` or `enum`"

Open totlsota opened this issue 1 year ago • 1 comments

using raydium idl

anchorpy client-gen fails with error: "unknown variant alias, expected struct or enum"

when encountering this in the types section:

{"name":"TickArryBitmap","type":{"kind":"alias","value":{"array":["u64",8]}}}

this error is raised:

/anchorpy/cli.py", line 109, in client_gen
    idl_obj = Idl.from_json(idl.read_text())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
solders.SerdeJSONError: unknown variant `alias`, expected `struct` or `enum` at line 1 column 20942

using latest version of anchorpy

user error is not out of the realm of possibility ;)

totlsota avatar Dec 28 '23 11:12 totlsota

LOL :laughing:

totlsota avatar Dec 29 '23 09:12 totlsota

Fixed by #132

kevinheavey avatar Feb 12 '24 02:02 kevinheavey