Skip to content

Repository files navigation

🪶 Anchor Program Starter

This repository contains a basic Solana Anchor project — a boilerplate for developing, testing, and deploying smart contracts (programs) on the Solana blockchain.


📦 Project Structure

├── Anchor.toml # Anchor workspace config
├── Cargo.toml # Rust package config
├── programs/
│ └── test-hello-world/ # Main Solana program source code
├── tests/ # Integration tests
└── migrations/ # Optional migration scripts

⚙️ Prerequisites

Make sure you have the following installed:

  • Rusthttps://rustup.rs
  • Solana CLIsh -c "$(curl -sSfL https://release.solana.com/stable/install)"
  • Anchor CLIcargo install --git https://github.com/coral-xyz/anchor anchor-cli

Verify installation:

solana --version
anchor --version
rustc --version

🚀 Local Development

Build and test your program.

anchor build
anchor test

Run a local validator:

solana-test-validator

Then deploy:

anchor deploy --provider.cluster localnet 

🧪 Testing

Anchor provides Mocha-style tests using TypeScript. To run them:

anchor test

Or run individual tests:

npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts

🪄 License

MIT — feel free to modify and use for your own Solana projects.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages