Skip to main content

Toolchain

Programs

If a local target/deploy/<name>-keypair.json belongs to a different address, build with anchor build --ignore-keys. Don’t run anchor keys sync unless you mean to change the program IDs.

Tests

The tests run in LiteSVM (no validator) and load all three programs from target/deploy/, so build first and rebuild after any program change.
The basis-vault tests live in their own crate (tests/basis) because Phoenix’s Hawkeye program needs a newer LiteSVM:

Local mainnet fork

The wallet that runs bootstrap-fork.sh becomes the protocol admin. npm run devnet -- <command> has one command per core instruction. npm run integrations-fork -- <command> covers funding, Kamino, Jupiter, Titan, Phoenix, Perena and the basis vaults. Run either with no command to print its list.

App

Key settings in .env.example: NEXT_PUBLIC_SOLANA_RPC_URL, NEXT_PUBLIC_SOLANA_WS_URL, FORK_RPC_URL, NEXT_PUBLIC_VANNA_PROGRAM_ID, ACCESS_CODE (the code the site asks for once; required, the site stays locked without it), and server-only API keys for Jupiter and Titan. Titan quotes are skipped when the server has no Titan key. Point your wallet’s custom RPC at http://127.0.0.1:8899 and open http://localhost:3000.
Hosted builds bake NEXT_PUBLIC_* values in at image build time. Changing runtime environment does not rewrite client RPC URLs. Never put API keys in NEXT_PUBLIC_* variables.

Hosted layout

Check the hosted node:
A healthy node returns its surfnet-version and solana-core version.

Common problems

The app’s end-to-end scripts (npm run e2e, scripts/e2e-*.ts) run against the fork through the app’s own services. Avoid scripts that overwrite shared fixtures on the hosted node.