pub trait TransactionProcessingCallback {
// Required methods
fn account_matches_owners(
&self,
account: &Pubkey,
owners: &[Pubkey],
) -> Option<usize>;
fn get_account_shared_data(
&self,
pubkey: &Pubkey,
) -> Option<AccountSharedData>;
// Provided methods
fn add_builtin_account(&self, _name: &str, _program_id: &Pubkey) { ... }
fn inspect_account(
&self,
_address: &Pubkey,
_account_state: AccountState<'_>,
_is_writable: bool,
) { ... }
fn get_current_epoch_vote_account_stake(
&self,
_vote_address: &Pubkey,
) -> u64 { ... }
fn calculate_fee(
&self,
_message: &impl SVMMessage,
_lamports_per_signature: u64,
_prioritization_fee: u64,
_feature_set: &FeatureSet,
) -> FeeDetails { ... }
}
Expand description
Runtime callbacks for transaction processing.
Required Methods§
Provided Methods§
fn add_builtin_account(&self, _name: &str, _program_id: &Pubkey)
fn inspect_account( &self, _address: &Pubkey, _account_state: AccountState<'_>, _is_writable: bool, )
fn get_current_epoch_vote_account_stake(&self, _vote_address: &Pubkey) -> u64
fn calculate_fee( &self, _message: &impl SVMMessage, _lamports_per_signature: u64, _prioritization_fee: u64, _feature_set: &FeatureSet, ) -> FeeDetails
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.