solana_program::sysvar::instructions

Function get_instruction_relative

source
pub fn get_instruction_relative(
    index_relative_to_current: i64,
    instruction_sysvar_account_info: &AccountInfo<'_>,
) -> Result<Instruction, ProgramError>
Expand description

Returns the Instruction relative to the current Instruction in the currently executing Transaction.

§Errors

Returns ProgramError::UnsupportedSysvar if the given account’s ID is not equal to ID.