metaplex-foundation / shank

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

Add CLI program option for Program ID #35

Closed ngundotra closed 2 years ago

ngundotra commented 2 years ago

Provide -p to override program address.

Also adds support for COptions by treating them as normal Option types. Closes https://github.com/metaplex-foundation/shank/issues/22.

Works with spl-token program via cargo +1.59.0 run -- idl -r <YOUR-SYS-PATH>/solana-program-library/token/program -o ./tmp/token/idl -p TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.