Skip to content

Instantly share code, notes, and snippets.

// 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>,
}
// Old code
pub fn test_ix<'info>(
ctx: Context<'_, '_, '_, 'info, TestIx<'info>>,
test1: u8,
test2: u16,
test3: u32,
) -> Result<()> {
msg!("test1 {}", test1);
msg!("test2 {}", test2);
msg!("test3 {}", test3);