- Does the below declaration mean to create a PDA account?
#[derive(Accounts)]
pub struct CreatePixel<'info> {
#[account(init, payer=user, space=Pixel::LEN)]
pub pixel: Account<'info, Pixel>,
#[account(mut)]
pub user: Signer<'info>,
pub system_program: Program<'info, System>,
}
- Or must I use 'seeds' to create PDA a account? No matter the seeds' value, is even "" (empty) acceptable?
// Data validators
#[derive(Accounts)]
pub struct CreateCounter<'info> {
#[account(mut)]
authority: Signer<'info>,
#[account(
init,
seeds = [],
bump,
payer = authority,
space = 100
)]
counter: Account<'info, Counter>,
system_program: Program<'info, System>,
}