110 lines
2.7 KiB
Markdown
110 lines
2.7 KiB
Markdown
|
|
# Etherscan Standard JSON - FIXED
|
||
|
|
|
||
|
|
**Error**: `Unknown key "compiler"`
|
||
|
|
**Fix**: Removed invalid key from Standard JSON
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## ✅ Fixed Standard JSON
|
||
|
|
|
||
|
|
**File**: `docs/CCIPWETH9Bridge_standard_json.json`
|
||
|
|
|
||
|
|
**Changes**:
|
||
|
|
- ❌ Removed invalid `"compiler"` key
|
||
|
|
- ✅ Kept valid Standard JSON Input format
|
||
|
|
- ✅ `viaIR: true` still included
|
||
|
|
- ✅ Optimizer settings correct
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 📋 Corrected Standard JSON Format
|
||
|
|
|
||
|
|
The Standard JSON Input format should **NOT** include a `"compiler"` key. The compiler version is:
|
||
|
|
1. Specified in the Etherscan form (when using Standard JSON Input)
|
||
|
|
2. Or inferred from the `pragma` statement in the source code
|
||
|
|
|
||
|
|
**Correct Format**:
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"language": "Solidity",
|
||
|
|
"sources": {
|
||
|
|
"CCIPWETH9Bridge.sol": {
|
||
|
|
"content": "[contract code]"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"settings": {
|
||
|
|
"optimizer": {
|
||
|
|
"enabled": true,
|
||
|
|
"runs": 200
|
||
|
|
},
|
||
|
|
"viaIR": true,
|
||
|
|
"evmVersion": "london",
|
||
|
|
"outputSelection": {
|
||
|
|
"*": {
|
||
|
|
"*": ["abi", "evm.bytecode", "evm.deployedBytecode"]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 🎯 Updated Instructions
|
||
|
|
|
||
|
|
### Step 1: Go to Etherscan
|
||
|
|
|
||
|
|
1. Navigate to: https://etherscan.io/address/0x89dd12025bfcd38a168455a44b400e913ed33be2#code
|
||
|
|
2. Click **"Contract"** tab → **"Verify and Publish"**
|
||
|
|
|
||
|
|
### Step 2: Select Compiler Type
|
||
|
|
|
||
|
|
Select **"Standard JSON Input"**
|
||
|
|
|
||
|
|
### Step 3: Specify Compiler Version
|
||
|
|
|
||
|
|
**Important**: In the form, select:
|
||
|
|
- **Compiler Version**: `v0.8.20+commit.a1b79de6`
|
||
|
|
|
||
|
|
(This is separate from the JSON - Etherscan will use the version you select in the form)
|
||
|
|
|
||
|
|
### Step 4: Upload Standard JSON
|
||
|
|
|
||
|
|
1. Open: `docs/CCIPWETH9Bridge_standard_json.json`
|
||
|
|
2. Copy the **entire contents**
|
||
|
|
3. Paste into the **"Standard JSON Input"** field
|
||
|
|
|
||
|
|
### Step 5: Enter Constructor Arguments
|
||
|
|
|
||
|
|
```
|
||
|
|
0x00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
|
||
|
|
```
|
||
|
|
|
||
|
|
### Step 6: Submit
|
||
|
|
|
||
|
|
Click **"Verify and Publish"**
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## ⚠️ Important Notes
|
||
|
|
|
||
|
|
1. **Compiler Version**: Select `v0.8.20+commit.a1b79de6` in the Etherscan form (not in the JSON)
|
||
|
|
2. **Via IR**: Already set to `true` in the Standard JSON
|
||
|
|
3. **Optimizer**: Already set to enabled with 200 runs in the JSON
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 🔍 Why This Format
|
||
|
|
|
||
|
|
The Solidity Standard JSON Input format doesn't include a `"compiler"` key. The compiler version is:
|
||
|
|
- Specified separately in the Etherscan form UI
|
||
|
|
- Or can be inferred from the `pragma solidity ^0.8.19;` statement
|
||
|
|
|
||
|
|
However, since the contract was deployed with **0.8.20** (not 0.8.19), you **must** select `v0.8.20+commit.a1b79de6` in the Etherscan form.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
**Last Updated**: $(date)
|
||
|
|
**Status**: ✅ **FIXED - USE UPDATED STANDARD JSON**
|
||
|
|
|