# Etherscan Verification - FIXED Settings **Error**: "Unable to find matching Contract Bytecode and ABI" **Solution**: Use **Via IR: YES** --- ## ✅ CORRECT Verification Settings ### Form Fields | Field | Value | |-------|-------| | **Contract Address** | `0x89dd12025bfcd38a168455a44b400e913ed33be2` | | **Compiler Type** | `SINGLE FILE / CONCATENATED METHOD` | | **Compiler Version** | `v0.8.20+commit.a1b79de6` | | **License** | `MIT License (MIT)` | | **Optimization** | `Yes` (200 runs) | | **Via IR** | ✅ **YES** ← **CRITICAL!** | --- ## 🔑 Key Fix **The contract was deployed with `--via-ir` flag**, so verification **MUST** also use **Via IR: YES**. The bytecode mismatch occurred because: - ❌ Verification attempted with: Via IR: **No** - ✅ Deployment used: Via IR: **Yes** --- ## 📝 Constructor Arguments **ABI-Encoded**: ``` 0x00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca ``` **Decoded**: 1. `_ccipRouter`: `0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D` 2. `_weth9`: `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` 3. `_feeToken`: `0x514910771AF9Ca656af840dff83E8264EcF986CA` --- ## 📄 Contract Source Code **File**: `docs/CCIPWETH9Bridge_flattened.sol` **Lines**: 396 lines **Ready to paste**: Yes Copy the entire contents and paste into Etherscan's "Enter the Solidity Contract Code below" field. --- ## 🎯 Step-by-Step Instructions 1. **Go to Etherscan**: - https://etherscan.io/address/0x89dd12025bfcd38a168455a44b400e913ed33be2#code - Click **"Contract"** tab → **"Verify and Publish"** 2. **Fill in the form**: - Contract Address: `0x89dd12025bfcd38a168455a44b400e913ed33be2` - Compiler Type: `SINGLE FILE / CONCATENATED METHOD` - Compiler Version: `v0.8.20+commit.a1b79de6` - License: `MIT License (MIT)` - Optimization: `Yes` (200 runs) - **Via IR: ✅ YES** ← **This is the fix!** 3. **Paste Contract Code**: - Copy from `docs/CCIPWETH9Bridge_flattened.sol` - Paste into the code field 4. **Enter Constructor Arguments**: - Paste the ABI-encoded constructor arguments above 5. **Submit**: - Click **"Verify and Publish"** - Wait for verification (up to 45 seconds) --- ## ✅ Expected Result With **Via IR: YES**, the bytecode should match and verification should succeed. --- ## 📚 Reference - **Deployment Script**: Used `--via-ir` flag (confirmed) - **Documentation**: `docs/ETHERSCAN_BYTECODE_MISMATCH_FIX.md` - **Flattened Contract**: `docs/CCIPWETH9Bridge_flattened.sol` --- **Last Updated**: $(date) **Status**: ✅ **FIXED - USE VIA IR: YES**