- 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.
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: truesetting - ✅ Optimizer enabled (200 runs)
- ✅ Compiler version 0.8.20
- ✅ All required settings
📋 Step-by-Step Instructions
Step 1: Go to Etherscan
- Navigate to: https://etherscan.io/address/0x89dd12025bfcd38a168455a44b400e913ed33be2#code
- Click "Contract" tab
- Click "Verify and Publish"
Step 2: Select Compiler Type
Important: Select "Standard JSON Input" (NOT "Single file")
Step 3: Upload Standard JSON
- Open the file:
docs/CCIPWETH9Bridge_standard_json.json - Copy the entire contents of the JSON file
- 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
- Click "Verify and Publish"
- Wait for verification (up to 45 seconds)
- 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:
_ccipRouter:0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D_weth9:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2_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:
- Check JSON format: Ensure it's valid JSON (no syntax errors)
- Verify viaIR setting: Make sure
"viaIR": trueis present - Check compiler version: Ensure it matches
0.8.20 - 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