anchor
anchor copied to clipboard
lang: use underscore _ to prefix all internal names in account constraints code generation
For example, the payer = <>
here should be used with an underscore in the code gen.
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(mut)]
fee_payer: Signer<'info>,
payer: UncheckedAccount<'info>,
receiver: UncheckedAccount<'info>,
#[account(init, seeds = [AccountRecord::PREFIX.as_ref(), payer.key().as_ref()], bump, space=AccountRecord::SIZE, payer = fee_payer)]
account_record: Account<'info, AccountRecord>,
system_program: Program<'info, System>,
}
Please assign me to this one @armaniferrante!
Don't know if this issue is still there but I've searched for this struct in codegen and the entirety of lang. I couldn't find it. Has it been removed from the codebase?