-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(forge verify-contract
): Unable to verify on explorer or sourcify while flattening works
#8470
Comments
Hi @duncancmt, would you mind retrying it with I can confirm that the generated Sourcify fails with a compiler build error complaining that files are not found. Considering the contract was dynamically created in the constructor it may be a bug in Etherscan, see related: #6023 |
I'll give that a shot with our next deployment. Should be later this week.
Ahh, it's actually not deployed from the constructor of another contract. It's a bit convoluted (you can see the exact mechanism in
so I don't think that #6023 is directly applicable. Especially since it would be odd for Etherscan and Sourcify to have the same issue, but not complain about a different contract deployed in the same way from the same source file. |
We did a deployment using flattened source to 0x1a3b48EA0C6e9A52511A196A287fa8371e5Ee7a0 and 0x607798c55Fb37e842b8fa92a148cd51dBA8BB22F on Optimism. It worked fine. I'm not sure where that puts us with this issue. Obviously I can continue to use flattened source to workaround this issue, but the actual underlying problem isn't addressed |
forge verify-contract
): Unable to verify on explorer or sourcify while flattening works
Hi @duncancmt There have been quite a few improvements to the verification flow recently, would you Thanks! |
@duncancmt going to optimistically close the ticket per comment above, please reopen if still a problem. thank you! |
Yeah, thanks. We'll be doing another deploy in the coming weeks (after UniswapV4 launches). If it's still a problem, I'll open a new ticket |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (f625d0f 2024-04-02T00:15:52.692780824Z)
What command(s) is the bug in?
forge verify-contract
Operating System
Linux
Describe the bug
TL;DR:
OptimismSettler
andArbitrumSettler
from 0xProject/0x-settler@ecd28b3 won't verify on their respective explorers or on Sourcify.I apologize that I don't have a more minimal repro. I tried comparing successfully-verified contracts (e.g.
LineaSettler
) against the unsuccessfully-verified contracts and can't find anything that stands out.I can't for the life of me get this contract to verify and I'm really at a loss about what specifically it is that's stopping it from being verified. I would workaround with
forge flatten
, but since the fix for #7554 hasn't landed yet, I can't try that. I'm reporting this as a bug due to 2 interesting observations:I put an older version of
forge
above, but I can also replicate this withforge 0.2.0 (f625d0f 2024-04-02T00:15:52.692780824Z)
. The version above is the one that I've pinned due to previous issues with contract verification, but now I've run in to an issue that I can't workaround.If you try this again with Arbitrum instead of Optimism, Arbiscan outright refuses verification because it doesn't like the Cancun hardfork. Sourcify still fails with a similar error message.
The other contract that is compiled from the same source file is
OptimismSettlerMetaTxn
(ArbitrumSettlerMetaTxn
) and its deployed address can be found by querying the same registry contract but withtokenId
3 instead of 2. (0x4DA7632F394F574576255A59b026841a700F0617
on Optimism)Thanks a lot for taking a look!
The text was updated successfully, but these errors were encountered: