Skip to content

Instantly share code, notes, and snippets.

@arcticmatt
Created August 6, 2022 22:19
Show Gist options
  • Save arcticmatt/f0021b05069a69536eff8d2090449082 to your computer and use it in GitHub Desktop.
Save arcticmatt/f0021b05069a69536eff8d2090449082 to your computer and use it in GitHub Desktop.
// Old code
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(mut)]
wallet: Signer<'info>,
#[account(init, payer=wallet, space=100)]
foo_account: Account<'info, FooAccount>,
system_program: Program<'info, System>,
}
// New code
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(mut)]
wallet: Signer<'info>,
#[account(init, payer=wallet, space=200)]
foo_account: Account<'info, FooAccount>,
system_program: Program<'info, System>,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment