Documentation Index
Fetch the complete documentation index at: https://prophet.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Prophet has three codebases: Solidity contracts (Foundry), TypeScript agents (Node.js), and a Next.js frontend. This guide walks through setting up all three from scratch.System Requirements
| Tool | Minimum Version | Install |
|---|---|---|
| Node.js | 20.0.0 | nodejs.org |
| npm | 10.0.0 | Included with Node.js |
| Foundry | Latest | curl -L https://foundry.paradigm.xyz | bash && foundryup |
| Git | Any recent | System package manager |
Clone and Install
Environment Variables
contracts/.env
Only needed if you are deploying contracts. Skip if using the live deployment.agent/.env
frontendV2/.env.local
Run the Test Suite
Run 0G Diagnostics
test:storage fails: check that OG_INDEXER_URL points to the turbo indexer.
If test:compute fails:
- Check that
COMPUTE_PROVIDER_ADDRESSis set correctly - Verify your oracle wallet has enough 0G tokens (the broker needs to submit billing transactions)
- Testnet inference can time out under load — retry
Start the Frontend
Start the Agents
Troubleshooting
0G Storage returns 503
0G Storage returns 503
You are hitting the standard indexer. Change The standard indexer is unreliable on testnet. Always use turbo.
OG_INDEXER_URL to:0G Compute inference hangs
0G Compute inference hangs
Testnet inference via Qwen 2.5 7B takes 45–90 seconds normally. It can hang if the provider is overloaded. The agent has a timeout and retry — wait for the retry, or restart the agent. This is a testnet reliability issue, not a code bug.
forge test fails with 'file not found'
forge test fails with 'file not found'
Run
forge install from the contracts/ directory to download OpenZeppelin and forge-std dependencies.Agent fails with 'insufficient funds for gas'
Agent fails with 'insufficient funds for gas'
Both agent wallets need 0G tokens. Get them from faucet.0g.ai. The oracle wallet also needs to top up the 0G Compute billing ledger.
USDT amounts look wrong
USDT amounts look wrong
All USDT uses 6 decimal places. If you see amounts 10^12 times too large, you are passing amounts formatted for 18 decimals. Always use
ethers.parseUnits("100", 6) — never ethers.parseEther("100").Frontend shows 'no markets found'
Frontend shows 'no markets found'
Check that
NEXT_PUBLIC_PROPHET_FACTORY_ADDRESS in frontendV2/.env.local matches the deployed factory address. If using a fresh deployment, ensure the market-maker has seeded at least one market.MetaMask transaction fails with 'wrong network'
MetaMask transaction fails with 'wrong network'
Ensure MetaMask is connected to 0G Galileo (Chain ID 16602). The frontend will prompt you to switch if you are on the wrong network, but sometimes the prompt is missed.
COMPUTE_REQUIRE_TEE=1 but TEE verification fails
COMPUTE_REQUIRE_TEE=1 but TEE verification fails
On testnet, the Qwen provider may not always pass TEE attestation under high load. Set
COMPUTE_REQUIRE_TEE=0 for local development. Enable it for production/mainnet only.Next Steps
Contract Development
Foundry commands, test patterns, and deployment guide
Agent Development
How to extend the oracle and market-maker agents
Frontend Development
Next.js structure, hooks, and API routes
Deployment
Deploy a fresh contract instance to 0G Galileo