metaplex-foundation / shank

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

Allow custom InstructionBuilder trait implementations #55

Closed febo closed 1 year ago

febo commented 1 year ago

Currently ShankBuilder macro automatically generates an InstructionBuilder trait implementation for each instruction. This creates a problem for instructions that define custom args attributes, since the client cannot re-implement the same trait and therefore cannot use the attributes to customize the instruction generation on the builder.

This PR fixes this by only generating a default implementation for instructions that do not use custom args attributes.