This was causing me to pull my hair out! It turns out that etherscan's single-file verification has no way to indicate that viaIR was used by the compiler. However, the standard json method DOES. I guess that historically, only ethereum supported this method, but now it appears that at least Base/Blast (only one's I've tested so far) do - but in any case, viaIR would ALWAYS cause failure in single-file mode. Now if single file mode is being used, it raises an exception explaining as much, and verifies otherwise.
What I did
fixes: #
How I did it
How to verify it
Verified contracts. What I don't know how to do is create actual tests for this beyond dogfood. To that end, I planned on generating a simple few contracts to deploy across several ecosystems.
Checklist
[X] Passes all linting checks (pre-commit and CI jobs)
[x] New test cases have been added and are passing
[X] Documentation has been updated
[X] PR title follows Conventional Commit standard (will be automatically included in the changelog)
This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days.
This was causing me to pull my hair out! It turns out that etherscan's single-file verification has no way to indicate that viaIR was used by the compiler. However, the standard json method DOES. I guess that historically, only ethereum supported this method, but now it appears that at least Base/Blast (only one's I've tested so far) do - but in any case, viaIR would ALWAYS cause failure in single-file mode. Now if single file mode is being used, it raises an exception explaining as much, and verifies otherwise.
What I did
fixes: #
How I did it
How to verify it
Verified contracts. What I don't know how to do is create actual tests for this beyond dogfood. To that end, I planned on generating a simple few contracts to deploy across several ecosystems.
Checklist