Expand description
Borrowed-state execution context.
The Frame is Hopper’s execution model. It wraps the instruction’s accounts
and data, enforcing single-mutable-borrow discipline and phased execution.
§Execution Phases
- Resolve – Parse accounts from the input slice into named typed slots
- Validate – Run the validation graph (account-local, cross-account, state-transition)
- Borrow – Obtain zero-copy overlays with borrow discipline
- Mutate – Execute state changes through verified mutable references
- Emit – Fire events
- Commit – (implicit: Solana runtime commits on success)
The Frame ensures that:
- Each account is borrowed at most once mutably
- Immutable borrows can coexist
- Validation runs before mutation
- Events are emitted after state changes
Modules§
Structs§
- Frame
- Execution frame holding the instruction’s accounts and data.
- Frame
Account - Immutable account view within a Frame.
- Frame
Account Mut - Mutable account view within a Frame.
Constants§
- MAX_
FRAME_ ACCOUNTS - Maximum accounts in a single frame. Matches Solana’s transaction limit.