import statements.Quacks.sol.0.8.x).paris, london), select it; otherwise, leave as default.Enable optimization and set the Runs value (commonly 200). This must match the deployment settings.artifacts/ folder (or root directory depending on Remix version).ContractName_metadata.json (e.g., Quacks_metadata.json).metadata.json generated by Remix often contains URLs (IPFS/Swarm) instead of the actual source code content.Quacks_metadata.json. In the sources section, you might see a structure like this (missing actual code):"sources": {
"Quacks.sol": {
"keccak256": "0x...",
"urls": ["bzz-raw://...", "dweb:/ipfs/..."] // Subscan cannot read these external links
}
}
"content" field containing the actual Solidity source string.{
"language": "Solidity",
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
// ... other settings
},
"sources": {
// For the main file
"Quacks.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract Quacks { ... PASTE FULL SOURCE CODE HERE ... }"
},
// For dependencies (e.g., OpenZeppelin) - EVERY imported file needs this
"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts...\n... PASTE FULL LIBRARY SOURCE HERE ..."
}
}
}
💡 Tips: All imported files must be listed in sources.The value of "content"must be a string (watch out for newlines\nand escaping quotes).If you are using Hardhat/Foundry, their generated build-infofiles already contain thecontentfield, so this manual step is not needed.
Standard-Input.json.Standard-JSON-Input.Standard-Input.json you created in Phase 2.| Issue | Possible Cause & Solution |
|---|---|
| Bytecode mismatch | Optimization Runs: Did you use 200 runs in Remix but default in the JSON? Ensure they match. |
| EVM Version: Ensure the EVM version (e.g., London/Paris) is consistent. | |
| Parsing Error | JSON Syntax: Ensure the pasted source code in the JSON doesn't break the JSON string format (escape quotes " with \"). |
| Alternative Method | If manual JSON editing is too difficult, install the "Flattener" plugin in Remix. Flatten your code into one file, and use the "Flatten Code" method on Subscan instead. |