pub trait FuzzClient {
// Required methods
fn get_sysvar<T>(&mut self) -> T
where T: Sysvar;
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) -> Result<(), FuzzClientError>;
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_transaction(
&mut self,
transaction: impl Into<VersionedTransaction>,
) -> Result<(), FuzzClientError>;
}Expand description
A trait providing methods to read and write (manipulate) accounts
Required Methods§
Sourcefn get_sysvar<T>(&mut self) -> Twhere
T: Sysvar,
fn get_sysvar<T>(&mut self) -> Twhere
T: Sysvar,
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) -> Result<(), FuzzClientError>
fn forward_in_time(&mut self, seconds: i64) -> Result<(), FuzzClientError>
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_transaction(
&mut self,
transaction: impl Into<VersionedTransaction>,
) -> Result<(), FuzzClientError>
fn process_transaction( &mut self, transaction: impl Into<VersionedTransaction>, ) -> Result<(), FuzzClientError>
Send a transaction and return until the transaction has been finalized or rejected.
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.