Documentation · Deployment
Deployment playbook
Stages, scripts, and safety rails for putting BOLT on BOT Chain — testnet and mainnet.
Fail-closed scriptsTestnet env required
Stage 0 · Pre-flight
- BOT Chain mainnet RPC reachable; eth_chainId returns 677.
- Deployer EOA funded with native BOT (≥0.75 BOT for Phase 1 + 2; ≥1.5 BOT for early grant epochs).
- BOTCHAIN_EXPLORER_API_KEY supplied for scan.botchain.ai/api.
- pnpm verify-rpc and pnpm preflight:mainnet succeed.
Stage 1 · Phase 1
- pnpm deploy:botchain — WBOT, BoltFactory, BoltRouter02, BoltFeeTreasury.
- Run pnpm verify:contracts to submit sources to the explorer.
- Hand BoltFactory.feeToSetter to the BOLT multisig.
Stage 2 · Phase 2
- pnpm deploy:botchain:phase2 — Launch / Locker / Vesting / Registries.
- Verify each contract on scan.botchain.ai.
- Transfer Ownable roles to the multisig.
Stage 3 · Grants
- Deploy BoltGrantPayouts to mainnet via pnpm deploy:botchain:grants once it lands.
- Publish the first weekly epoch via the BOLT operator key.
- Open the claim window from /grants/claim/.
Stage 4 · Phase 3
- Choose the first BoltPair LP as PHASE3_VAULT_UNDERLYING.
- pnpm deploy:botchain:phase3 — BoltVault, RouterAggregator, BDEXAdapter, BridgeAdapter, ComputeAssetPool.
- Register BoltRouter02 as the internal adapter on the aggregator.
- Leave BDEX + Bridge adapters gated until BOT Chain publishes ABIs.
Stage 5 · Testnet (any time)
- Set BOTCHAIN_TESTNET_RPC_URL, BOTCHAIN_TESTNET_CHAIN_ID, BOTCHAIN_TESTNET_EXPLORER_URL, BOTCHAIN_TESTNET_EXPLORER_API_URL.
- pnpm testnet:verify-rpc — fail-closed if any value is missing.
- pnpm testnet:deploy, then :phase2, :grants, :phase3.
- pnpm testnet:verify:contracts — auto-submit if supported, otherwise emit a manual verification package.
- pnpm testnet:smoke — confirm eth_getCode on every recorded address.
Safety rails
- Every script refuses to deploy unless eth_chainId matches and the deployer balance is non-zero.
- Mainnet deploys require DEPLOYER_CONFIRM_MAINNET=true (Phase 3 and beyond).
- No secret is committed to git. Tokens and keys live exclusively in .env / GitHub Secrets.
- Two-step adapter activation: setRouter, then setConfirmed(true). One transaction is never enough.