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
It might be a fringe case but if you have a struct with the account annotation and also a struct deriving AnchorSerialize, AnchorDeserialize bearing the same name, both struct definitions will end up as accounts in the IDL
use anchor_lang::prelude::*;declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");#[program]pubmod bug {usesuper::*;pubfninitialize(_:Context<Initialize>) -> Result<()>{Ok(())}}#[derive(Accounts)]pubstructInitialize<'info>{pubsomething:Account<'info,Something>,}#[account]pubstructSomething{pubfirst:u64,}mod other {use anchor_lang::prelude::*;#[derive(AnchorDeserialize,AnchorSerialize)]pubstructSomething{pubsecond:u64,}}
running anchor build (using anchor 0.27.0) will result in following idl:
Hi,
It might be a fringe case but if you have a struct with the
account
annotation and also a struct derivingAnchorSerialize, AnchorDeserialize
bearing the same name, both struct definitions will end up as accounts in the IDLrunning
anchor build
(using anchor 0.27.0) will result in following idl:The text was updated successfully, but these errors were encountered: