Skip to content

Trident's Fuzz Client#

Trident's Client (FuzzClient) is a wrapper around the TridentSVM that provides methods to manipulate the execution environment during fuzzing.

This section describes the methods that are available in the FuzzClient.

Trident Client Methods#

deploy_entrypoint#

Syscalls Feature Requirement

This method is only available if the syscall-v1 or syscall-v2 features are enabled.

Deploys a program through its entrypoint.

fn deploy_entrypoint(&mut self, program: TridentEntrypoint)


deploy_program#

Deploys a program as binary.

fn deploy_program(&mut self, program: TridentProgram)


get_sysvar#

Retrieves Sysvars like Rent, Clock, etc.

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


warp_to_epoch#

Advances the fuzz test to a specific epoch.

fn warp_to_epoch(&mut self, warp_epoch: u64)


warp_to_slot#

Advances the fuzz test to a specific slot.

fn warp_to_slot(&mut self, warp_slot: u64)


warp_to_timestamp#

Sets the fuzz test to a specific timestamp.

fn warp_to_timestamp(&mut self, warp_timestamp: i64)


forward_in_time#

Advances the fuzz test by the specified number of seconds.

fn forward_in_time(&mut self, seconds: i64)


set_account_custom#

Creates or overwrites an account at the specified address, bypassing normal runtime checks.

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


get_account#

Retrieves the account data at the specified address.

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


payer#

Returns the keypair of the client's payer account.

fn payer(&self) -> Keypair


get_last_blockhash#

Retrieves the most recent blockhash.

Warning

Currently, this method is not implemented and a call to this method will result in a panic.

fn get_last_blockhash(&self) -> Hash