Rain:
choose-environment.ts
Environment table
The dispute timer (
dispute_initial_timer) is the initial oracle resolution duration baked into every market this environment creates — 5 minutes on dev/stage for fast iteration, 2 hours in production. It is not the dispute window, which is a separate on-chain constant per market — read that one with getDisputeWindow().
Tokens
Each environment configures two trading tokens. Note that development uses a mock USDT at a different address:
The oracle fee actually charged when creating a market is read on-chain from the market factory — on development it currently reads
0n. Each token config also carries an oracle_fixed_fee_per_option constant of 1 design, not the number in effect. See Market fees.
getTokenPrice only serves whitelisted tokens — for anything else it throws a 404 with {"msg":"Token not found in whitelist"}. The dev mock USDT (USDTm) is not whitelisted.
Reading the config at runtime
getEnvironmentConfig() returns the active environment’s full configuration. The config for a development instance:
get-environment-config.ts
getTokenConfig(tokenAddress) looks a single token up by address in the active environment, returning a TokenConfig ({ address, symbol, decimals, oracle_fixed_fee_per_option }) or null if the address isn’t one of the environment’s tokens:
get-token-config.ts
RPC selection
custom-rpc.ts
rpcUrl is used by all on-chain reads and by transaction builders that read chain state while building.
Overriding the API URL
RainCoreConfig also accepts an apiUrl override, which replaces the environment’s REST base URL (useful for local backends or proxies):
RainCoreConfig (types.d.ts)
environment — only the REST base URL changes. Point RainSocket at the same host you use for REST (e.g. new RainSocket('https://dev2-api.rain.one')).