# Environment Variables Example

Since `.env.example` is blocked from direct editing, here is the complete content you should create in `.env.example`:

```bash
# =============================================================================
# Multichain Deployment Environment Variables
# =============================================================================
# Copy this file to .env and fill in your values
# DO NOT commit .env to version control

# =============================================================================
# Deployer Configuration
# =============================================================================
PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
# DEPLOYER_PRIVATE_KEY=0x... (alternative name)

# =============================================================================
# RPC Endpoints
# =============================================================================
# Infura project (used for supported public chains)
INFURA_PROJECT_ID=43b945b33d58463a9246cf5ca8aa6286
INFURA_PROJECT_SECRET=
INFURA_GAS_API=https://gas.api.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Ethereum Mainnet
ETH_MAINNET_RPC_URL=https://mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
ETHEREUM_MAINNET_RPC=https://mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Cronos (Crypto.com)
CRONOS_RPC_URL=https://evm.cronos.org
CRONOS_MAINNET_RPC=https://evm.cronos.org

# BSC (BNB Smart Chain)
BSC_RPC_URL=https://bsc-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
BSC_MAINNET_RPC=https://bsc-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Polygon PoS
POLYGON_RPC_URL=https://polygon-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
POLYGON_MAINNET_RPC=https://polygon-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Gnosis Chain (PoA)
GNOSIS_RPC_URL=https://rpc.gnosischain.com
GNOSIS_MAINNET_RPC=https://rpc.gnosischain.com

# Avalanche C-Chain
AVALANCHE_RPC_URL=https://avalanche-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
AVALANCHE_MAINNET_RPC=https://avalanche-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Base
BASE_RPC_URL=https://base-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
BASE_MAINNET_RPC=https://base-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Arbitrum One
ARBITRUM_RPC_URL=https://arbitrum-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
ARBITRUM_MAINNET_RPC=https://arbitrum-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Optimism
OPTIMISM_RPC_URL=https://optimism-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
OPTIMISM_MAINNET_RPC=https://optimism-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Celo
CELO_RPC_URL=https://celo-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286
CELO_MAINNET_RPC=https://celo-mainnet.infura.io/v3/43b945b33d58463a9246cf5ca8aa6286

# Chain-138 (DeFi Oracle Meta Mainnet)
# For deployment use Core RPC (IP:port); do not use FQDN (DNS/tunnel can fail).
# RPC_URL_138=http://192.168.11.211:8545
RPC_URL_138=https://rpc.d-bis.org
# Also set RPC_URL (alias for Core) and PRIVATE_KEY. See docs/03-deployment/RECOMMENDATIONS_AND_FIXES_BEFORE_DEPLOY.md.

# Canonical c* and tokens (Chain 138) — set via: ./scripts/deployment/set-dotenv-c-tokens-and-register-gru.sh [--no-register]
# COMPLIANT_USDT=0x93E66202A11B1772E55407B32B44e5Cd8eda7f22
# COMPLIANT_USDC=0xf22258f57794CC8E06237084b353Ab30fFfa640b
# CUSDT_ADDRESS_138=0x93E66202A11B1772E55407B32B44e5Cd8eda7f22
# CUSDC_ADDRESS_138=0xf22258f57794CC8E06237084b353Ab30fFfa640b
# UNIVERSAL_ASSET_REGISTRY=0xAEE4b7fBe82E1F8295951584CBc772b8BBD68575

# Compliant Fiat Tokens (Chain 138) — from DeployCompliantFiatTokens 2026-02-27 (optional; token-aggregation uses fallbacks if unset)
# CEURC_ADDRESS_138=0x8085961F9cF02b4d800A3c6d386D31da4B34266a
# CEURT_ADDRESS_138=0xdf4b71c61E5912712C1Bdd451416B9aC26949d72
# CGBPC_ADDRESS_138=0x003960f16D9d34F2e98d62723B6721Fb92074aD2
# CGBPT_ADDRESS_138=0x350f54e4D23795f86A9c03988c7135357CCaD97c
# CAUDC_ADDRESS_138=0xD51482e567c03899eecE3CAe8a058161FD56069D
# CJPYC_ADDRESS_138=0xEe269e1226a334182aace90056EE4ee5Cc8A6770
# CCHFC_ADDRESS_138=0x873990849DDa5117d7C644f0aF24370797C03885
# CCADC_ADDRESS_138=0x54dBd40cF05e15906A2C21f600937e96787f5679
# CXAUC_ADDRESS_138=0x290E52a8819A4fbD0714E517225429aA2B70EC6b
# CXAUT_ADDRESS_138=0x94e408E26c6FD8F4ee00b54dF19082FDA07dC96E
# CREATE2_FACTORY_ADDRESS (Chain 138, for DeployCompliantFiatTokens): CREATE2_FACTORY_ADDRESS=0x750E4a8adCe9f0e67A420aBE91342DC64Eb90825

# =============================================================================
# Explorer API Keys (for contract verification AND gas price fetching)
# =============================================================================
# Etherscan (Ethereum Mainnet)
# Used for: Contract verification AND real-time gas price fetching
ETHERSCAN_API_KEY=your_etherscan_api_key_here
# Get your API key at: https://etherscan.io/apis

# Cronoscan
CRONOSCAN_API_KEY=your_cronoscan_api_key_here

# BscScan
BSCSCAN_API_KEY=your_bscscan_api_key_here

# Polygonscan
POLYGONSCAN_API_KEY=your_polygonscan_api_key_here

# Gnosisscan
GNOSISSCAN_API_KEY=your_gnosisscan_api_key_here

# Snowtrace (Avalanche)
SNOWTRACE_API_KEY=your_snowtrace_api_key_here

# Basescan
BASESCAN_API_KEY=your_basescan_api_key_here

# Arbiscan
ARBISCAN_API_KEY=your_arbiscan_api_key_here

# Optimistic Etherscan
OPTIMISTIC_ETHERSCAN_API_KEY=your_optimistic_etherscan_api_key_here

# =============================================================================
# Chain-Specific CCIP Configuration
# =============================================================================

# Ethereum Mainnet CCIP
CCIP_ETH_ROUTER=0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
CCIP_ETH_LINK_TOKEN=0x514910771AF9Ca656af840dff83E8264EcF986CA
ETH_MAINNET_SELECTOR=5009297550715157269

# Cronos CCIP (update with actual addresses when available)
CCIP_CRONOS_ROUTER=0x0000000000000000000000000000000000000000
CCIP_CRONOS_LINK_TOKEN=0x0000000000000000000000000000000000000000
CRONOS_SELECTOR=0

# BSC CCIP (update with actual addresses when available)
CCIP_BSC_ROUTER=0x0000000000000000000000000000000000000000
CCIP_BSC_LINK_TOKEN=0x0000000000000000000000000000000000000000
BSC_SELECTOR=0

# Polygon CCIP (update with actual addresses when available)
CCIP_POLYGON_ROUTER=0x3C3D92629A02a8D95D5CB9650fe49C3544f69B43
CCIP_POLYGON_LINK_TOKEN=0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39
POLYGON_SELECTOR=4051577828743386545

# Gnosis CCIP (update with actual addresses when available)
CCIP_GNOSIS_ROUTER=0x0000000000000000000000000000000000000000
CCIP_GNOSIS_LINK_TOKEN=0x0000000000000000000000000000000000000000
GNOSIS_SELECTOR=0

# Avalanche CCIP
CCIP_AVALANCHE_ROUTER=0xF694E193200268f9a4868e4Aa017A0118C9a8177
CCIP_AVALANCHE_LINK_TOKEN=0x5947BB275c521040051E823961ee81e07Ca0C08A
AVALANCHE_SELECTOR=6433500567565415381

# Base CCIP
CCIP_BASE_ROUTER=0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
CCIP_BASE_LINK_TOKEN=0x88Fb150BDc53A65fe94Dea0c9BA0a6dAf8C6e396
BASE_SELECTOR=15971525489660198786

# Arbitrum CCIP
CCIP_ARBITRUM_ROUTER=0x1619DE6B6B20eD217a58d00f37B9d47C7663feca
CCIP_ARBITRUM_LINK_TOKEN=0xf97f4df75117a78c1A5a0DBb814Af92458539FB4
ARBITRUM_SELECTOR=4949039107694359620

# Optimism CCIP
CCIP_OPTIMISM_ROUTER=0x261c05167db67Be2E2dc4a347C4E6B000C677852
CCIP_OPTIMISM_LINK_TOKEN=0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6
OPTIMISM_SELECTOR=3734403246176062136

# Chain-138 CCIP
CCIP_CHAIN138_ROUTER=0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
CHAIN138_SELECTOR=0x000000000000008a

# =============================================================================
# WETH Token Addresses (Canonical)
# =============================================================================
# These are the canonical addresses on Ethereum Mainnet
# On other chains, we may deploy new instances or use chain-specific WETH

# Ethereum Mainnet (canonical - already deployed)
WETH9_MAINNET=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
WETH10_MAINNET=0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f

# For other chains, set to address(0) to deploy new instances
# Or set to existing WETH addresses if using canonical WETH on those chains
WETH9_CRONOS=0x0000000000000000000000000000000000000000
WETH10_CRONOS=0x0000000000000000000000000000000000000000

WETH9_BSC=0x0000000000000000000000000000000000000000
WETH10_BSC=0x0000000000000000000000000000000000000000

WETH9_POLYGON=0x0000000000000000000000000000000000000000
WETH10_POLYGON=0x0000000000000000000000000000000000000000

WETH9_GNOSIS=0x0000000000000000000000000000000000000000
WETH10_GNOSIS=0x0000000000000000000000000000000000000000

WETH9_AVALANCHE=0x0000000000000000000000000000000000000000
WETH10_AVALANCHE=0x0000000000000000000000000000000000000000

WETH9_BASE=0x0000000000000000000000000000000000000000
WETH10_BASE=0x0000000000000000000000000000000000000000

WETH9_ARBITRUM=0x0000000000000000000000000000000000000000
WETH10_ARBITRUM=0x0000000000000000000000000000000000000000

WETH9_OPTIMISM=0x0000000000000000000000000000000000000000
WETH10_OPTIMISM=0x0000000000000000000000000000000000000000

# =============================================================================
# Ethereum Mainnet - Already Deployed Contracts
# =============================================================================
# These addresses are already deployed on Ethereum Mainnet
# Do not redeploy these contracts

CCIPWETH9BRIDGE_MAINNET=0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6
CCIPWETH10BRIDGE_MAINNET=0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e

# CCIPLogger is NOT yet deployed on Mainnet - will be deployed
CCIPLOGGER_MAINNET=

# =============================================================================
# Compliant tokens on other chains (DeployCompliantFiatTokensForChain / --deploy-c)
# =============================================================================
# Set after running deploy-tokens-and-weth-all-chains-skip-canonical.sh --deploy-c
# CUSDT_CRONOS=0x...
# CUSDC_CRONOS=0x...
# CUSDT_BSC=0x...
# CUSDC_BSC=0x...
# CUSDT_POLYGON=0x...
# CUSDC_POLYGON=0x...
# (same pattern for GNOSIS, AVALANCHE, BASE, ARBITRUM, OPTIMISM)

# =============================================================================
# Compliant wrapped tokens (DeployCWTokens / --deploy-cw)
# =============================================================================
# Default: CW_BRIDGE_ADDRESS=0x0; use per-chain overrides (best practice). In .env, CW_BRIDGE_<CHAIN> are set from the deployed bridge suite (CCIP_RELAY_BRIDGE_MAINNET, CCIPWETH9_BRIDGE_*).
# Per-chain: CW_BRIDGE_MAINNET, CW_BRIDGE_CRONOS, CW_BRIDGE_BSC, CW_BRIDGE_POLYGON, CW_BRIDGE_GNOSIS, CW_BRIDGE_AVALANCHE, CW_BRIDGE_BASE, CW_BRIDGE_ARBITRUM, CW_BRIDGE_OPTIMISM
# Bridge-only operational-role defaults for new cW* deployments:
CW_STRICT_MODE=1
CW_FREEZE_OPERATIONAL_ROLES=1
# Optional: governance multisig/controller that should hold admin and governance metadata roles on newer cW* deployments
CW_GOVERNANCE_ADMIN=
# After deploy, set:
# CWUSDT_CRONOS=0x...
# CWUSDC_CRONOS=0x...
# CWUSDT_BSC=0x...
# CWUSDC_BSC=0x...
# (same pattern for other chains)

# =============================================================================
# ALL Mainnet (651940) — env only (no token deploy from this repo)
# =============================================================================
CHAIN_651940_RPC=https://your-all-mainnet-rpc.example
AUSDT_ADDRESS_651940=0x0000000000000000000000000000000000000000

# =============================================================================
# Optional Configuration
# =============================================================================
# Authorized signer for CCIPLogger (can be zero address)
AUTHORIZED_SIGNER=0x0000000000000000000000000000000000000000

# =============================================================================
# Gas Configuration (Optional - Foundry auto-detects)
# =============================================================================
# Set these if you want to override auto-detection
# Values are in wei (1 gwei = 1,000,000,000 wei)
#
# Real-time gas prices are fetched automatically using:
# - Etherscan Gas API v2 (for Ethereum Mainnet) - requires ETHERSCAN_API_KEY
# - RPC endpoints (for all chains) - uses *_RPC_URL variables
#
# To update gas estimates with real-time prices:
#   ./scripts/deployment/get-multichain-gas-prices.sh
#   ./scripts/deployment/update-gas-estimates.sh

# Ethereum Mainnet
ETH_MAINNET_GAS_PRICE=50000000000  # 50 gwei (normal conditions)
ETH_MAINNET_GAS_LIMIT=3000000  # 3M gas (CCIPLogger deployment)

# Cronos
CRONOS_GAS_PRICE=1000000000  # 1000 gwei (1 gwei in ETH terms)
CRONOS_GAS_LIMIT=9000000  # 9M gas (all 5 contracts)

# BSC
BSC_GAS_PRICE=5000000000  # 5 gwei
BSC_GAS_LIMIT=9000000  # 9M gas (all 5 contracts)

# Polygon
POLYGON_GAS_PRICE=50000000000  # 50 gwei
POLYGON_GAS_LIMIT=9000000  # 9M gas (all 5 contracts)

# Gnosis
GNOSIS_GAS_PRICE=2000000000  # 2 gwei
GNOSIS_GAS_LIMIT=9000000  # 9M gas (all 5 contracts)

# =============================================================================
# Minimum Wallet Balances Required
# =============================================================================
# See docs/deployment/GAS_AND_TOKEN_REQUIREMENTS.md for detailed breakdown
#
# Ethereum Mainnet: 0.20 ETH (recommended)
# Cronos: 15 CRO (recommended)
# BSC: 0.06 BNB (recommended)
# Polygon: 1.0 MATIC (recommended)
# Gnosis: 0.05 xDAI (recommended)

# =============================================================================
# LINK Token Requirements (Post-Deployment)
# =============================================================================
# After deployment, bridges will need LINK tokens for CCIP fees
# Recommended: 10 LINK per chain for initial operations
#
# LINK Token Addresses:
# - Ethereum Mainnet: 0x514910771AF9Ca656af840dff83E8264EcF986CA
# - Polygon: 0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39
# - Cronos/BSC/Gnosis: TBD (update when available)

# =============================================================================
# Optional: Infura Gas API (Alternative to Etherscan)
# =============================================================================
# If you prefer to use Infura Gas API instead of Etherscan:
# INFURA_GAS_API=your_infura_api_key_here
# Or full URL:
# INFURA_GAS_API=https://gas.api.infura.io/networks/1/suggestedGasFees

# =============================================================================
# Legacy Support (for existing scripts)
# =============================================================================
# Some scripts may use these variable names
CCIP_ROUTER=${CCIP_ETH_ROUTER}
CCIP_FEE_TOKEN=${CCIP_ETH_LINK_TOKEN}
WETH9_ADDRESS=${WETH9_MAINNET}
WETH10_ADDRESS=${WETH10_MAINNET}
```

## Usage

1. Copy this content to `.env.example`:
   ```bash
   cat > .env.example << 'EOF'
   [paste the content above]
   EOF
   ```

2. Copy to `.env` and fill in your values:
   ```bash
   cp .env.example .env
   # Edit .env with your actual values
   ```

3. Never commit `.env` to version control!
