pub trait FuzzClient {
// Required methods
fn new_client(
programs: &[ProgramEntrypoint],
config: &TridentConfig,
) -> Self;
fn get_sysvar<T: Sysvar>(&self) -> T;
fn warp_to_epoch(&mut self, warp_epoch: u64);
fn warp_to_slot(&mut self, warp_slot: u64);
fn forward_in_time(&mut self, seconds: i64);
fn set_account_custom(
&mut self,
address: &Pubkey,
account: &AccountSharedData,
);
fn payer(&self) -> Keypair;
fn get_account(&mut self, key: &Pubkey) -> AccountSharedData;
fn get_last_blockhash(&self) -> Hash;
fn process_instructions(
&mut self,
_instructions: &[Instruction],
) -> Result<(), TransactionError>;
fn clear_accounts(&mut self);
}Expand description
A trait providing methods to read and write (manipulate) accounts
Required Methods§
fn new_client(programs: &[ProgramEntrypoint], config: &TridentConfig) -> Self
Sourcefn get_sysvar<T: Sysvar>(&self) -> T
fn get_sysvar<T: Sysvar>(&self) -> T
Get the cluster rent
Sourcefn warp_to_epoch(&mut self, warp_epoch: u64)
fn warp_to_epoch(&mut self, warp_epoch: u64)
Warp to specific epoch
Sourcefn warp_to_slot(&mut self, warp_slot: u64)
fn warp_to_slot(&mut self, warp_slot: u64)
Warp to specific slot
Sourcefn forward_in_time(&mut self, seconds: i64)
fn forward_in_time(&mut self, seconds: i64)
Forward in time by the desired number of seconds
Sourcefn 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.
Sourcefn get_account(&mut self, key: &Pubkey) -> AccountSharedData
fn get_account(&mut self, key: &Pubkey) -> AccountSharedData
Get the account at the given address
Sourcefn get_last_blockhash(&self) -> Hash
fn get_last_blockhash(&self) -> Hash
Get last blockhash
Sourcefn 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.
fn clear_accounts(&mut self)
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.