This project is currently in DEVNET-TEST mode. The following changes are required before any mainnet deployment. All items are tagged DEVNET-TEST in code comments across the repo.
These constants are burned into the on-chain binary. Changing them requires a full anchor build + anchor deploy + program ID update everywhere.
- GRADUATION_THRESHOLD: change from
500_000_000(0.5 SOL) to85_000_000_000(85 SOL)programs/token-launch/src/state/bonding_curve.rs
- BUYBACK_THRESHOLD: change from
100_000_000(0.1 SOL) to production value (e.g.1_000_000_000= 1 SOL)programs/token-launch/src/state/bonding_curve.rs
- TREASURY_PUBKEY: confirm
13DWuEycYuJvGpo2EwPMgaiBDfRKmpoxdXjJ5GKe9RPWis the intended mainnet treasury address (or substitute a new one)programs/token-launch/src/lib.rs
- After redeploy, update program ID in:
Anchor.toml(all three[programs.*]entries)frontend/.env.local→NEXT_PUBLIC_PROGRAM_IDbackend/.env→PROGRAM_ID
- Rotate treasury keypair: the devnet keypair currently in
backend/.envmust never be used for mainnet funds. Generate a new keypair withsolana-keygen new. - Confirm
backend/.envis NOT tracked by git: rungit ls-files backend/.env— it must return nothing. If it does, rungit rm --cached backend/.envand commit. - Confirm no secrets in git history: run
git log --all --full-history -- backend/.envto verify.
- Backend RPC: set
SOLANA_RPC_URLandSOLANA_WS_URLinbackend/.envto a paid mainnet endpoint (e.g. Helius, Triton, QuickNode). Remove devnet defaults.backend/src/config.ts— remove the devnet fallback strings after confirming env vars are always set.
- Frontend RPC: set
NEXT_PUBLIC_SOLANA_RPCinfrontend/.env.localto mainnet endpoint.frontend/src/lib/solana.ts
- Frontend network: set
NEXT_PUBLIC_NETWORK=mainnet-betainfrontend/.env.local.frontend/src/providers/WalletProvider.tsx
- Frontend API/WS: set
NEXT_PUBLIC_API_URLandNEXT_PUBLIC_WS_URLto production backend URLs.frontend/src/lib/api.ts,frontend/src/hooks/useLiveFeed.ts
- Confirm cluster switch works:
raydiumService.tsnow selectsDEVNET_PROGRAM_IDvsMAINNET_PROGRAM_IDbased on whether the RPC URL contains "devnet". WhenSOLANA_RPC_URLis set to mainnet,MAINNET_PROGRAM_IDis used automatically. Verify this with a dry-run simulation before first live graduation.backend/src/services/raydiumService.ts
- Lock Raydium SDK version:
@raydium-io/raydium-sdk-v2is pinned to an alpha release. Either upgrade to stable or lock the exact version (remove^) before mainnet.backend/package.json
- Anchor client version: sync
@coral-xyz/anchorinbackend/package.jsonfrom^0.29.0to^0.30.x(matching the on-chain program'sanchor-langversion inprograms/token-launch/Cargo.toml). - Rate limiting: add
express-rate-limitmiddleware to all API routes before public launch. - Polling interval: reduce indexer polling aggressiveness (
backend/src/indexer/index.ts— currently 3s). Use 15–30s on mainnet or rely solely on WebSocket subscriptions. - Graduation threshold:
backend/src/config.tsBONDING_CURVE_CONSTANTS.GRADUATION_THRESHOLD— update to match recompiled program value. - Metadata URL:
backend/src/api/metadata.ts— confirmSITE_URLenv var is set to the production domain before launch (currently falls back tohttp://localhost:4000).
- GRADUATION_THRESHOLD: update
frontend/src/lib/bondingCurve.tsto match the new on-chain value after program recompile. - Add deploy script: add
anchor:deploy:mainnetto rootpackage.jsonso mainnet deployment is explicit and never accidental. - Custom 404/500 pages: create
frontend/src/app/not-found.tsxandfrontend/src/app/error.tsx. - Fast Trade session key warning: ensure users understand the session key risk before funding the fast-trade wallet.
- Update
README.mdline 3–4: change "Solana devnet" to "Solana mainnet" after launch. - Update
README.mdcontract addresses table: fill in the real mainnet program ID. - Add
anchor:deploy:mainnetscript to rootpackage.json. - Verify
Anchor.toml[provider] clusteris set correctly for the deploy environment.
Before opening to the public:
- Run a full lifecycle test on localnet/devnet with mainnet threshold values (use a fresh validator).
- Verify the graduation keeper can successfully call
graduateand the Raydium pool is created. - Verify the Raydium pool appears on raydium.io with correct liquidity.
- Verify LP tokens are burned (sent to incinerator address).
- Verify explorer links point to mainnet (no
?cluster=devnetin any toast or UI element). - Do a full wallet connect → buy → sell → withdraw creator fees flow on mainnet with a small amount before opening to traffic.