This guide is written for judges, developers, and contributors who want to run Prophet end-to-end on their machine against the 0G Galileo testnet.
You do not need to redeploy contracts. The live deployment on 0G Galileo (chain ID 16602) is ready to use. This guide connects your local frontend and agents to those contracts.
curl -L https://foundry.paradigm.xyz | bashfoundryupforge --version # Foundry 0.2.0 or later
3
Funded testnet wallet
You need a wallet with 0G testnet gas. Get tokens from faucet.0g.ai. The oracle and market-maker agents each need their own wallet (can use the same for local testing).
# 0G ChainNEXT_PUBLIC_CHAIN_ID=16602NEXT_PUBLIC_RPC_URL=https://evmrpc-testnet.0g.ai# Deployed contract addressesNEXT_PUBLIC_PROPHET_FACTORY_ADDRESS=0xEd51e3d6Ba8914875616bBcDd9aa9D4A00B27bD4NEXT_PUBLIC_LIQUIDITY_POOL_ADDRESS=0x13AbE644693DA19f9A895C8c82Cf53879580DA8eNEXT_PUBLIC_MOCK_USDT_ADDRESS=0xc2B0D2A7e858F13B349843fF87dBF4EBF9227F49NEXT_PUBLIC_POSITION_VAULT_ADDRESS=0x89FAcA46A2782b4751F697ddFe0A0b9124Eb794ENEXT_PUBLIC_PAYOUT_DISTRIBUTOR_ADDRESS=0x238D341Bb358AC7C8Ae0A22b35897bECE97b9740# 0G Storage (server-side only — not exposed to browser)OG_INDEXER_URL=https://indexer-storage-testnet-turbo.0g.ai# 0G Compute (server-side — for validate-question API route)COMPUTE_PROVIDER_ADDRESS=0xa48f01287233509FD694a22Bf840225062E67836# Optional: WalletConnect project ID (for RainbowKit)NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id
Uploads a small JSON blob to 0G Storage via the turbo indexer
Downloads it back and verifies the content matches (checksum check)
Reports upload/download latency
Expected output:
[storage] Uploading test payload...[storage] Root hash: 0xabc123...[storage] Download OK — checksum verified in 1.2s[storage] 0G Storage: PASS
If you see 503 Service Unavailable, you are hitting the standard indexer. Make sure OG_INDEXER_URL in agent/.env points to the turbo indexer: https://indexer-storage-testnet-turbo.0g.ai
Inference on the testnet Qwen model typically takes 45–90 seconds. This is normal — the testnet provider can be under load. Production uses DeepSeek V3 which is faster and more reliable.
If the page loads but shows no markets, the frontend is not connected to the contracts. Double-check NEXT_PUBLIC_PROPHET_FACTORY_ADDRESS in frontendV2/.env.local.
This starts both the oracle agent and market-maker agent concurrently. You should see startup logs:
[oracle] Connected to 0G Chain (block 4,821,033)[oracle] Scanning for pending markets...[oracle] Listening for ResolutionTriggered events...[mm] LiquidityPool balance: 5000.00 USDT[mm] Scanning for open markets...[mm] Found 3 open markets — checking liquidity allocation[mm] Listening for MarketCreated events...
Navigate to the /faucet page in the Prophet frontend:
http://localhost:3000/faucet
Click “Get 1000 USDT”. This mints mock USDT from the test contract to your wallet. You can call this multiple times. The mock USDT contract is at 0xc2B0D2A7e858F13B349843fF87dBF4EBF9227F49 on 0G Galileo.