MCPcopy Create free account
hub / github.com/AlmostEfficient/full-stack-solana-dev / Initialize

Class Initialize

counter/programs/counter/src/lib.rs:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26#[derive(Accounts)]
27pub 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)]
44pub struct Increment<'info> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected