You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the IDL to include output from constant functions. I am guessing that it doesn't work because the preprocessor runs before constant function evaluation.
Is there an idiomatic method to use a constant function in a IDL constant declaration in Anchor?
I also tried switching the size_of::<SomeAccount>(); to a proc macro but it didn't evaluate either, just copying TokenStream into IDL.
The text was updated successfully, but these errors were encountered:
I would like the IDL to include output from constant functions. I am guessing that it doesn't work because the preprocessor runs before constant function evaluation.
What I have:
The IDL looks like:
Is there an idiomatic method to use a constant function in a IDL constant declaration in Anchor?
I also tried switching the
size_of::<SomeAccount>();
to a proc macro but it didn't evaluate either, just copying TokenStream into IDL.The text was updated successfully, but these errors were encountered: