Module solana_program::instruction
source · Expand description
Types for directing the execution of Safecoin programs.
Every invocation of a Safecoin program executes a single instruction, as
defined by the Instruction
type. An instruction is primarily a vector of
bytes, the contents of which are program-specific, and not interpreted by
the Safecoin runtime. This allows flexibility in how programs behave, how they
are controlled by client software, and what data encodings they use.
Besides the instruction data, every account a program may read or write
while executing a given instruction is also included in Instruction
, as
AccountMeta
values. The runtime uses this information to efficiently
schedule execution of transactions.
Structs
- Describes a single account read or written by a program during instruction execution.
- A compact encoding of an instruction.
- A directive for a single invocation of a Safecoin program.
- Use to query and convey information about the sibling instruction components when calling the
sol_get_processed_sibling_instruction
syscall.
Enums
- Reasons the runtime might have rejected an instruction.
Constants
Functions
- Returns a sibling instruction from the processed sibling instruction list.
- Get the current stack height, transaction-level instructions are height TRANSACTION_LEVEL_STACK_HEIGHT, fist invoked inner instruction is height TRANSACTION_LEVEL_STACK_HEIGHT + 1, etc…