- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
11 KiB
11 KiB
Environment Variables Example
Since .env.example is blocked from direct editing, here is the complete content you should create in .env.example:
# =============================================================================
# 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
# =============================================================================
# Ethereum Mainnet
ETH_MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY
# Alternative: ETH_MAINNET_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
# Cronos (Crypto.com)
CRONOS_RPC_URL=https://evm.cronos.org
# BSC (BNB Smart Chain)
BSC_RPC_URL=https://bsc-dataseed1.binance.org
# Alternative: BSC_RPC_URL=https://bsc-dataseed.binance.org
# Polygon PoS
POLYGON_RPC_URL=https://polygon-rpc.com
# Alternative: POLYGON_RPC_URL=https://rpc-mainnet.maticvigil.com
# Gnosis Chain (PoA)
GNOSIS_RPC_URL=https://rpc.gnosischain.com
# Alternative: GNOSIS_RPC_URL=https://xdai-archive.blockscout.com
# Avalanche C-Chain
AVALANCHE_RPC_URL=https://api.avax.network/ext/bc/C/rpc
# Alternative: AVALANCHE_RPC_URL=https://avalanche-mainnet.infura.io/v3/YOUR_KEY
# Base
BASE_RPC_URL=https://mainnet.base.org
# Alternative: BASE_RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_KEY
# Arbitrum One
ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc
# Alternative: ARBITRUM_RPC_URL=https://arbitrum-mainnet.infura.io/v3/YOUR_KEY
# Optimism
OPTIMISM_RPC_URL=https://mainnet.optimism.io
# Alternative: OPTIMISM_RPC_URL=https://optimism-mainnet.infura.io/v3/YOUR_KEY
# Chain-138 (DeFi Oracle Meta Mainnet)
RPC_URL_138=https://rpc.d-bis.org
# =============================================================================
# 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=
# =============================================================================
# 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
-
Copy this content to
.env.example:cat > .env.example << 'EOF' [paste the content above] EOF -
Copy to
.envand fill in your values:cp .env.example .env # Edit .env with your actual values -
Never commit
.envto version control!