Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
100 lines (92 loc) · 5.17 KB
/
Copy path.env.example
File metadata and controls
100 lines (92 loc) · 5.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Watchman — Somnia Shannon testnet (chain 50312)
#
# Copy this file to .env at the repo root for local development:
# cp .env.example .env
#
# For deployment, set these directly in your host's dashboard — see
# DEPLOY.md for the exact click-by-click steps for Vercel and Railway.
# ============================================================
# DATABASE_URL — required on BOTH Vercel (apps/web) and Railway (apps/agent)
# ============================================================
# Postgres connection string. Neon (neon.tech) is recommended — it has a
# generous free tier and gives you a ready-to-paste connection string.
# Both services must point at the SAME database: apps/web writes hedges,
# apps/agent settles them.
# Use the pooled ("?sslmode=require&pgbouncer=true" style) string if your
# provider offers one.
DATABASE_URL=postgresql://USER:PASSWORD@HOST/DATABASE?sslmode=require
# ============================================================
# PRIVATE_KEY — optional on Vercel, required on Railway for real execution
# ============================================================
# A Somnia Shannon testnet wallet's private key. NEVER commit this, never
# share it, never reuse a wallet that holds anything real.
#
# - Left blank on Vercel: the site still runs the full quote -> hedge ->
# receipt pipeline against live DreamDEX data, but every order is
# SIMULATED (no on-chain transaction) and the UI shows a clear
# "Simulated order" badge. This is the recommended judge-facing setup —
# zero funding required.
# - Set on Vercel: apps/web executes real IOC orders on DreamDEX when a
# visitor connects a matching wallet.
# - Left blank on Railway: the agent still settles hedges and writes
# receipts, using simulated payouts instead of real redemption.
# - Set on Railway: the agent redeems resolved positions on-chain and
# executes policy-driven hedges for real.
#
# If you do set it, fund that wallet first with testnet STT (gas) and
# tUSDC (collateral) from the Somnia Shannon faucet.
PRIVATE_KEY=0x...
# ============================================================
# SETTLEMENT_POLL_MS — optional, Railway (apps/agent) only
# ============================================================
# How often, in milliseconds, the settlement/policy loop polls for hedges
# that need settling and active policies that need a hedge opened.
# Default: 10000 (10 seconds). Leave unset to use the default.
SETTLEMENT_POLL_MS=10000
# ============================================================
# NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID — optional, Vercel (apps/web) only
# ============================================================
# Powers the wallet picker on /protect (RainbowKit + wagmi). Get a free
# project id at https://cloud.reown.com (formerly WalletConnect Cloud) and
# set it on Vercel as a Production + Preview env var — it is intentionally
# NEXT_PUBLIC_* because it identifies your app to WalletConnect's relay,
# not a secret.
#
# - Left blank: the picker still lists MetaMask, Rabby, Coinbase, OKX,
# Trust, Brave and any other browser-injected wallet, and connecting
# any of those still works. Only the WalletConnect QR-code/deep-link
# option (the thing that lets a separate wallet app pair with a normal
# desktop or mobile browser tab) is unavailable.
# - Set: the WalletConnect option becomes fully functional, which is what
# makes most mobile wallets connectable from an ordinary mobile browser
# rather than only from that wallet's own in-app browser.
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
# ============================================================
# SOMNIA_WS_RPC_URL - optional, Vercel (apps/web) and Railway (apps/agent)
# ============================================================
# Somnia Shannon's WebSocket RPC. The markets SDK has no HTTP fallback: every
# on-chain read (market status, balances) and every write goes over this one
# socket, so without it the SDK refuses chain access and the site cannot quote.
#
# It defaults to the public endpoint below and needs no configuration. Set it
# only if you run your own node or the public endpoint moves. It is read
# server-side (the markets SDK never runs in the browser), so it is
# deliberately NOT a NEXT_PUBLIC_* variable.
SOMNIA_WS_RPC_URL=wss://api.infra.testnet.somnia.network/ws
# ============================================================
# VENUE_ID / OPERATOR_ID — optional, advanced
# ============================================================
# Restrict DreamDEX market discovery to a specific venue/operator. Almost
# no deployment needs these — leave them blank.
VENUE_ID=
OPERATOR_ID=
# ============================================================
# NODE_ENV — set automatically by Vercel/Railway, do not set by hand
# ============================================================
# When NODE_ENV=production, the built-in /api/faucet dev helper is
# disabled so a public deployment can't be used to drain a shared wallet.
# --- Notes ---
# Chain id, RPC URL, indexer URL, price feed and DreamDEX contract
# addresses are fixed testnet constants in packages/sdk/src/config.ts,
# not environment variables — there is nothing else to configure.
# Do not point this app at mainnet.