agsol-testbench 0.0.1-alpha.3

Testbench utilities for testing solana programs locally
1
2
3
4
5
6
7
8
9
10
11
12
13
use solana_program::pubkey::Pubkey;
use solana_program_runtime::invoke_context::ProcessInstructionWithContext;

/// A BPF program that can be loaded into the testbench.
///
/// If the `process_instruction` field is `None`, the testbench will look for a
/// compiled BPF file in the `tests/fixtures` directory based on the `name` and
/// `program_id`.
pub struct TestbenchProgram<'a> {
    pub name: &'a str,
    pub id: Pubkey,
    pub process_instruction: Option<ProcessInstructionWithContext>,
}