Files
smom-dbis-138/docs/deployment/BRIDGE_CONFIGURATION.md
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

4.1 KiB

Cross-Chain Bridge Configuration Guide

Date: 2025-12-11 Status: Ready for Configuration


🌉 Bridge Overview

Each chain has two CCIP bridges deployed:

  • CCIPWETH9Bridge: For WETH9 cross-chain transfers
  • CCIPWETH10Bridge: For WETH10 cross-chain transfers

📋 Deployed Bridges by Chain

BSC (Chain ID: 56)

  • CCIPWETH9Bridge: 0x8078a09637e47fa5ed34f626046ea2094a5cde5e
  • CCIPWETH10Bridge: 0x105f8a15b819948a89153505762444ee9f324684

Polygon (Chain ID: 137)

  • CCIPWETH9Bridge: 0xa780ef19a041745d353c9432f2a7f5a241335ffe
  • CCIPWETH10Bridge: 0xdab0591e5e89295ffad75a71dcfc30c5625c4fa2

Avalanche (Chain ID: 43114)

  • CCIPWETH9Bridge: 0x8078a09637e47fa5ed34f626046ea2094a5cde5e
  • CCIPWETH10Bridge: 0x105f8a15b819948a89153505762444ee9f324684

Base (Chain ID: 8453)

  • CCIPWETH9Bridge: 0x8078a09637e47fa5ed34f626046ea2094a5cde5e
  • CCIPWETH10BRIDGE: 0x105f8a15b819948a89153505762444ee9f324684

Arbitrum (Chain ID: 42161)

  • CCIPWETH9Bridge: 0x8078a09637e47fa5ed34f626046ea2094a5cde5e
  • CCIPWETH10Bridge: 0x105f8a15b819948a89153505762444ee9f324684

Optimism (Chain ID: 10)

  • CCIPWETH9Bridge: 0x8078a09637e47fa5ed34f626046ea2094a5cde5e
  • CCIPWETH10Bridge: 0x105f8a15b819948a89153505762444ee9f324684

⚙️ Configuration Steps

1. Set Destination Chains

For each bridge, configure destination chain selectors:

// Example: Configure BSC bridge to send to Polygon
bridge.setDestinationChain(
    POLYGON_SELECTOR,  // 4051577828743386545
    polygonBridgeAddress
);

Each bridge needs LINK tokens for CCIP fees:

# Transfer LINK to bridge
cast send $LINK_TOKEN \
  "transfer(address,uint256)" \
  $BRIDGE_ADDRESS \
  $AMOUNT \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY

Recommended: 10 LINK per bridge for initial operations

3. Enable Bridges

Enable bridges for cross-chain operations:

bridge.enable();

4. Set Fee Configuration

Configure fee parameters if needed:

bridge.setFeeConfig(...);

🔗 Chain Selectors Reference

Chain Chain Selector
Ethereum Mainnet 5009297550715157269
BSC 11344663589394136015
Polygon 4051577828743386545
Avalanche 6433500567565415381
Base 15971525489660198786
Arbitrum 4949039107694359620
Optimism 3734403246176062136
Cronos TBD
Gnosis TBD
Chain-138 TBD

📝 Configuration Scripts

Example: Configure BSC → Polygon Bridge

# Set Polygon as destination for BSC WETH9 bridge
cast send $CCIPWETH9BRIDGE_BSC \
  "setDestinationChain(uint64,address)" \
  4051577828743386545 \
  $CCIPWETH9BRIDGE_POLYGON \
  --rpc-url $BSC_RPC_URL \
  --private-key $PRIVATE_KEY

# Fund bridge with LINK
cast send $CCIP_BSC_LINK_TOKEN \
  "transfer(address,uint256)" \
  $CCIPWETH9BRIDGE_BSC \
  10000000000000000000 \
  --rpc-url $BSC_RPC_URL \
  --private-key $PRIVATE_KEY

# Enable bridge
cast send $CCIPWETH9BRIDGE_BSC \
  "enable()" \
  --rpc-url $BSC_RPC_URL \
  --private-key $PRIVATE_KEY

🧪 Testing Bridge Configuration

Test Cross-Chain Transfer

# On source chain: Lock and send
cast send $CCIPWETH9BRIDGE_BSC \
  "lockAndSend(uint256,uint64)" \
  $AMOUNT \
  4051577828743386545 \
  --rpc-url $BSC_RPC_URL \
  --private-key $PRIVATE_KEY

# On destination chain: Check for received message
# (CCIP will automatically deliver)

⚠️ Important Notes

  1. LINK Tokens: Ensure bridges have sufficient LINK for CCIP fees
  2. Chain Selectors: Use correct selectors from CCIP documentation
  3. Gas Limits: Set appropriate gas limits for cross-chain messages
  4. Security: Verify all destination addresses before enabling
  5. Testing: Test with small amounts first

📚 Additional Resources


Last Updated: 2025-12-11