foundry icon indicating copy to clipboard operation
foundry copied to clipboard

bug: `forge clone` returns wrong evm version

Open stiefn opened this issue 7 months ago • 5 comments

Component

Forge

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

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:

[profile.default]
src = "src"
out = "out"
libs = ["lib"]
auto_detect_remappings = false
chain_id = 1
auto_detect_solc = false
solc_version = "0.4.24"
evm_version = "constantinople"
optimizer = false
optimizer_runs = 200
libraries = []

stiefn avatar Jul 04 '24 14:07 stiefn