Environments
Two parallel deployments. They share the same code and the same X Layer Testnet contracts today; staging exists so we can break things in front of users without blowing up the production URL once mainnet is live.
URLs at a glance
| Surface | Production | Test (staging) |
|---|---|---|
| Web console (dapp) | https://app.xtruth.xyz | https://app-dev.xtruth.xyz |
| JSON-RPC proxy | https://app.xtruth.xyz/api/rpc | https://app-dev.xtruth.xyz/api/rpc |
| Marketing / docs | https://xtruth.xyz | https://www-dev.xtruth.xyz |
| Subgraphs | https://subgraph.xtruth.xyz | https://subgraph.xtruth.xyz (shared) |
| Chain | X Layer Testnet (chainId 1952) | X Layer Testnet (chainId 1952) |
| Bond currency | USDC_TEST (0xcb8b…c79d) | USDC_TEST (0xcb8b…c79d) |
| OOv3 | 0xB10B…AF43 | 0xB10B…AF43 |
While the codebase is on testnet, both URLs hit the same chain. When mainnet launches, production moves to the mainnet contracts; test stays pinned to testnet so devs can keep iterating.
Which one should I use?
- Building integration code, posting test assertions, breaking things on purpose → use the test environment. Cheap to nuke, no real money, reset / redeploy as you like.
- Showing a working demo, recording a screencast, real users → use production.
Wiring the test environment into your code
import { createPublicClient, http, defineChain } from "viem";
const xlayerTestnet = defineChain({
id: 1952,
name: "X Layer Testnet (xtruth dev)",
nativeCurrency: { name: "OKB", symbol: "OKB", decimals: 18 },
rpcUrls: {
default: { http: ["https://app-dev.xtruth.xyz/api/rpc"] },
},
});
const client = createPublicClient({ chain: xlayerTestnet, transport: http() });
For wallet writes, point the wallet at the same proxy via
wallet_addEthereumChain (the dev console has a one-click button
on /oracle/new — same as production but flagged (xtruth dev)).
Subgraph endpoints
The subgraph URLs are the same in both environments — the indexer is shared. The endpoint list is documented in Subgraph API.
Source
- App (Workers + OpenNext):
guessmarket/xtruth-app— branchmain→ production, branchdev→ staging. - Marketing site (this site, static export on CF Pages):
guessmarket/xtruth-www.