solarium = solana + selenium

Related tags

Testing solarium
Overview

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);
Comments
  • Fixed crank & settle functionality

    Fixed crank & settle functionality

    Crank & settle functionality were failing silently after commitment level was changed to confirmed.

    This calls the instruction rather than crank deps & settles funds correctly.

    This PR also adds cancelling order functionality, and removes local serum dependencies from solarium.

    opened by rohanp9000 1
  • Improve API for cranking

    Improve API for cranking

    consume_events_loop currently runs for some number of milliseconds. This is suboptimal because it either leads to wasted time in the test, or flaky tests if the time is too tight. An event-driven API may be better, where we keep the loop running async and keep it up until an event is consumed.

    let event = something();
    let loop = foo.consume_events_loop();
    event.block_until_consumed();
    loop.kill();
    
    opened by yuhanfang 1
  • Add Sandbox option to start validator with a program

    Add Sandbox option to start validator with a program

    solana-test-validator supports additional arguments like --clone and --bpf-program that can (hopefully) speed up the usual start-deploy-test lifecycle. Deploying seems to eat up on the order of 30 seconds of test time which is pretty heavy for simple tests.

    enhancement 
    opened by yuhanfang 1
  • Deploy a binary artifact hosted elsewhere

    Deploy a binary artifact hosted elsewhere

    We can reduce test times by setting up a companion repo containing frozen deps and built .so files. Then introduce a companion deployment method to download the .so files and deploy them.

    enhancement 
    opened by yuhanfang 1
  • Fixes for Raptor Integration Tests

    Fixes for Raptor Integration Tests

    Fixes for Raptor Integration Tests

    • Store vault_signer_key for Serum Market struct for access to the vaults
    • Add a BaseOrQuote enum
    • Add a function to get token balance by Pubkey directly
    • Other cleanup and fixes
    opened by xiecy 0
  • Attach crank functionality to Market & minimize boilerplate

    Attach crank functionality to Market & minimize boilerplate

    • Added helper functions for creating & sending transactions
    • Introduced custom Result type & changed Actor's new function to return Result<Self>
    • Added consume_events_loop (previously crank_market) to market structure, as well as settle_funds
    • Got rid of outdated tests that contained personal directories
    opened by wootmatt 0
  • Add helper function to deploy from a zip archive.

    Add helper function to deploy from a zip archive.

    Actors can now fetch, build, and deploy from a GitHub URL. Modified the Serum test cases to illustrate this.

    This is cleaner than hardcoding a local path but it still takes too long. I'll add an additional method to deploy a built binary hosted elsewhere.

    opened by yuhanfang 0
  • Add a Serum Participant abstraction.

    Add a Serum Participant abstraction.

    The Participant currently initializes token accounts and an open orders account for the target market (which can be V1 or V2). In the future, the Participant will wrap sending orders.

    Ran serum_v2() test manually to confirm that everything works through the Participant constructor.

    opened by yuhanfang 0
  • Add scaffolding for Serum bindings.

    Add scaffolding for Serum bindings.

    Create a Serum V1 or V2 market. Tested manually with and without an authority to hit both code paths.

    The Market binding is currently fairly primitive. There are no methods at all; the members are there as placeholders to further improve the class.

    opened by yuhanfang 0
Owner
null
Small programs written in Rust. Warm up for the upcoming Selenium Manager

Rust Examples This repository contains several example programs written in Rust. Selenium Manager These examples are used as warm up for the upcoming

Boni García 5 Dec 30, 2022
Solana Foundation stake bot used on the Solana Testnet and Mainnet-Beta

Effortlessly Manage Cluster Stakes The testnet and mainnet-beta clusters currently have a large population of validators that need to be staked by a c

Solana Foundation 113 Dec 29, 2022
Demonstrates Solana data account versioning used in supporting the Solana Cookbook article: Account Data Versioning

versioning-solana This repo demonstrates ONE rudimentary way to upgrade/migrate account data changes with solana program changes. What is data version

Frank V. Castellucci 6 Sep 30, 2022
Solana Game Server is a decentralized game server running on Solana, designed for game developers

Solana Game Server* is the first decentralized Game Server (aka web3 game server) designed for game devs. (Think web3 SDK for game developers as a ser

Tardigrade Life Sciences, Inc 16 Dec 1, 2022
⚓ Solana Sealevel Framework

Anchor ⚓ Anchor is a framework for Solana's Sealevel runtime providing several convenient developer tools. Rust eDSL for writing Solana programs IDL s

Project Serum 2.6k Jan 2, 2023
Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens; Starting a variety of auctions for primary/secondary

Metaplex Foundation 3.2k Jan 4, 2023
🕶 Assorted checks and validations for writing safer Solana programs.

vipers ?? Assorted checks and validations for writing safer Solana programs. Motivation Solana's fee mechanism is unlike Ethereum's, in that the numbe

Saber 131 Sep 14, 2022
⛏ An open protocol for launching liquidity mining programs on Solana.

⛏ Quarry An open protocol for launching liquidity mining programs on Solana. Background Quarry was built with the intention of helping more Solana pro

Quarry Protocol 207 Dec 19, 2022
The Voting example based on MoonZoon and Solana.

Voting example The Rust-only Voting example based on MoonZoon and Solana. MoonZoon is a Rust Fullstack Framework. Solana is a decentralized blockchain

Martin Kavík 26 Dec 8, 2022
A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way

Solana PoC Framework DISCLAIMER: any illegal usage of this framework is heavily discouraged. Most projects on Solana offer a more than generous bug bo

Neodyme 165 Dec 18, 2022
Repo for Monaco, a DCA engine for Solana. Built on Solend and lending protocols (Jet, Solend, Port, etc...)

Monaco Monaco is a DCA protocol for solana built on top of Serum and compatible with any program that implements or extends the instruction interface

Rohan Kapur 19 Apr 13, 2022
Command line interface for Solana Metaplex programs.

Metaplex Command Line Interface This is a command line interface for creating and managing non-fungible tokens on the Solana blockchain through the Me

Caleb Everett 26 Jul 12, 2022
Generate Nice Solana Address By Template

Yes, I know about GPU generators. https://smith-mcf.medium.com/solana-vanity-address-using-gpus-5a68ad94d1d4 ./solana-nice-address --help solana-nice-

Kirill Fomichev 18 Jun 18, 2022
The Voting example based on MoonZoon and Solana + Anchor framework.

The Voting example based on MoonZoon and Solana + Anchor framework.

Martin Kavík 6 Aug 13, 2022
The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime.

Solana Program Library The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs a

null 6 Jun 12, 2022
🐉 Aggregate of Solana stake pools.

?? aSOL: Aggregate Stake Pool aSOL is an unbiased stake pool aggregator built to tackle one goal: to ensure all SOL on Solana is staked into stake poo

aSOL 36 Sep 3, 2022
sandbox to play around numerous functionalities on Solana

Solana Sandbox This sandbox is for verifying smart contracts(programs) implemented on Solana for a self-study purpose. Programs Currently implemented

Tomoaki Imai 22 May 11, 2022
Solana Escrow Program written by RUST.

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

Blockchain*Lover* 5 Mar 10, 2022
A suite of programs for Solana key management and security.

?? goki Goki is a suite of programs for Solana key management and security. It currently features: Goki Smart Wallet: A wallet loosely based on the Se

Goki Protocol 157 Dec 8, 2022
NFT Marketplace with Rust on Solana

NFT Marketplace with Rust on Solana Compile and Deploy Contracts make sure you have solana installed make sure you have rust installed install phantom

null 37 Dec 16, 2022