# Token-aggregation service — copy to .env and adjust.
# See docs/04-configuration/TOKEN_AGGREGATION_REPORT_API_RUNBOOK.md

PORT=3000
LOG_LEVEL=info

# Chain 138 RPC:
# - explorer / token-aggregation / Blockscout on the LAN should use the public RPC node directly:
#   CHAIN_138_RPC_URL=http://192.168.11.221:8545
# - external/public clients should use the public FQDN:
#   CHAIN_138_RPC_URL=https://rpc-http-pub.d-bis.org
# - do not point explorer/read services at the operator core RPC 192.168.11.211:8545

# GET /api/v1/quote on Chain 138 + DODO: optional on-chain PMM quote (querySellBase/Quote).
# Precedence: TOKEN_AGGREGATION_PMM_RPC_URL → TOKEN_AGGREGATION_CHAIN138_RPC_URL → RPC_URL_138.
# TOKEN_AGGREGATION_PMM_RPC_URL=http://192.168.11.211:8545
# TOKEN_AGGREGATION_PMM_QUERY_TRADER=0x4A666F96fC8764181194447A7dFdb7d471b301C8

# PMM pools: canonical integration is defaulted in dex-factories.ts if unset.
# CHAIN_138_DODO_PMM_INTEGRATION=0x86ADA6Ef91A3B450F89f2b751e93B1b7A3218895
# CHAIN_138_DODO_POOL_MANAGER=

# Chain 138 DEX factories (optional — dex-factories.ts has live defaults)
# CHAIN_138_UNISWAP_V2_FACTORY=0x0C30F6e67Ab3667fCc2f5CEA8e274ef1FB920279
# CHAIN_138_UNISWAP_V2_ROUTER=0x3019A7fDc76ba7F64F18d78e66842760037ee638
# CHAIN_138_UNISWAP_V3_FACTORY=0x2f7219276e3ce367dB9ec74C1196a8ecEe67841C
# CHAIN_138_UNISWAP_V3_ROUTER=0xde9cD8ee2811E6E64a41D5F68Be315d33995975E
# CHAIN_138_SUSHISWAP_FACTORY=0x2871207ff0d56089D70c0134d33f1291B6Fce0BE
# CHAIN_138_SUSHISWAP_ROUTER=0xB37b93D38559f53b62ab020A14919f2630a1aE34

# Minimum token report addresses (V1 = PMM / liquidity canonical on Chain 138)
CUSDT_ADDRESS_138=0x93E66202A11B1772E55407B32B44e5Cd8eda7f22
CUSDC_ADDRESS_138=0xf22258f57794CC8E06237084b353Ab30fFfa640b

# Compliant USD V2 (ERC-2612 / ERC-3009) — x402 / GRU transport.
# Reference: docs/04-configuration/CHAIN138_X402_TOKEN_SUPPORT.md
CUSDT_V2_ADDRESS_138=0x9FBfab33882Efe0038DAa608185718b772EE5660
CUSDC_V2_ADDRESS_138=0x219522c60e83dEe01FC5b0329d6fA8fD84b9D13d

# Live ALL Mainnet AUSDT compliant landing surface on Chain 138.
CAUSDT_ADDRESS_138=0x5fdDF65733e3d590463F68f93Cf16E8c04081271

# Planned ALL Mainnet gold corridor surfaces.
# These remain env-gated until the 651940 wrapped + unwrapped gold contracts are deployed.
# CAXAUC_ADDRESS_651940=0x...
# CAXAUT_ADDRESS_651940=0x...
# CWAXAUC_ADDRESS_651940=0x...
# CWAXAUT_ADDRESS_651940=0x...

# Repo-native D-WIN-aligned USDW PMM / transport surface.
CUSDW_ADDRESS_138=0xcA6BFa614935f1AB71c9aB106bAA6FBB6057095e
# Existing public cWAUSDT mirrors for the live AUSDT -> cWAUSDT -> cAUSDT path:
CWAUSDT_ADDRESS_56=0xe1a51Bc037a79AB36767561B147eb41780124934
CWAUSDT_ADDRESS_137=0xf12e262F85107df26741726b074606CaFa24AAe7
CWAUSDT_ADDRESS_43114=0xff3084410A732231472Ee9f93F5855dA89CC5254
CWAUSDT_ADDRESS_42220=0xC158b6cD3A3088C52F797D41f5Aa02825361629e
# Preferred canonical env names for wrapped cWUSDW edge visibility:
CWUSDW_ADDRESS_56=0xC2FA05F12a75Ac84ea778AF9D6935cA807275E55
# CWUSDW_ADDRESS_137=0x...  # Activate only after Polygon cWUSDW is deployed and approved.
CWUSDW_ADDRESS_43114=0xcfdCe5E660FC2C8052BDfa7aEa1865DD753411Ae
# Legacy aliases still understood by canonical-tokens.ts:
# CWUSDW_BSC=0xC2FA05F12a75Ac84ea778AF9D6935cA807275E55
# CWUSDW_AVALANCHE=0xcfdCe5E660FC2C8052BDfa7aEa1865DD753411Ae

# Native asset USD (Chain 138 ETH uses mainnet WETH address as pricing proxy in the explorer UI).
# Precedence: live CoinGecko reference (ETH/BTC/…) → optional env override below → repo FX snapshot (avoid for ETH).
# Optional manual override when external APIs are down:
# CHAIN138_CANONICAL_PRICE_USD_ETH=2130
# CANONICAL_PRICE_USD_ETH=2130
# ETH_PRICE_USD=2130
# Verify live price: bash scripts/verify/verify-explorer-native-eth-price.sh (from proxmox repo root)

