Files
proxmox/docs/archive/configuration/ETHERSCAN_STANDARD_JSON_INSTRUCTIONS.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

3.7 KiB

Etherscan Verification - Standard JSON Input Instructions

Issue: Etherscan doesn't show "Via IR" option
Solution: Use Standard JSON Input method with viaIR: true included


Ready-to-Use Standard JSON

File: docs/CCIPWETH9Bridge_standard_json.json

This file contains:

  • Flattened contract source code
  • viaIR: true setting
  • Optimizer enabled (200 runs)
  • Compiler version 0.8.20
  • All required settings

📋 Step-by-Step Instructions

Step 1: Go to Etherscan

  1. Navigate to: https://etherscan.io/address/0x89dd12025bfcd38a168455a44b400e913ed33be2#code
  2. Click "Contract" tab
  3. Click "Verify and Publish"

Step 2: Select Compiler Type

Important: Select "Standard JSON Input" (NOT "Single file")

Step 3: Upload Standard JSON

  1. Open the file: docs/CCIPWETH9Bridge_standard_json.json
  2. Copy the entire contents of the JSON file
  3. Paste into the "Standard JSON Input" field on Etherscan

Step 4: Enter Constructor Arguments

ABI-Encoded Constructor Arguments:

0x00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca

Paste this into the "Constructor Arguments" field.

Step 5: Submit

  1. Click "Verify and Publish"
  2. Wait for verification (up to 45 seconds)
  3. Check the result

🔍 What's in the Standard JSON

The Standard JSON includes:

{
  "language": "Solidity",
  "sources": {
    "CCIPWETH9Bridge.sol": {
      "content": "[flattened contract code]"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "viaIR": true,   This is the key!
    "evmVersion": "london",
    "compiler": "0.8.20"
  }
}

Key Setting: "viaIR": true - This matches the deployment settings.


⚠️ Alternative: Try Without Via IR

If Standard JSON Input still fails, try the Single File method 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 as default)

Contract Code: Copy from docs/CCIPWETH9Bridge_flattened.sol

Note: This may work if the bytecode is compatible without via-ir, but it's less likely to succeed.


📝 Constructor Arguments (Decoded)

For reference, the constructor arguments are:

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

Expected Result

With Standard JSON Input and viaIR: true, the bytecode should match and verification should succeed.


🔄 Troubleshooting

If Standard JSON Input fails:

  1. Check JSON format: Ensure it's valid JSON (no syntax errors)
  2. Verify viaIR setting: Make sure "viaIR": true is present
  3. Check compiler version: Ensure it matches 0.8.20
  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 fully support
  • Consider using Sourcify (alternative verification service)
  • Or contact Etherscan support with deployment transaction details

📚 Files Reference

  • Standard JSON: docs/CCIPWETH9Bridge_standard_json.json
  • Flattened Contract: docs/CCIPWETH9Bridge_flattened.sol
  • Documentation: docs/ETHERSCAN_VERIFICATION_NO_VIA_IR.md

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