pub struct TridentSVM<'a> { /* private fields */ }Implementations§
Source§impl TridentSVM<'_>
impl TridentSVM<'_>
pub fn new( program_entries: &[ProgramEntrypoint], sbf_programs: &[SBFTargets], permanent_accounts: &[TridentAccountSharedData], ) -> TridentSVM<'_>
pub fn new_with_syscalls( program_entries: &[ProgramEntrypoint], sbf_programs: &[SBFTargets], permanent_accounts: &[TridentAccountSharedData], ) -> TridentSVM<'_>
Source§impl TridentSVM<'_>
impl TridentSVM<'_>
pub fn set_sysvar<T>(&mut self, sysvar: &T)
pub fn get_sysvar<T>(&self) -> Twhere
T: Sysvar,
pub fn add_temp_account( &mut self, address: &Pubkey, account: &AccountSharedData, )
pub fn get_account(&self, address: &Pubkey) -> Option<AccountSharedData>
pub fn get_payer(&self) -> Keypair
pub fn add_program( &mut self, address: &Pubkey, data: &[u8], authority: Option<Pubkey>, )
Source§impl TridentSVM<'_>
impl TridentSVM<'_>
pub fn process_transaction( &mut self, transaction: Transaction, ) -> LoadAndExecuteSanitizedTransactionsOutput
pub fn process_transaction_with_settle( &mut self, transaction: Transaction, ) -> Result<(), TransactionError>
pub fn clear_accounts(&mut self)
pub fn settle_accounts(&mut self, accounts: &[(Pubkey, AccountSharedData)])
Trait Implementations§
Source§impl Default for TridentSVM<'_>
impl Default for TridentSVM<'_>
Source§fn default() -> TridentSVM<'_>
fn default() -> TridentSVM<'_>
Returns the “default value” for a type. Read more
Source§impl FuzzClient for TridentSVM<'_>
impl FuzzClient for TridentSVM<'_>
fn new_client(programs: &[ProgramEntrypoint], config: &TridentConfig) -> Self
Source§fn warp_to_epoch(&mut self, warp_epoch: u64)
fn warp_to_epoch(&mut self, warp_epoch: u64)
Warp to specific epoch
Source§fn warp_to_slot(&mut self, warp_slot: u64)
fn warp_to_slot(&mut self, warp_slot: u64)
Warp to specific slot
Source§fn forward_in_time(&mut self, seconds: i64)
fn forward_in_time(&mut self, seconds: i64)
Forward in time by the desired number of seconds
Source§fn set_account_custom(&mut self, address: &Pubkey, account: &AccountSharedData)
fn set_account_custom(&mut self, address: &Pubkey, account: &AccountSharedData)
Create or overwrite a custom account, subverting normal runtime checks.
Source§fn get_account(&mut self, key: &Pubkey) -> AccountSharedData
fn get_account(&mut self, key: &Pubkey) -> AccountSharedData
Get the account at the given address
Source§fn get_last_blockhash(&self) -> Hash
fn get_last_blockhash(&self) -> Hash
Get last blockhash
Source§fn process_instructions(
&mut self,
instructions: &[Instruction],
) -> Result<(), TransactionError>
fn process_instructions( &mut self, instructions: &[Instruction], ) -> Result<(), TransactionError>
Send a transaction and return until the transaction has been finalized or rejected.
Source§fn get_sysvar<T: Sysvar>(&self) -> T
fn get_sysvar<T: Sysvar>(&self) -> T
Get the cluster rent
fn clear_accounts(&mut self)
Source§impl TransactionProcessingCallback for TridentSVM<'_>
impl TransactionProcessingCallback for TridentSVM<'_>
Auto Trait Implementations§
impl<'a> !Freeze for TridentSVM<'a>
impl<'a> RefUnwindSafe for TridentSVM<'a>
impl<'a> Send for TridentSVM<'a>
impl<'a> Sync for TridentSVM<'a>
impl<'a> Unpin for TridentSVM<'a>
impl<'a> UnwindSafe for TridentSVM<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more