metaplex-foundation / shank

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

feat: info for code generator #9

Closed thlorenz closed 2 years ago

thlorenz commented 2 years ago

Adding information to IDL which is useful for code generators.

Added Instruction Info

Code Render Improvements

Considered but not included

Thought about flattening instruction args if it is a custom struct, i.e. inlining its fields. However I saw a few cases where types for instruction args are reused and such it would result in code repetition + if wrappers around an arg type are created that would make it more difficult.