trident_client::fuzzing

Trait FuzzClient

Source
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§

Source

fn get_sysvar<T>(&mut self) -> T
where T: Sysvar,

Get the cluster rent

Source

fn warp_to_epoch(&mut self, warp_epoch: u64)

Warp to specific epoch

Source

fn warp_to_slot(&mut self, warp_slot: u64)

Warp to specific slot

Source

fn forward_in_time(&mut self, seconds: i64) -> Result<(), FuzzClientError>

Forward in time by the desired number of seconds

Source

fn set_account_custom(&mut self, address: &Pubkey, account: &AccountSharedData)

Create or overwrite a custom account, subverting normal runtime checks.

Source

fn payer(&self) -> Keypair

Get the Keypair of the client’s payer account

Source

fn get_account(&mut self, key: &Pubkey) -> AccountSharedData

Get the account at the given address

Source

fn get_last_blockhash(&self) -> Hash

Get last blockhash

Source

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.

Implementors§