Skip to content

Shank IDL's Not Parsable #1

@bonedaddy

Description

@bonedaddy

Overview

Shank idl parsing doesn't appear to be supported. Running the example below fails due to unknown field types. The IDL was downloaded from https://github.com/metaplex-foundation/mpl-token-metadata/tree/main/idls.

Error appears to be coming from

_ => {
return Err("Unknown field type".into());
}

More specifically issue appears to be because the idl is using hashMap types which aren't currently supported

Error message

Failed to parse type: Payload: "Unknown field type"
Failed to parse type: DelegateArgs: "Unknown field type"
Failed to parse type: UnlockArgs: "Unknown field type"
Failed to parse type: UseArgs: "Unknown field type"
Failed to parse type: LockArgs: "Unknown field type"
Failed to parse type: TransferArgs: "Unknown field type"
Failed to parse type: AuthorizationData: "Unknown field type"
Failed to parse type: UpdateArgs: "Unknown field type"
Failed to parse type: MintArgs: "Unknown field type"

Example

I'm embedded IDL's into rust binaries using lazy_static and as the metaplex idl is quite large I can't include the example in this issue, however I have uploaded a gist containing the example https://gist.github.com/bonedaddy/e4ab00aee1abb5dc4cef8ea119836fd5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions