Module solana_sdk::sysvar::instructions
source · Expand description
The serialized instructions of the current transaction.
The instructions sysvar provides access to the serialized instruction data for the currently-running transaction. This allows for instruction introspection, which is required for correctly interoperating with native programs like the secp256k1 and ed25519 programs.
Unlike other sysvars, the data in the instructions sysvar is not accessed
through a type that implements the Sysvar
trait. Instead, the
instruction sysvar is accessed through several free functions within this
module.
See also the Solana documentation on the instructions sysvar.
Examples
For a complete example of how the instructions sysvar is used see the
documentation for secp256k1_instruction
in the solana-sdk
crate.
Structs
Borrowed version of
AccountMeta
.Borrowed version of
Instruction
.Instructions sysvar, dummy type.
Statics
The static program ID.
Functions
Returns
true
if given pubkey is the program ID.Construct the account data for the instructions sysvar.
Returns the
Instruction
relative to the current Instruction
in the
currently executing Transaction
.Returns the program ID.
load_current_indexDeprecated
Load the current
Instruction
’s index in the currently executing
Transaction
.Load the current
Instruction
’s index in the currently executing
Transaction
.load_instruction_atDeprecated
Load an
Instruction
in the currently executing Transaction
at the
specified index.Load an
Instruction
in the currently executing Transaction
at the
specified index.Store the current
Instruction
’s index in the instructions sysvar data.