pub struct Initialize {
pub program_id: Pubkey,
pub payer: Pubkey,
pub state_pda: Pubkey,
pub manager: Pubkey,
pub reclaim_authority: Pubkey,
}Expand description
Builder for an Initialize instruction.
payer funds the new account’s rent and signs. It is meant to be the
transaction’s fee payer: the state is created once at deployment and never
deallocated, so there’s no need for a dedicated funding account separate
from whoever pays for the deployment transaction.
state_pda must be the canonical PDA returned by
crate::pda::state::find_state_pda; the program derives the bump itself
and rejects any other address.
manager and reclaim_authority are recorded verbatim in the state PDA’s
data: the account authorized to add and remove solvers, and the account
authorized to reclaim rent for buffers. See
crate::data::state::StateAccount.
The state account is owned by the settlement program. This instruction succeeds only once: a second call fails because the account already exists.
Wire format: [discriminator=3, manager (32 bytes), reclaim_authority (32 bytes)], 65 bytes. Required accounts: [payer (W,S), state_pda (W), system_program (R)]. The system program must be available for the
CreateAccount CPI but doesn’t need to sit at that specific position.
Fields§
§program_id: Pubkey§payer: Pubkey§state_pda: Pubkey§manager: Pubkey