pub trait InvokeContextCallback {
// Provided methods
fn get_epoch_stake(&self) -> u64 { ... }
fn get_epoch_stake_for_vote_account(&self, _vote_address: &Pubkey) -> u64 { ... }
fn is_precompile(&self, _program_id: &Pubkey) -> bool { ... }
fn process_precompile(
&self,
_program_id: &Pubkey,
_data: &[u8],
_instruction_datas: Vec<&[u8]>,
) -> Result<(), PrecompileError> { ... }
}๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Expand description
Callback used by InvokeContext in SVM
Provided Methodsยง
Sourcefn get_epoch_stake(&self) -> u64
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
fn get_epoch_stake(&self) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns the total current epoch stake for the network.
Sourcefn get_epoch_stake_for_vote_account(&self, _vote_address: &Pubkey) -> u64
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
fn get_epoch_stake_for_vote_account(&self, _vote_address: &Pubkey) -> u64
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns the current epoch stake for the given vote account.
Sourcefn is_precompile(&self, _program_id: &Pubkey) -> bool
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
fn is_precompile(&self, _program_id: &Pubkey) -> bool
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Returns true if the program_id corresponds to a precompiled program
Sourcefn process_precompile(
&self,
_program_id: &Pubkey,
_data: &[u8],
_instruction_datas: Vec<&[u8]>,
) -> Result<(), PrecompileError>
๐Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
fn process_precompile( &self, _program_id: &Pubkey, _data: &[u8], _instruction_datas: Vec<&[u8]>, ) -> Result<(), PrecompileError>
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Calls the precompiled program corresponding to the given program ID.