Open GabrielePicco opened 1 year ago
Update:
Using the Idl.from_json, I also get the same issue:
with Path("./mpl_token_metadata.json").open() as f:
raw_idl = f.read()
idl = Idl.from_json(raw_idl)
I did some investigation, and this likely needs bindings to be added in the anchorpy-core module
This means it would need to be in Anchor itself. The anchor_lang crate doesn't support HashMap in IDLs https://github.com/coral-xyz/anchor/blob/master/lang/syn/src/idl/mod.rs
I'm trying to generate the client for the metaplex metadata program IDL, but seems that hashmap type is missing the mapping.
Steps to reproduce
https://raw.githubusercontent.com/metaplex-foundation/metaplex-program-library/master/token-metadata/js/idl/mpl_token_metadata.json
anchorpy client-gen mpl_token_metadata.json metaplex_client
Error: