- 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>
3.3 KiB
T1.2: ChainID 138 Bridge Interface Investigation
Last Updated: 2026-01-31
Document Version: 1.0
Status: Active Documentation
Date: 2026-01-18
Status: ⚠️ INTERFACE MISMATCH DETECTED
🔍 Investigation Results
Function Tests on ChainID 138 Bridge
Bridge Address: 0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6
✅ Working Functions:
admin()(address): Returns0x4A666F96fC8764181194447A7dFdb7d471b301C8✅
❌ Reverting Functions:
getDestinationChains()(uint64[]): REVERTS ❌destinations(uint64)(uint64,address,bool): REVERTS ❌
Source Code Analysis
Contract Source (contracts/ccip/CCIPWETH9Bridge.sol):
- ✅
addDestination(uint64,address)exists (line 228) - ✅
getDestinationChains()(uint64[])exists (line 297) - ✅
destinationsmapping exists (line 106)
Conclusion: Functions exist in source code but not accessible on deployed contract
🔍 Possible Causes
1. Proxy Pattern Issue
Scenario: Contract deployed as proxy, functions not forwarded correctly
Evidence:
admin()works (basic function)getDestinationChains()reverts (read function)destinations()reverts (mapping read)
Action: Check EIP-1967 implementation slot for proxy pattern
2. Different Contract Version
Scenario: Deployed contract is different version than source code
Evidence:
- Source code has functions
- Deployed contract doesn't expose them
Action: Compare deployed bytecode with compiled source
3. Storage Layout Mismatch
Scenario: Storage variables accessed incorrectly
Evidence:
- Mapping reads revert
- Array reads revert
Action: Verify storage layout matches deployment
4. Missing Functions in Deployment
Scenario: Contract deployed without these functions (different version)
Action: Check deployment logs/scripts for version used
📋 Next Steps
Immediate Investigation
-
Check Proxy Pattern:
# Check EIP-1967 implementation slot cast storage <bridge> 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc --rpc-url <rpc> -
Check Contract Bytecode Size:
cast code <bridge> --rpc-url <rpc> | wc -c -
Query Alternative Functions:
- Try different function names
- Check event logs for configuration
- Check if destinations configured via different method
Alternative Configuration Methods
- Event Logs: Check for
DestinationAddedevents - Storage Inspection: Read storage slots directly
- Different Function Names: May use different naming
- Proxy Implementation: Query implementation contract directly
🚨 Impact
Blocking: Yes - Prevents ChainID 138 → Mainnet configuration
Workaround Options:
- Use proxy implementation address directly (if proxy)
- Read from storage slots directly
- Use event logs to determine current configuration
- Update bridge contracts to match Mainnet interface (if different version)
📊 Summary
Status: ⚠️ INTERFACE MISMATCH
Functions in Source: ✅ Exist Functions on Deployed Contract: ❌ Not accessible
Next Action:
- Investigate proxy pattern
- Check contract version differences
- Find alternative configuration method
Last Updated: 2026-01-18