metaplex-foundation / solita

Genrates an SDK API from solana contract IDL.
Apache License 2.0
140 stars 32 forks source link

feat: support account collections for instructions #87

Closed thlorenz closed 2 years ago

thlorenz commented 2 years ago

Summary

Superseedes #81 (which includes further description) FIXES: #78

This builds on top of the related PR by @ricardocr987 and adapts mainly how items of account collections are named. Instead of just upper-casing them to avoid name clashes the name now is prefixed with the collection name and suffixed with the account item. This makes them easy to discover on top of avoiding name clashes.

Sample Completion

The below shows clearly that the account item names help discover accounts by collection easily.

Screen Shot 2022-09-22 at 11 46 13 AM
thlorenz commented 2 years ago

Hi @ricardocr987 . Just making sure this didn't go unnoticed by accident. Would like to get this merged so others can use this feature as well.

Please LMK if the changes I made are acceptable.

ricardocr987 commented 2 years ago

yep, the code is much cleaner and the solution also suits to me, thank you very much