ape-etherscan icon indicating copy to clipboard operation
ape-etherscan copied to clipboard

fix: viaIR would not verify on etherscan

Open sreyemnayr opened this issue 1 year ago • 0 comments

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)

sreyemnayr avatar Apr 30 '24 17:04 sreyemnayr