OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Solana Program Examples

Solana Program Examples is a public repository of Rust reference code for Solana on-chain programs, including financial primitives and single-use programs. Examples are provided in one or more of Anchor v1, Anchor v2, Quasar, Pinocchio, native Rust and sBPF assembly.

Independent OpenViST project profile, based on linked sources.

Solana Program Examples — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use the repository when you need code-level reference material for a Solana program and want to inspect a relevant example in a supported framework.

Who it is for

  • Developers learning how Solana on-chain programs are structured.
  • Solana builders looking for a reference implementation to study or adapt.
  • Developers comparing examples across supported frameworks.

Documented uses

  • Study program designs such as escrow, lending and token exchanges.
  • Build and test an example using its documented framework-specific commands.
  • Inspect financial-program tests and Kani harnesses for stated arithmetic invariants.
Before you choose

Requirements & limits

The repository is public on GitHub. The README lists Rust, Solana CLI, Anchor and pnpm among the local development prerequisites.

  • Examples are available in one or more of six approaches: Anchor v1, Anchor v2, Quasar, Pinocchio, native Rust and sBPF assembly.
  • The README describes Anchor v2 as a release candidate that was not yet released at the time of its documentation.
  • Financial examples include tests and Kani model checks for arithmetic invariants over declared inputs.
  • A configured RPC endpoint is needed for the README's mainnet or devnet deployment path.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Build and test a documented Anchor v1 example

Run the README's documented build and test commands for an Anchor v1 example.

Before you start

  • Rust
  • Solana CLI
  • Anchor
  • pnpm for repository-wide formatting and linting
  • A cloned copy of the repository

Steps

  1. Install Anchor v1 with avm install 1.2.1 && avm use 1.2.1.

  2. Clone the repository and change into an example directory under anchor-v1/.

  3. Run anchor build to build the example.

  4. Run anchor test to run its tests.

Expected outcome

The selected Anchor v1 example is built and its documented test command is run locally.

Guide limitations

  • The README gives these commands for Anchor v1; it does not establish that every example uses this framework.
  • Deployment requires a separately configured RPC endpoint.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
quicknode/solana-program-examples · Official homepage title · retained in its source language