trident_fuzz::fuzz_client

Trait FuzzClient

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

Source

fn new_client(programs: &[ProgramEntrypoint], config: &TridentConfig) -> Self

Source

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

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)

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_instructions( &mut self, _instructions: &[Instruction], ) -> Result<(), TransactionError>

Send a transaction and return until the transaction has been finalized or rejected.

Source

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.

Implementors§