8000 GitHub - foonetic/solarium
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

foonetic/solarium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solarium = solana + selenium

Test driver for Solana.

Example usage:

// Starts solana-test-validator with an empty ledger.
let sandbox = Sandbox::new()?;

// Creates an actor and airdrops 10 SOL.
let actor = Actor::new(&sandbox);
actor.airdrop(10 * LAMPORTS_PER_SOL)?;

// Actor deploys a proram.
let program = actor.deploy(std::path::Path::new("target/deploy/program.so"))?;

// Creates a mint and associated token account.
let mint = Mint::new(&sandbox, &actor, 0, None, None)?;
let token_account = TokenAccount::new(&sandbox, &actor, &mint, None)?;

// Mints to the token account.
let account_info = token_account.get_state()?;
assert_eq!(0, account_info.amount);
mint.mint_to(&actor, &token_account, 123)?;
let account_info = token_account.get_state()?;
assert_eq!(123, account_info.amount);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages

0