anchor icon indicating copy to clipboard operation
anchor copied to clipboard

lang: use underscore _ to prefix all internal names in account constraints code generation

Open armaniferrante opened this issue 2 years ago • 2 comments

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>,
}

armaniferrante avatar Aug 25 '22 14:08 armaniferrante

Please assign me to this one @armaniferrante!

stegaBOB avatar Aug 26 '22 19:08 stegaBOB

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?

patrickishaf avatar May 01 '23 06:05 patrickishaf