Examples
Complete test examples for common Solana testing scenarios
Overview
This section provides complete, ready-to-use examples for common Solana testing scenarios with LiteSVM. Each example includes full code with explanations.
Available Examples
SOL Transfer
Test transferring SOL between accounts
Program Deployment
Deploy and call a simple program
PDA Creation
Create and interact with Program Derived Addresses
Error Handling
Test error conditions and edge cases
SPL Token Operations
Create mints, token accounts, and transfer tokens
Cross-Program Invocation
Test programs calling other programs
Time-Based Testing
Test features that depend on slots or timestamps
Github Examples
View several linked projects using LiteSVM tests