Skip to main content

Crate solana_program_test

Crate solana_program_test 

Source
Expand description

The solana-program-test provides a BanksClient-based test framework SBF programs

Re-exports§

pub use tokio;

Macros§

processor
Converts a solana-program-style entrypoint into the runtime’s entrypoint style, for use with ProgramTest::add_program

Structs§

BanksClient
BanksTransactionResultWithMetadata
EbpfVm
A virtual machine to run eBPF programs.
EncryptedHostAddressToEbpfVm
Encrypted address to the EbpfVm object.
InvokeContext
Main pipeline from runtime to program execution.
MemoryMapping
Common parts of UnalignedMemoryMapping and AlignedMemoryMapping
ProgramTest
ProgramTestContext

Enums§

BanksClientError
Errors from BanksClient
EbpfError
Error definitions
ProgramTestError
Errors from the program test environment

Traits§

BuiltinFunctionDefinition
Native built-in functions that can be made available to programs to call.
ProgramTestBanksClientExt

Functions§

find_file
get_runtime_environment_key
Returns (and if not done before generates) the encryption key for the VM pointer
invoke_builtin_function
read_file
sol_get_clock_sysvar
Calls the native program-test stub for the legacy clock sysvar syscall.
sol_get_epoch_rewards_sysvar
Calls the native program-test stub for the legacy epoch rewards sysvar syscall.
sol_get_epoch_schedule_sysvar
Calls the native program-test stub for the legacy epoch schedule sysvar syscall.
sol_get_fees_sysvar
Calls the native program-test stub for the legacy fees sysvar syscall.
sol_get_last_restart_slot
Calls the native program-test stub for the legacy last restart slot syscall.
sol_get_rent_sysvar
Calls the native program-test stub for the legacy rent sysvar syscall.

Type Aliases§

IndexOfAccount
Index of an account inside of the transaction or an instruction.