- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
6.8 KiB
ChainID 138 Bridge Deployment - Execution Guide
Last Updated: 2026-01-31
Document Version: 1.0
Status: Active Documentation
Date: 2026-01-18
Status: ✅ READY FOR EXECUTION
Purpose: Complete guide for deploying all bridges on ChainID 138
🚀 Quick Start
Prerequisites
-
Access to Hardwired System
- Must be on internal network (192.168.11.0/24)
- Access to Core RPC:
http://192.168.11.211:8545
-
Environment Setup
cd /home/intlc/projects/proxmox source smom-dbis-138/.env -
Verify Access
cast chain-id --rpc-url http://192.168.11.211:8545 # Should return: 138
📋 Deployment Options
Option 1: Complete Automated Deployment (Recommended)
Single command deploys everything:
cd /home/intlc/projects/proxmox
./scripts/deploy-all-bridges-standalone.sh
What it does:
- ✅ Pre-flight checks (RPC, balance, chain ID)
- ✅ Calculates optimal gas prices
- ✅ Deploys WETH9 Bridge
- ✅ Deploys WETH10 Bridge
- ✅ Configures Mainnet destinations
- ✅ Deploys LINK Token (CREATE2)
- ✅ Verifies all deployments
- ✅ Saves addresses to file
Output: All deployed addresses saved to /tmp/chain138-deployed-addresses-*.txt
Option 2: Step-by-Step Deployment
Step 1: Pre-Flight Checks
cd /home/intlc/projects/proxmox
./scripts/check-chain138-deployment-readiness.sh
Expected: All checks pass (0 errors)
Step 2: Deploy WETH9 Bridge
source smom-dbis-138/.env
RPC="http://192.168.11.211:8545"
MAX_FEE=$(bash scripts/calculate-chain138-gas-price.sh)
BASE_FEE=$(cast rpc eth_getBlockByNumber latest false --rpc-url "$RPC" | \
grep -o '"baseFeePerGas":"[^"]*"' | cut -d'"' -f4 | cast --to-dec)
AVAILABLE=$((MAX_FEE - BASE_FEE))
PRIORITY=$((AVAILABLE / 10))
cd smom-dbis-138
forge script script/DeployCCIPWETH9Bridge.s.sol:DeployCCIPWETH9Bridge \
--rpc-url "$RPC" \
--broadcast \
--private-key "$PRIVATE_KEY" \
--with-gas-price "$MAX_FEE" \
--priority-gas-price "$PRIORITY" \
--slow \
-vv
Save the deployed address (will be printed in output)
Step 3: Deploy WETH10 Bridge
forge script script/DeployCCIPWETH10Bridge.s.sol:DeployCCIPWETH10Bridge \
--rpc-url "$RPC" \
--broadcast \
--private-key "$PRIVATE_KEY" \
--with-gas-price "$MAX_FEE" \
--priority-gas-price "$PRIORITY" \
--slow \
-vv
Save the deployed address
Step 4: Configure Destinations
# Set bridge addresses from previous steps
WETH9_BRIDGE="0x..." # From Step 2
WETH10_BRIDGE="0x..." # From Step 3
# Mainnet configuration
MAINNET_SELECTOR="5009297550715157269"
MAINNET_WETH9="0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6"
MAINNET_WETH10="0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e"
# Configure WETH9 Bridge
cast send "$WETH9_BRIDGE" \
"addDestination(uint64,address)" \
"$MAINNET_SELECTOR" \
"$MAINNET_WETH9" \
--rpc-url "$RPC" \
--private-key "$PRIVATE_KEY" \
--max-fee-per-gas "$MAX_FEE" \
--priority-fee-per-gas "$PRIORITY" \
-vv
# Configure WETH10 Bridge
cast send "$WETH10_BRIDGE" \
"addDestination(uint64,address)" \
"$MAINNET_SELECTOR" \
"$MAINNET_WETH10" \
--rpc-url "$RPC" \
--private-key "$PRIVATE_KEY" \
--max-fee-per-gas "$MAX_FEE" \
--priority-fee-per-gas "$PRIORITY" \
-vv
Step 5: Deploy LINK Token (CREATE2)
forge script script/DeployLinkToCanonicalAddress.s.sol:DeployLinkToCanonicalAddress \
--rpc-url "$RPC" \
--broadcast \
--private-key "$PRIVATE_KEY" \
--with-gas-price "$MAX_FEE" \
--priority-gas-price "$PRIORITY" \
--slow \
-vv
Verify:
LINK_ADDRESS="0x514910771AF9Ca656af840dff83E8264EcF986CA"
cast code "$LINK_ADDRESS" --rpc-url "$RPC" | wc -c
# Should be > 1000 bytes
✅ Verification Steps
After deployment, verify all contracts:
RPC="http://192.168.11.211:8545"
# Verify WETH9 Bridge
WETH9_BRIDGE="0x..." # Your deployed address
cast code "$WETH9_BRIDGE" --rpc-url "$RPC" | wc -c
cast call "$WETH9_BRIDGE" "admin()(address)" --rpc-url "$RPC"
cast call "$WETH9_BRIDGE" "ccipRouter()(address)" --rpc-url "$RPC"
cast call "$WETH9_BRIDGE" "getDestinationChains()(uint64[])" --rpc-url "$RPC"
# Verify WETH10 Bridge
WETH10_BRIDGE="0x..." # Your deployed address
cast code "$WETH10_BRIDGE" --rpc-url "$RPC" | wc -c
cast call "$WETH10_BRIDGE" "admin()(address)" --rpc-url "$RPC"
cast call "$WETH10_BRIDGE" "ccipRouter()(address)" --rpc-url "$RPC"
cast call "$WETH10_BRIDGE" "getDestinationChains()(uint64[])" --rpc-url "$RPC"
# Verify LINK Token
LINK_ADDRESS="0x514910771AF9Ca656af840dff83E8264EcF986CA"
cast code "$LINK_ADDRESS" --rpc-url "$RPC" | wc -c
cast call "$LINK_ADDRESS" "name()(string)" --rpc-url "$RPC"
cast call "$LINK_ADDRESS" "symbol()(string)" --rpc-url "$RPC"
📝 Update Environment Files
After successful deployment, update .env files:
# Add to smom-dbis-138/.env
echo "CCIPWETH9BRIDGE_ADDRESS=$WETH9_BRIDGE" >> smom-dbis-138/.env
echo "CCIPWETH10BRIDGE_ADDRESS=$WETH10_BRIDGE" >> smom-dbis-138/.env
echo "CCIP_FEE_TOKEN=$LINK_ADDRESS" >> smom-dbis-138/.env
🔧 Troubleshooting
"Replacement transaction underpriced"
Solution: Clear broadcast cache and retry with higher gas price
cd smom-dbis-138
rm -rf broadcast/DeployCCIPWETH9Bridge.s.sol/138/run-latest.json
# Retry with higher gas price (2-3 gwei)
"Cannot connect to RPC"
Solution: Verify you're on the internal network and RPC is running
ping 192.168.11.211
curl -X POST http://192.168.11.211:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
"Insufficient balance"
Solution: Fund deployer account
# Check balance
cast balance "$DEPLOYER" --rpc-url "$RPC"
# Need > 1 ETH for deployments
📊 Expected Results
Successful Deployment Output
✓ WETH9 Bridge deployed at: 0x...
✓ WETH10 Bridge deployed at: 0x...
✓ LINK Token deployed at: 0x514910771AF9Ca656af840dff83E8264EcF986CA
✓ Destinations configured
✓ All verifications passed
Addresses File
Saved to: /tmp/chain138-deployed-addresses-YYYYMMDD-HHMMSS.txt
Contains:
- WETH9 Bridge address
- WETH10 Bridge address
- LINK Token address
- Mainnet configuration
🎯 Next Steps After Deployment
-
Update Documentation
- Update all
.envfiles - Update deployment status docs
- Update bridge addresses in frontend config
- Update all
-
Test Bidirectional Transfers
- Test ChainID 138 → Mainnet
- Test Mainnet → ChainID 138
- Verify CCIP messages process correctly
-
Monitor Deployments
- Check transaction receipts
- Verify contract code
- Test contract functions
Last Updated: 2026-01-18
Status: ✅ Ready for execution from hardwired system