Environment variables, contract addresses, and deployment configuration.
Environment Variables
The web application uses the following environment variables in .env.local:
- NEXT_PUBLIC_PRIVY_APP_ID - Privy authentication app ID
- NEXT_PUBLIC_SUPABASE_URL - Supabase project URL for off-chain data
- NEXT_PUBLIC_SUPABASE_ANON_KEY - Supabase anonymous API key
- DEPLOYER_PRIVATE_KEY - private key for contract deployment (Foundry only)
Contract Addresses
After deployment, update src/contracts/addresses.ts with the three contract addresses printed by the deploy script. The file maps chain IDs to addresses for both Base Sepolia (testnet) and Base mainnet.
Chain Configuration
The on-chain client is configured in src/lib/onchain.ts. For mainnet: import { base } from 'viem/chains', set the chain ID to base.id, and use https://mainnet.base.org as the RPC transport. For testnet: use baseSepolia and https://sepolia.base.org.
Contract Deployment
Deploy all three contracts with a single Foundry command:
- Ensure DEPLOYER_PRIVATE_KEY is set in .env.local
- Run: forge script script/Deploy.s.sol:Deploy --rpc-url base --broadcast --verify
- The script deploys NodeRegistry, JobRegistry, and VerificationEngine in order, cross-linking them automatically
- Copy the 3 printed addresses into src/contracts/addresses.ts
Daemon Configuration
The node daemon uses the COMPRESSNODE_ env prefix. All settings can be placed in ~/.compressnode/.env or exported directly. Key settings: WALLET_PRIVATE_KEY, NODE_ENDPOINT, GPU_TIER, RPC_URL. Run compressnode status to verify your configuration.