kinobi-so / kinobi

Generate clients, CLIs, documentation and more from your Solana programs
MIT License
27 stars 7 forks source link

Improve node data for inlined PdaValueNodes #70

Open lorisleiva opened 3 weeks ago

lorisleiva commented 3 weeks ago

Since https://github.com/kinobi-so/kinobi/pull/43, we can now inline PdaNodes directly inside PdaValueNodes, allowing us to defined PDAs that are not defined at the top-level of the program, and therefore, don't need to render helper methods.

PR #42 is in the process of supporting these inlined PDAs when parsing an Anchor IDL.

This issue proposes two further improvements that needs discussing.

Cc @kespinola

Kabie commented 2 weeks ago

https://github.com/kinobi-so/kinobi/blob/ac5bc75156b01855f92f0ed6366cd6c14044fddc/packages/visitors-core/src/identityVisitor.ts#L516-L522

Hi, I tried to inline a PdaNode but this assert in line 520 still blocks it.

lorisleiva commented 2 weeks ago

Thanks for raising this @Kabie, I've fixed this in https://github.com/kinobi-so/kinobi/pull/94. I'll release a new patch soon.