Expand description
Solana testing utilities and fixtures
Protocol-specific fixture setup functions. For core test infrastructure
(TestContext, execute, fund_token, etc.), use solana-test-core directly.
Re-exports§
pub use wp_solana_test_core;
Modules§
- execute
- Transaction execution helpers for
TestContext. - protocols
Structs§
- Test
Context - Shared test context that bundles a LiteSVM instance, an RPC client backed
by
MockRpcSender, and a funded payer keypair.
Functions§
- execute
- Build, sign, and send a transaction through the mock RPC client.
- execute_
with_ logs - Execute a transaction and return the signature together with program logs.
- fund_
token - Create an Associated Token Account for
owneronmint, then mintamounttokens into it. - fund_
wsol - Create an Associated Token Account for WSOL and wrap
amountlamports of SOL into it viasync_native. - load_
accounts_ json - Load multiple accounts from a JSON fixture array into the SVM.
- load_
program - Load a BPF program into the SVM at
program_id. - new_
test_ context - Create a new
TestContextwith a fresh LiteSVM, mock RPC client, and a payer funded with 1 000 SOL. - override_
mint_ authority - Override a SPL-Token mint’s
mint_authoritytonew_authority. - set_
account - Set a single account in the SVM at
addr.