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 Atlas 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 atlas-sdk crate.
Structs§
- Instructions
- Instructions sysvar, dummy type.
Constants§
- ID
- The const program ID.
Functions§
- check_
id - Returns
trueif given pubkey is the program ID. - construct_
instructions_ data Non- target_os="atlas" - Construct the account data for the instructions sysvar.
- deserialize_
instruction - get_
instruction_ relative - Returns the
Instructionrelative to the currentInstructionin the currently executingTransaction. - id
- Returns the program ID.
- load_
current_ index_ checked - Load the current
Instruction’s index in the currently executingTransaction. - load_
instruction_ at - Load an
Instructionin the currently executingTransactionat the specified index. - load_
instruction_ at_ checked - Load an
Instructionin the currently executingTransactionat the specified index. - serialize_
instructions - store_
current_ index_ checked - Store the current
Instruction’s index in the instructions sysvar data.