Skip to content
Chapters

Getting started

Network: devnet, always

Devnet, always. Pointing the CLI, Anchor and the frontend at the same network.

solana config set --url devnet
solana-keygen new --no-bip39-passphrase      # local wallet, if you have none — devnet only, never fund it on mainnet
solana airdrop 2                              # free SOL; if it rate-limits you: https://faucet.solana.com
solana balance
solana config get                             # confirm cluster and keypair

The explorer works the same: https://explorer.solana.com/?cluster=devnet. Nobody deploys to mainnet in a hackathon.

The CLI, Anchor and the frontend are configured separately: this only changed the CLI. cluster = "devnet" goes in Anchor.toml and the URL from the RPC page in .env.local. Make all three point at the same network — half of all "account not found" errors are one component looking at another cluster.