Quick Reference
Quick reference table and getting started guide
Quick Reference
Method | Description |
---|---|
LiteSVM::new() | Create new LiteSVM basic test environment |
LiteSVM::default() | Returns the "default value" for a type |
airdrop(&Pubkey, lamports) | Funds the account with the lamports specified |
get_account(&Pubkey) | Returns all information associated with the account of the provided pubkey |
set_account(Pubkey, Account) | Sets all information associated with the account of the provided pubkey |
get_balance(&Pubkey) | Gets the lamport balance of the provided account pubkey |
minimum_balance_for_rent_exemption(data_len) | Returns minimum balance required to make an account with specified data length rent exempt |
add_program(program_id, &bytes) | Adds an SBF program to the test environment |
add_program_from_file(program_id, path) | Adds an SBF program to the test environment from the file specified |
send_transaction(tx) | Submits a signed transaction |
simulate_transaction(tx) | Simulates a transaction without modifying state |
get_transaction(&signature) | Gets a transaction from history |
latest_blockhash() | Gets current blockhash |
expire_blockhash() | Force blockhash expiration on the current blockhash |
warp_to_slot(slot) | Warps the clock to the specified slot |
get_sysvar<T>() | Gets a sysvar from the test environment |
set_sysvar<T>(&value) | Sets the sysvar to the test environment |