metaplex-foundation / shank

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

Consider Shanking SPL Programs #26

Open lorisleiva opened 2 years ago

lorisleiva commented 2 years ago

This is just an issue to log the fact that having Shank-generated IDLs and autogenerated libraries for SPL programs would be very valuable.

Not sure how we would go about it since we'd need to clone the programs, add shank and then maintain all future updates but maybe there's another way I don't see.

Priority for SDKs: Low (Nice-To-Have).

thlorenz commented 2 years ago

100% agree should maybe file a related issue/question in the repo housing those programs to see if this is desired there.

ngundotra commented 2 years ago

I agree as well. Working on adding shank to SPL gov here: https://github.com/solana-labs/solana-program-library/pull/3494/files

One of the issues is that Shank restricts Instructions to have only 1 argument.

Is this an insurmountable technical restraint, or can I just hack at the macro to get this working?

thlorenz commented 1 year ago

Hey I think you did just hack at the macro and now this is no longer an issue right @ngundotra ? See #32. If that solved that issue what else stands in the way of shanking SPL programs so we can address them?

ngundotra commented 1 year ago

I'll try out shanking some other programs, but I think this will largely fall under the maintainer's discretion.

The nice win here for Labs would be standardization of all our TS SDKs however.