This is a template repository for a Solana program built with Anchor.
- 🚀 Modern Stack: Built with Anchor framework for Solana program development
- 🔗 Blockchain Ready: Deploy to devnet or mainnet with automated scripts
- 🧪 Testing: Anchor test framework with TypeScript client tests
- 🔒 Security:
- Squads multisig support for upgrade authority
- Pre-deployment validation checks
- 🛠️ Developer Experience:
- Code quality with Biome for TypeScript linting
- Changesets for versioning
- Local validator for development
- Easy spin up with Tilt
- 🚢 Production Ready:
- Automated deployment scripts
- Pre-deploy validation
- Upgrade support
bun install
tilt upbun build
# or
anchor buildbun test
# or
anchor testStart a local Solana validator:
./scripts/start-validator.sh# Get devnet SOL (repeat 4-5 times)
solana config set --url devnet
solana airdrop 2
# Deploy
./scripts/deploy.sh devnet --new./scripts/deploy.sh mainnet --new./scripts/deploy.sh devnet
# or
./scripts/deploy.sh mainnet| Script | Description |
|---|---|
deploy.sh |
Build and deploy to devnet/mainnet |
pre-deploy-check.sh |
Validate config before deployment |
start-validator.sh |
Start local Solana validator |
init-config.ts |
Initialize on-chain program config |
programs/{{program-name}}/
├── src/
│ ├── lib.rs # Program entry point
│ ├── instructions/ # Instruction handlers
│ ├── state/ # Account definitions
│ └── errors.rs # Custom errors
scripts/
├── deploy.sh # Deployment automation
└── ...
tests/
├── {{program-name}}.ts # TypeScript tests
| Action | Approximate Cost |
|---|---|
| First deployment | ~8 SOL |
| Upgrade | ~0.01 SOL |
For mainnet deployments, use Squads multisig to secure upgrade authority:
solana program set-upgrade-authority <PROGRAM_ID> \
--new-upgrade-authority <SQUADS_ADDRESS>The code in this repository is licensed under Apache 2.0, © Omni LLC. See LICENSE.md for more information.