# PostgreSQL (required for persistent index / reports)
# DATABASE_URL=postgresql://user:pass@localhost:5432/token_aggregation

# Indexer tick (ms)
# INDEXING_INTERVAL=5000

# Set to false on public read-only deployments that should not run the
# background multi-chain indexer in-process.
# ENABLE_INDEXER=true

# Optional: override built-in bridge/routes JSON (fetched every 5m)
# BRIDGE_LIST_JSON_URL=https://example.com/bridge-list.json

# CCIP / Trustless overrides for /api/v1/bridge/routes defaults
# CCIPWETH9_BRIDGE_CHAIN138=
# CCIPWETH10_BRIDGE_CHAIN138=
# LOCKBOX_138=
# INBOX_ETH=

# GRU Monetary Transport Layer runtime refs
# Set these when exposing GRU transport readiness from token-aggregation.
# CHAIN138_L1_BRIDGE=0x152ed3e9912161b76bdfd368d0c84b7c31c10de7
# CW_BRIDGE_MAINNET=
# CW_BRIDGE_BSC=
# CW_BRIDGE_POLYGON=
# CW_BRIDGE_AVALANCHE=
# CW_BRIDGE_CELO=
# CW_BRIDGE_ARBITRUM=
# CW_BRIDGE_BASE=
# CW_BRIDGE_OPTIMISM=
# CW_BRIDGE_GNOSIS=
# CW_RESERVE_VERIFIER_CHAIN138=
# CW_STABLECOIN_RESERVE_VAULT=
# CW_RESERVE_SYSTEM=
# CW_MAX_OUTSTANDING_USDT_MAINNET=
# CW_MAX_OUTSTANDING_USDC_MAINNET=
# CW_MAX_OUTSTANDING_USDT_BSC=
# CW_MAX_OUTSTANDING_USDC_BSC=
# CW_MAX_OUTSTANDING_USDT_POLYGON=
# CW_MAX_OUTSTANDING_USDC_POLYGON=
# CW_MAX_OUTSTANDING_USDT_AVALANCHE=
# CW_MAX_OUTSTANDING_USDC_AVALANCHE=
# CW_MAX_OUTSTANDING_USDT_ARBITRUM=
# CW_MAX_OUTSTANDING_USDC_ARBITRUM=
# CW_MAX_OUTSTANDING_USDT_BASE=
# CW_MAX_OUTSTANDING_USDC_BASE=
# CW_MAX_OUTSTANDING_USDT_OPTIMISM=
# CW_MAX_OUTSTANDING_USDC_OPTIMISM=
# CW_MAX_OUTSTANDING_USDT_GNOSIS=
# CW_MAX_OUTSTANDING_USDC_GNOSIS=
# CW_MAX_OUTSTANDING_USDT_CELO=
# CW_MAX_OUTSTANDING_USDC_CELO=
# CW_MAX_OUTSTANDING_AUSDT_CELO=
# Gas-native rollout refs (Wave 1)
# Deployed but not active-by-default: generic gas verifier on Chain 138.
# Keep the active gas verifier envs below blank until the live L1 bridge is explicitly wired to it.
CW_ASSET_RESERVE_VERIFIER_DEPLOYED_CHAIN138=0xbf26a679586663f87f3bf3f52c79479b8aa8d854
# CW_BRIDGE_WEMIX=
# CW_GAS_STRICT_ESCROW_VERIFIER_CHAIN138=
# CW_GAS_HYBRID_CAP_VERIFIER_CHAIN138=
# CW_GAS_ESCROW_VAULT_CHAIN138=
# CW_GAS_TREASURY_SYSTEM=
# CW_MAX_OUTSTANDING_ETH_MAINNET_MAINNET=
# CW_GAS_OUTSTANDING_ETH_MAINNET_MAINNET=
# CW_GAS_ESCROWED_ETH_MAINNET_MAINNET=
# CW_GAS_TREASURY_BACKED_ETH_MAINNET_MAINNET=
# CW_GAS_TREASURY_CAP_ETH_MAINNET_MAINNET=
# CW_MAX_OUTSTANDING_ETH_L2_OPTIMISM=
# CW_GAS_OUTSTANDING_ETH_L2_OPTIMISM=
# CW_GAS_ESCROWED_ETH_L2_OPTIMISM=
# CW_GAS_TREASURY_BACKED_ETH_L2_OPTIMISM=
# CW_GAS_TREASURY_CAP_ETH_L2_OPTIMISM=
# CW_MAX_OUTSTANDING_ETH_L2_ARBITRUM=
# CW_MAX_OUTSTANDING_ETH_L2_BASE=
# CW_MAX_OUTSTANDING_BNB_BSC=
# CW_MAX_OUTSTANDING_POL_POLYGON=
# CW_MAX_OUTSTANDING_AVAX_AVALANCHE=
# CW_MAX_OUTSTANDING_CRO_CRONOS=
# CW_MAX_OUTSTANDING_XDAI_GNOSIS=
# CW_MAX_OUTSTANDING_CELO_CELO=
# CW_MAX_OUTSTANDING_WEMIX_WEMIX=
