4.1 KiB
Fix Bridge Errors Guide
Date: $(date)
Purpose: Guide to fix all errors found in bridge dry run
Errors Found in Dry Run
❌ Critical Error: Ethereum Mainnet Destination Not Configured
Issue: The WETH9 bridge contract does not have Ethereum Mainnet configured as a destination.
Impact: Bridge transactions to Ethereum Mainnet will fail.
Solution: Configure the destination using the fix script.
Fix Script
Script: scripts/fix-bridge-errors.sh
Purpose: Configures Ethereum Mainnet as a destination in the bridge contract.
Usage:
./scripts/fix-bridge-errors.sh [private_key] [weth9_mainnet_bridge_address]
Example:
./scripts/fix-bridge-errors.sh 0xYourPrivateKey 0xEthereumMainnetBridgeAddress
What it does:
- Checks current bridge configuration
- Configures WETH9 bridge for Ethereum Mainnet (if needed)
- Verifies configuration was successful
- Reports status
Prerequisites
Required Information
- Private Key: With permissions to configure bridge (usually deployer/admin)
- Ethereum Mainnet Bridge Address: The address of the CCIPWETH9Bridge contract on Ethereum Mainnet
Finding Ethereum Mainnet Bridge Address
The Ethereum Mainnet bridge address should be:
- The deployed CCIPWETH9Bridge contract address on Ethereum Mainnet
- Should match the bridge contract pattern used on other chains
- Check deployment records or contract verification
Note: If you don't have the Ethereum Mainnet bridge address, you may need to:
- Deploy the bridge contract on Ethereum Mainnet first
- Or use an existing bridge address if one was already deployed
Step-by-Step Fix
Step 1: Check Current Configuration
# Check WETH9 bridge
cast call 0x89dd12025bfCD38A168455A44B400e913ED33BE2 \
"destinations(uint64)" \
5009297550715157269 \
--rpc-url http://192.168.11.250:8545
If this returns 0x0000000000000000000000000000000000000000, the destination is not configured.
Step 2: Run Fix Script
./scripts/fix-bridge-errors.sh [private_key] [ethereum_mainnet_bridge_address]
Step 3: Verify Fix
# Re-run dry run to verify
./scripts/dry-run-bridge-to-ethereum.sh 0.1 [address]
All checks should now pass.
Alternative: Manual Configuration
If you prefer to configure manually:
# Get current nonce
NONCE=$(cast nonce [your_address] --rpc-url http://192.168.11.250:8545)
# Configure destination
cast send 0x89dd12025bfCD38A168455A44B400e913ED33BE2 \
"addDestination(uint64,address)" \
5009297550715157269 \
[ethereum_mainnet_bridge_address] \
--rpc-url http://192.168.11.250:8545 \
--private-key [your_private_key] \
--gas-price 5000000000 \
--nonce $NONCE
Verification
After running the fix script, verify the configuration:
# Check WETH9 bridge destination
cast call 0x89dd12025bfCD38A168455A44B400e913ED33BE2 \
"destinations(uint64)" \
5009297550715157269 \
--rpc-url http://192.168.11.250:8545
Should return the Ethereum Mainnet bridge address (not zero address).
Other Issues
CCIP Fee Calculation Failed
Issue: Could not calculate CCIP fee in dry run.
Possible Causes:
- Bridge contract may require LINK tokens for fees
- Fee calculation function may have different signature
- Network/RPC issues
Solution:
- Check if LINK tokens are needed
- Verify bridge contract fee mechanism
- Check LINK balance if required
Note: This is a warning, not a critical error. The actual bridge transaction will show the required fee.
After Fixing
Once the destination is configured:
-
Re-run Dry Run: Verify all checks pass
./scripts/dry-run-bridge-to-ethereum.sh 0.1 [address] -
Bridge Tokens: Execute actual bridge
./scripts/wrap-and-bridge-to-ethereum.sh 0.1 [private_key]
Summary
Error: Ethereum Mainnet destination not configured
Fix: Run ./scripts/fix-bridge-errors.sh [private_key] [bridge_address]
Verify: Re-run dry run script
Status: Ready to bridge after fix
Last Updated: $(date)