Skip to content
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

Fix the block explorer verification for ProxyFactory #46

Closed
bbenligiray opened this issue Mar 28, 2024 · 2 comments
Closed

Fix the block explorer verification for ProxyFactory #46

bbenligiray opened this issue Mar 28, 2024 · 2 comments

Comments

@bbenligiray
Copy link
Member

They used to work but they didn't work for the 2.1.0 release. Requires investigation.

@bbenligiray bbenligiray changed the title Fix the block explorer verification for proxies Fix the block explorer verification for ProxyFactory Apr 12, 2024
@bbenligiray
Copy link
Member Author

bbenligiray commented Apr 12, 2024

It was actually the ProxyFactory verification that was failing, rather than the proxies themselves. Furthermore, I think it has never worked to begin with.

hardhat-etherscan refers to the bytecode in artifacts/buildInfo/*.json for the compiled bytecode, so it doesn't even submit the respective source code to Etherscan because it can't get a good match with the on-chain bytecode. After applying the metadata replacement switch that I use after hardhat compile, it starts submitting the source code, yet Etherscan responds saying that the source code doesn't match the bytecode (even partially). Based on how hardhat-etherscan normalizes the bytecode, I think the problem is that Etherscan is not smart enough to ignore the metada differences in DapiProxy, DataFeedProxy, DapiProxyWithOev and DataFeedProxyWithOev. As a note, we have a similar situation with the AirseekerRegistry deployed by Api3Market, but that doesn't cause the same issue because we didn't make any changes that will cause AirseekerRegistry metadata mismatch.

The short term solution is to not verify ProxyFactory (so that the following contracts can be verified) f555551

There are two long term solutions:

  • Create a separate branch where ProxyFactory (or rather, the proxies) can be built with the original metadata and verify ProxyFactory there
  • Add a flattened version of the original ProxyFactory to the main branch and use that for verification (I made a brief attempt but couldn't make it work, though it shouldn't be that difficult)

@bbenligiray
Copy link
Member Author

ProxyFactory will be supplanted by a new version soon, so won't fix

@bbenligiray bbenligiray closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant