Files
proxmox/docs/archive/tests/ETHERSCAN_VERIFICATION_NO_VIA_IR.md
defiQUG cb47cce074 Complete markdown files cleanup and organization
- Organized 252 files across project
- Root directory: 187 → 2 files (98.9% reduction)
- Moved configuration guides to docs/04-configuration/
- Moved troubleshooting guides to docs/09-troubleshooting/
- Moved quick start guides to docs/01-getting-started/
- Moved reports to reports/ directory
- Archived temporary files
- Generated comprehensive reports and documentation
- Created maintenance scripts and guides

All files organized according to established standards.
2026-01-06 01:46:25 -08:00

4.1 KiB

Etherscan Verification - No Via IR Option Available

Issue: Etherscan verification form doesn't have "Via IR" option
Solution: Use Standard JSON Input method instead


Solution: Standard JSON Input Method

Since Etherscan doesn't show a "Via IR" option in the single-file form, use the Standard JSON Input method which allows full compiler configuration.


📋 Step-by-Step Instructions

Step 1: Generate Standard JSON Input

  1. Compile the contract with via-ir:

    cd /home/intlc/projects/smom-dbis-138
    forge build --via-ir --force
    
  2. Find the Standard JSON:

    • Look in out/ccip/CCIPWETH9Bridge.sol/CCIPWETH9Bridge.json
    • Or use forge build --via-ir and check the output

Step 2: Use Standard JSON on Etherscan

  1. Go to Etherscan:

  2. Select Compiler Type:

    • Choose "Standard JSON Input" (not "Single file")
  3. Upload Standard JSON:

    • Copy the Standard JSON from the build artifacts
    • Paste into the Standard JSON Input field
  4. Enter Constructor Arguments:

    0x00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
    
  5. Submit for verification


🔄 Alternative: Try Without Via IR

If Standard JSON Input doesn't work, try verification without via-ir:

Settings:

  • Compiler Type: SINGLE FILE / CONCATENATED METHOD
  • Compiler Version: v0.8.20+commit.a1b79de6
  • License: MIT License (MIT)
  • Optimization: Yes (200 runs)
  • Via IR: Not available (leave default/No)

Note: This may fail if the bytecode truly requires via-ir, but it's worth trying.


🛠️ Manual Standard JSON Creation

If build artifacts aren't available, you can create a Standard JSON manually:

{
  "language": "Solidity",
  "sources": {
    "CCIPWETH9Bridge.sol": {
      "content": "[paste flattened contract code here]"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "viaIR": true,
    "evmVersion": "london",
    "outputSelection": {
      "*": {
        "*": ["abi", "evm.bytecode", "evm.deployedBytecode"]
      }
    }
  }
}

Important:

  • Set "viaIR": true in the settings
  • Include the flattened contract code in the content field
  • Use compiler version 0.8.20

📝 Constructor Arguments

ABI-Encoded:

0x00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca

Decoded:

  1. _ccipRouter: 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
  2. _weth9: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
  3. _feeToken: 0x514910771AF9Ca656af840dff83E8264EcF986CA

🔍 Why Standard JSON Input?

  • Full Control: Allows specifying viaIR: true in compiler settings
  • Exact Match: Can match the exact deployment compiler configuration
  • More Options: Provides access to all compiler settings

⚠️ Troubleshooting

If Standard JSON Input fails:

  1. Check compiler version: Ensure it matches exactly
  2. Verify viaIR setting: Make sure "viaIR": true is set
  3. Check source code: Ensure flattened code is complete
  4. Try different compiler version: Some versions may handle via-ir differently

If all methods fail:

  • The contract may have been deployed with settings that Etherscan doesn't support
  • Consider using Sourcify (alternative verification service)
  • Or contact Etherscan support with deployment transaction details

📚 References


Last Updated: $(date)
Status: USE STANDARD JSON INPUT METHOD