| 25 | |
| 26 | #[derive(Accounts)] |
| 27 | pub struct Initialize<'info> { |
| 28 | #[account(mut)] |
| 29 | pub user: Signer<'info>, |
| 30 | |
| 31 | // Create and initialize `Counter` account using a PDA as the address |
| 32 | #[account( |
| 33 | init, |
| 34 | seeds = [b"counter"], // optional seeds for pda |
| 35 | bump, // bump seed for pda |
| 36 | payer = user, |
| 37 | space = 8 + Counter::INIT_SPACE |
| 38 | )] |
| 39 | pub counter: Account<'info, Counter>, |
| 40 | pub system_program: Program<'info, System>, |
| 41 | } |
| 42 | |
| 43 | #[derive(Accounts)] |
| 44 | pub struct Increment<'info> { |
nothing calls this directly
no outgoing calls
no test coverage detected