Lightprotocol / light-protocol

The ZK Compression Protocol For Solana
https://www.zkcompression.com
GNU General Public License v3.0
157 stars 27 forks source link

fix: IDL generation in programs using light-sdk #1233

Closed vadorovsky closed 1 week ago

vadorovsky commented 1 week ago

Even when using idl-build feature, Anchor still parses the code of the program and expects the #[program] attribute applied on the main module.

Before this change, annotating the program module only with #[light_program] was preventing the IDL generation. Fix that by requiring both attributes:

#[light_program]
#[program]

And not injecting the #[program] inside #[light_program].