Expand description
Environment and mode detection utilities.
Three separate concerns:
is_testnet_mode(), “which network?” Controls chain IDs, the default catalog path selection, and other network-specific settings. Set on all testnet and staging deployments.test_endpoints_enabled(), “allow dangerous /test/* endpoints?” Controls spot-price manipulation, IV overrides, instrument expiry, etc. Should only be set in local dev and CI, never on deployed environments.faucetcargo feature: compile-time gate for the/faucetroute. Enabled bytest-endpoints(local dev, CI) or independently for testnet deploys. Never enabled for real-money builds (AWS staging, mainnet).
Functions§
- block_
on_ async - Run an async block synchronously from sync code.
- is_
testnet_ mode - Returns true if running in testnet/dev mode.
- test_
endpoints_ enabled - Returns true if dangerous test manipulation endpoints are enabled.