You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two contracts with the same source code but different NatSpec tags (@notice vs @inheritdoc) compile to different bytecode, making the output non-deterministic.
Expected: NatSpec comments should not impact bytecode.
Environment
Compiler version: 0.8.30
Compilation pipeline: legacy
Target EVM version: any
Framework/IDE: solc standard-json
OS: Windows
Steps to Reproduce
Attached with two files:
Two variants of the same json files that differ only in NatSpec comments: one uses @notice, the other uses @inheritdoc.
uni.json - using @notice
arbi.json - using @inheritdoc
Command used to compile:
solc-windows-amd64-v0.8.30.exe --standard-json < uni.json > outuni.json
solc-windows-amd64-v0.8.30.exe --standard-json < arbi.json > outarbi.json
From the output, we can see that the bytecode for contract src/TheCompact.sol:TheCompact is different.
Here are the difff: https://difff.jp/en/xi9vx.html