metaplex-foundation / shank

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

cli: Add argument for output filename #63

Closed joncinque closed 8 months ago

joncinque commented 8 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