Files
proxmox/docs/06-besu/T1_2_BRIDGE_INTERFACE_INVESTIGATION.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- 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>
2026-02-12 15:46:57 -08:00

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): Returns 0x4A666F96fC8764181194447A7dFdb7d471b301C8

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)
  • destinations mapping 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

  1. Check Proxy Pattern:

    # Check EIP-1967 implementation slot
    cast storage <bridge> 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc --rpc-url <rpc>
    
  2. Check Contract Bytecode Size:

    cast code <bridge> --rpc-url <rpc> | wc -c
    
  3. Query Alternative Functions:

    • Try different function names
    • Check event logs for configuration
    • Check if destinations configured via different method

Alternative Configuration Methods

  1. Event Logs: Check for DestinationAdded events
  2. Storage Inspection: Read storage slots directly
  3. Different Function Names: May use different naming
  4. Proxy Implementation: Query implementation contract directly

🚨 Impact

Blocking: Yes - Prevents ChainID 138 → Mainnet configuration

Workaround Options:

  1. Use proxy implementation address directly (if proxy)
  2. Read from storage slots directly
  3. Use event logs to determine current configuration
  4. 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:

  1. Investigate proxy pattern
  2. Check contract version differences
  3. Find alternative configuration method

Last Updated: 2026-01-18