Files
smom-dbis-138/scripts/deployment/deploy-ccip-weth9-bridge.sh
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- 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.
2025-12-12 14:57:48 -08:00

67 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
# Deploy CCIPWETH9Bridge to ChainID 138
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
# Load environment
if [ -f "$PROJECT_ROOT/.env" ]; then
source "$PROJECT_ROOT/.env"
fi
RPC_URL="${RPC_URL:-http://localhost:8545}"
PRIVATE_KEY="${PRIVATE_KEY:-}"
# CCIP Configuration
CCIP_ROUTER="${CCIP_ROUTER:-}"
CCIP_FEE_TOKEN="${CCIP_FEE_TOKEN:-}" # LINK token address
# WETH9 address (canonical Mainnet address or deployed address)
WETH9_ADDRESS="${WETH9_ADDRESS:-0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2}"
if [ -z "$PRIVATE_KEY" ]; then
echo "Error: PRIVATE_KEY environment variable not set"
exit 1
fi
if [ -z "$CCIP_ROUTER" ]; then
echo "Error: CCIP_ROUTER environment variable not set"
exit 1
fi
if [ -z "$CCIP_FEE_TOKEN" ]; then
echo "Error: CCIP_FEE_TOKEN environment variable not set"
exit 1
fi
echo "Deploying CCIPWETH9Bridge to ChainID 138..."
echo "RPC URL: $RPC_URL"
echo "CCIP Router: $CCIP_ROUTER"
echo "WETH9 Address: $WETH9_ADDRESS"
echo "Fee Token (LINK): $CCIP_FEE_TOKEN"
cd "$PROJECT_ROOT"
# Export environment variables for Foundry
export PRIVATE_KEY
export CCIP_ROUTER
export CCIP_FEE_TOKEN
forge script script/DeployCCIPWETH9Bridge.s.sol:DeployCCIPWETH9Bridge \
--rpc-url "$RPC_URL" \
--broadcast \
--private-key "$PRIVATE_KEY" \
--verify \
-vvvv
echo "CCIPWETH9Bridge deployment complete!"
echo "Next steps:"
echo "1. Save the deployed bridge address to your .env file"
echo "2. Configure bridge destinations:"
echo " ./scripts/deployment/configure-weth9-bridge.sh"