forge script --verify
intermittently generates bytecode mismatch
#6780
Labels
C-forge
Command: forge
Cmd-forge-script
Command: forge script
T-bug
Type: bug
T-to-investigate
Type: to investigate
Milestone
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (68c3663 2024-01-11T00:37:40.946762000Z)
What command(s) is the bug in?
forge script --verify
Operating System
macOS (Apple Silicon)
Describe the bug
When trying to deploy and verify a contract, all in 1 command, forge sometimes successfully deploys the contract, but then throws and error when verifying:
The exact command being run was:
to deploy Uniswap's UniversalRouter, using solidity 0.8.17, with
via-ir
enabled. The commit in question is6a9846bfa6f488404b69128afdcc7522fa34496d
.I encountered this issue on all chains that we tried (Arbitrum, Optimism, Sepolia). We additionally tried from another device to deploy the same commit and the same issue occurred.
I then checked out a different commit of the repo (
52be38e407ce07f2e84c7e101673f32e72bd0f09
), and the contract was able to deploy and verify with no issues.The issue is similar in aspects to what people have described in #3507, however the solution that seemed to work for people there was to add
viaIR:true
to the json output, and verify manually on etherscan. When I tried this, it seems forge already now correct setsviaIR
totrue
in the json - so this solution did not fix my issue.The text was updated successfully, but these errors were encountered: