solana_program::program_stubs

Trait SyscallStubs

Source
pub trait SyscallStubs: Sync + Send {
Show 21 methods // Provided methods fn sol_log(&self, message: &str) { ... } fn sol_log_compute_units(&self) { ... } fn sol_remaining_compute_units(&self) -> u64 { ... } fn sol_invoke_signed( &self, _instruction: &Instruction, _account_infos: &[AccountInfo<'_>], _signers_seeds: &[&[&[u8]]], ) -> ProgramResult { ... } fn sol_get_sysvar( &self, _sysvar_id_addr: *const u8, _var_addr: *mut u8, _offset: u64, _length: u64, ) -> u64 { ... } fn sol_get_clock_sysvar(&self, _var_addr: *mut u8) -> u64 { ... } fn sol_get_epoch_schedule_sysvar(&self, _var_addr: *mut u8) -> u64 { ... } fn sol_get_fees_sysvar(&self, _var_addr: *mut u8) -> u64 { ... } fn sol_get_rent_sysvar(&self, _var_addr: *mut u8) -> u64 { ... } fn sol_get_epoch_rewards_sysvar(&self, _var_addr: *mut u8) -> u64 { ... } fn sol_get_last_restart_slot(&self, _var_addr: *mut u8) -> u64 { ... } fn sol_get_epoch_stake(&self, _vote_address: *const u8) -> u64 { ... } unsafe fn sol_memcpy(&self, dst: *mut u8, src: *const u8, n: usize) { ... } unsafe fn sol_memmove(&self, dst: *mut u8, src: *const u8, n: usize) { ... } unsafe fn sol_memcmp( &self, s1: *const u8, s2: *const u8, n: usize, result: *mut i32, ) { ... } unsafe fn sol_memset(&self, s: *mut u8, c: u8, n: usize) { ... } fn sol_get_return_data(&self) -> Option<(Pubkey, Vec<u8>)> { ... } fn sol_set_return_data(&self, _data: &[u8]) { ... } fn sol_log_data(&self, fields: &[&[u8]]) { ... } fn sol_get_processed_sibling_instruction( &self, _index: usize, ) -> Option<Instruction> { ... } fn sol_get_stack_height(&self) -> u64 { ... }
}

Provided Methods§

Source

fn sol_log(&self, message: &str)

Source

fn sol_log_compute_units(&self)

Source

fn sol_remaining_compute_units(&self) -> u64

Source

fn sol_invoke_signed( &self, _instruction: &Instruction, _account_infos: &[AccountInfo<'_>], _signers_seeds: &[&[&[u8]]], ) -> ProgramResult

Source

fn sol_get_sysvar( &self, _sysvar_id_addr: *const u8, _var_addr: *mut u8, _offset: u64, _length: u64, ) -> u64

Source

fn sol_get_clock_sysvar(&self, _var_addr: *mut u8) -> u64

Source

fn sol_get_epoch_schedule_sysvar(&self, _var_addr: *mut u8) -> u64

Source

fn sol_get_fees_sysvar(&self, _var_addr: *mut u8) -> u64

Source

fn sol_get_rent_sysvar(&self, _var_addr: *mut u8) -> u64

Source

fn sol_get_epoch_rewards_sysvar(&self, _var_addr: *mut u8) -> u64

Source

fn sol_get_last_restart_slot(&self, _var_addr: *mut u8) -> u64

Source

fn sol_get_epoch_stake(&self, _vote_address: *const u8) -> u64

Source

unsafe fn sol_memcpy(&self, dst: *mut u8, src: *const u8, n: usize)

§Safety
Source

unsafe fn sol_memmove(&self, dst: *mut u8, src: *const u8, n: usize)

§Safety
Source

unsafe fn sol_memcmp( &self, s1: *const u8, s2: *const u8, n: usize, result: *mut i32, )

§Safety
Source

unsafe fn sol_memset(&self, s: *mut u8, c: u8, n: usize)

§Safety
Source

fn sol_get_return_data(&self) -> Option<(Pubkey, Vec<u8>)>

Source

fn sol_set_return_data(&self, _data: &[u8])

Source

fn sol_log_data(&self, fields: &[&[u8]])

Source

fn sol_get_processed_sibling_instruction( &self, _index: usize, ) -> Option<Instruction>

Source

fn sol_get_stack_height(&self) -> u64

Implementors§