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’s smart contracts are already live on 0G Galileo. Use this guide if you need to deploy a fresh instance — for your own fork, a new environment, or mainnet deployment.Current live deployment (0G Galileo, chain ID 16602):
- ProphetFactory:
0xEd51e3d6Ba8914875616bBcDd9aa9D4A00B27bD4 - LiquidityPool:
0x13AbE644693DA19f9A895C8c82Cf53879580DA8e - Mock USDT:
0xc2B0D2A7e858F13B349843fF87dBF4EBF9227F49 - PositionVault:
0x89FAcA46A2782b4751F697ddFe0A0b9124Eb794E - PayoutDistributor:
0x238D341Bb358AC7C8Ae0A22b35897bECE97b9740
Prerequisites
- Foundry installed (
forge --version) - Deployer wallet funded with 0G gas (get from faucet.0g.ai)
- Oracle agent wallet address (can be the same as deployer for testing)
- Market-maker agent wallet address
1. Configure the Deploy Script
The deploy script lives atcontracts/script/Deploy.s.sol. It reads from environment variables. Set up your contracts/.env:
foundry.toml already has the 0G network profiles:
2. Build Contracts
Always build cleanly before deploying. This catches compilation errors early.3. Dry Run First
Run without--broadcast to simulate the deployment and catch any errors without spending gas:
4. Deploy to 0G Galileo Testnet
When the dry run looks correct, add--broadcast to execute:
Deploy MockUSDT
Mints 10,000,000 USDT to the deployer. Only used on testnet — on mainnet, point to real USDT.
Deploy ProphetFactory
Constructor arguments: USDT address, oracle agent address, market-maker agent address, treasury address.
Deploy LiquidityPool
Constructor arguments: ProphetFactory address, USDT address, market-maker agent address.
Deploy PositionVault
Constructor arguments: ProphetFactory address, oracle agent address, USDT address, PayoutDistributor address (set to zero address initially — updated in step 6).
Deploy PayoutDistributor
Constructor arguments: ProphetFactory address, PositionVault address, oracle agent address, market-maker agent address, treasury address, USDT address.
5. Copy Deployed Addresses
After deployment succeeds, Foundry prints all deployed addresses. Copy them from the terminal output:6. Regenerate Frontend ABIs
The frontend reads contract ABIs from JSON files infrontendV2/src/lib/abis/. After deploying new contracts, regenerate them from the compiled artifacts:
7. Verify Contracts on 0G Explorer
Verifying source code lets anyone read the contract on the block explorer. 0G Galileo uses a Blockscout-compatible explorer.8. Fund Agent Wallets
Both agents need 0G gas to submit transactions. Get tokens from faucet.0g.ai for both wallet addresses. The market-maker agent also needs USDT in the LiquidityPool to seed markets. Transfer USDT to the LiquidityPool contract address, or calldeposit() on LiquidityPool from the deployer wallet.
9. Start Agents
- Verify they can connect to 0G Chain (reads current block)
- Verify 0G Storage connectivity (test upload/download)
- Scan for existing markets to catch up on missed events
- Begin listening for new events
Live Deployment Reference
| Contract | Address | Explorer |
|---|---|---|
| ProphetFactory | 0xEd51e3d6Ba8914875616bBcDd9aa9D4A00B27bD4 | View |
| LiquidityPool | 0x13AbE644693DA19f9A895C8c82Cf53879580DA8e | View |
| Mock USDT | 0xc2B0D2A7e858F13B349843fF87dBF4EBF9227F49 | View |
| PositionVault | 0x89FAcA46A2782b4751F697ddFe0A0b9124Eb794E | View |
| PayoutDistributor | 0x238D341Bb358AC7C8Ae0A22b35897bECE97b9740 | View |
- Chain ID:
16602 - RPC:
https://evmrpc-testnet.0g.ai - Explorer:
https://chainscan-galileo.0g.ai - Native token:
0G(for gas) - Collateral: Mock USDT at address above (6 decimals)
Deploying to 0G Mainnet
For mainnet deployment, change the RPC and use real USDT:0x1B3AAe... — update COMPUTE_PROVIDER_ADDRESS in agent/.env accordingly.