Skip to main content

Overview

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.

Prerequisites

1

Node.js 20+

Install from nodejs.org if needed.
2

Foundry

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).
4

Git


1. Clone and Install


2. Environment Files

Never commit private keys to git. The .env files are in .gitignore. Keep them local only.

contracts/.env

agent/.env

frontendV2/.env.local


3. Run Contract Tests

The --offline flag skips network calls to Etherscan for ABI validation, making tests run much faster locally.
Expected output:
All 232 tests should pass with 0 failed. If any fail, check that Foundry is up to date with foundryup. Run with verbose output for a specific test:

4. Run 0G Diagnostics

Before starting agents, verify your 0G connections are working.

Test 0G Storage

This script:
  1. Uploads a small JSON blob to 0G Storage via the turbo indexer
  2. Downloads it back and verifies the content matches (checksum check)
  3. Reports upload/download latency
Expected output:
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

Test 0G Compute

This script:
  1. Initializes the 0G Serving Broker with your wallet
  2. Verifies TEE attestation for the configured provider
  3. Sends a simple test prompt and checks the response is valid JSON
  4. Reports inference latency
Expected output:
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.

5. Start the Frontend

Open http://localhost:3000. You should see the Prophet markets dashboard.
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.

6. Start the Agents

In a separate terminal:
This starts both the oracle agent and market-maker agent concurrently. You should see startup logs:
To run only the oracle agent:
To run only the market-maker agent:

7. Get Test Tokens

You need two types of tokens to interact with Prophet:

0G Gas (for transaction fees)

Go to faucet.0g.ai, connect your wallet, and request 0G testnet tokens. These are used for gas on every transaction.

Mock USDT (for trading)

Navigate to the /faucet page in the Prophet frontend:
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.

What’s Running

After completing this guide, you have:

Next Steps

Connect Your Wallet

Add 0G Galileo to MetaMask and connect to the app

Understand the AMM

Learn how YES/NO share pricing works

Deploy Contracts

Full deployment guide for a fresh environment

0G Integration Details

Deep dive into how 0G Chain, Compute, and Storage are used