-
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 clone
returns wrong evm version
#8356
Comments
hmm, yeah this is slightly problematic. Constantinople was introduced in 0.4.21, which explains why we detect this. this is a bit ambiguous, so not sure how to improve this... |
should we add a mapping version -> default evm version to block-explorers? It should be possible to parse from solc
edit: actually, seems like most of updates are mentioned in changelog: https://raw.githubusercontent.com/ethereum/solidity/develop/Changelog.md (search for "default evm") |
I guess if it's ambiguous, we could also try compile and match the bytecode. but this would be a lot of effort, not sure it's worth it |
Possibly related: #8446 |
forge clone
returns wrong evm versionforge clone
returns wrong evm version
Potentially related: foundry-rs/compilers#189 |
considering there is no practical solution, going to mark as resolved with updated docs PR #8369 Please reopen if disagree. thank you! |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (0dceb53 2024-07-04T00:18:38.827591668Z)
What command(s) is the bug in?
forge clone
Operating System
Linux
Describe the bug
```forge clone` returns the evm version "constantinople" for the USDC contract on mainnet:
forge clone 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
The compiled bytecode does not match the on-chain bytecode. With the correct evm version "byzantium", the bytecode is identical.
The generated foundry.toml from the command above is:
The text was updated successfully, but these errors were encountered: