ape-etherscan
ape-etherscan copied to clipboard
fix: viaIR would not verify on etherscan
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)
- [ ] 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)