Struct solana_program_runtime::invoke_context::InvokeContext [−][src]
pub struct InvokeContext<'a> {
pub sysvars: &'a [(Pubkey, Vec<u8>)],
pub instruction_recorder: Option<&'a InstructionRecorder>,
pub feature_set: Arc<FeatureSet>,
pub timings: ExecuteDetailsTimings,
pub blockhash: Hash,
pub lamports_per_signature: u64,
pub return_data: (Pubkey, Vec<u8>),
// some fields omitted
}
Fields
sysvars: &'a [(Pubkey, Vec<u8>)]
instruction_recorder: Option<&'a InstructionRecorder>
feature_set: Arc<FeatureSet>
timings: ExecuteDetailsTimings
blockhash: Hash
lamports_per_signature: u64
return_data: (Pubkey, Vec<u8>)
Implementations
pub fn new(
rent: Rent,
accounts: &'a [TransactionAccountRefCell],
builtin_programs: &'a [BuiltinProgram],
sysvars: &'a [(Pubkey, Vec<u8>)],
log_collector: Option<Rc<RefCell<LogCollector>>>,
compute_budget: ComputeBudget,
executors: Rc<RefCell<Executors>>,
feature_set: Arc<FeatureSet>,
blockhash: Hash,
lamports_per_signature: u64
) -> Self
pub fn new_mock(
accounts: &'a [TransactionAccountRefCell],
builtin_programs: &'a [BuiltinProgram]
) -> Self
Push a stack frame onto the invocation stack
Current depth of the invocation stack
Entrypoint for a cross-program invocation from a builtin program
Helper to prepare for process_instruction()
Process a cross-program instruction
Get the program ID of the currently executing program
Get the owner of the currently executing program
👎 Deprecated since 1.9.0: To be removed together with remove_native_loader
To be removed together with remove_native_loader
Removes the first keyed account
Get the list of keyed accounts
Get the list of keyed accounts skipping first_instruction_account
many entries
Get this invocation’s LogCollector
Get this invocation’s ComputeMeter
Loaders may need to do work in order to execute a program. Cache the work that can be re-used across executions
Get the completed loader work that can be re-used across execution
Find an account_index and account by its key
Get this invocation’s compute budget
Get the value of a sysvar by its id