metaplex-foundation / shank

Extracts IDL from Solana Rust contracts
https://docs.rs/crate/shank_macro/latest
116 stars 23 forks source link

cli: Add argument for output filename #63

Closed joncinque closed 6 months ago

joncinque commented 6 months ago

Problem

The IDL created by the Shank CLI defaults to "program_name.json". This is useful in most situations, especially when dealing with multiple IDLs for multiple programs.

In situations where there's only one program and one IDL, or if the IDL is confined to a well-known folder, it's useful to be able to specify the output filename.

Solution

Add --out-filename to mirror --out-dir. It overrides the normal filename for the IDL file.

cc @lorisleiva