Files
lp-terminal_github/src/config/wagmi.ts
T
labrinyang 4e317eff6d LP TERMINAL — terminal-style LP frontend for Robinhood Chain
Static SPA over UP33 (ve(3,3)) + the official Uniswap v2/v3 deployments:
browse and add liquidity across all three, manage CL/v2 positions, one-token
ZAP adds, aggregator vs native swaps, and LP-based limit orders. Ships with a
zero-dependency pool indexer for uniswap discovery.

Browser-wallet signing only; no key material anywhere.
2026-07-17 19:10:30 +08:00

30 lines
1.2 KiB
TypeScript

import { getDefaultConfig } from '@rainbow-me/rainbowkit'
import { fallback, http } from 'wagmi'
import { customRpc } from '../lib/rpcPref'
import { robinhood } from './chain'
import { ENV, PUBLIC_RPC } from './env'
// Read-transport resolution (one build works in every deployment):
// - user-set custom RPC (footer control, localStorage) -> always wins
// - RPC set in .env (personal/local build) -> use it directly (secret stays local)
// - production build without RPC (server) -> same-origin /rpc proxy (nginx keeps
// the key server-side), falling back to the public RPC when no proxy exists
// (plain static hosting)
// - dev without RPC -> public RPC
const userRpc = customRpc()
const transport = userRpc
? http(userRpc, { batch: true })
: ENV.rpcUrl
? http(ENV.rpcUrl, { batch: true })
: import.meta.env.PROD
? fallback([http('/rpc', { batch: true }), http(PUBLIC_RPC, { batch: true })])
: http(PUBLIC_RPC, { batch: true })
export const wagmiConfig = getDefaultConfig({
appName: 'UP33 Terminal',
projectId: ENV.wcProjectId,
chains: [robinhood],
transports: { [robinhood.id]: transport },
ssr: false,
})