Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b849598
chore: upgrade default evm version to shanghai for optimizoors
Evalir Apr 30, 2023
b117e1d
fix: make test runner actually respect evm_version
Evalir Apr 30, 2023
a5a5304
chore: clippy?
Evalir Apr 30, 2023
f803eae
chore: add paris and shanghai to available evm versions but run londo…
Evalir Apr 30, 2023
c6b4ca2
chore: add missing post-merge block properties
Evalir Apr 30, 2023
523c299
chore: poc on checking for shanghai compat per RPC
Evalir Apr 30, 2023
761b6ca
chore: dedupe evm_spec fn
Evalir Apr 30, 2023
0ef28a6
feat: set default test runner config to shanghai
Evalir Apr 30, 2023
caa7b44
Merge branch 'master' into evalir/upgrade_evm_version
Evalir May 1, 2023
0e83345
feat: add prevrandao cheatcode
Evalir May 1, 2023
b724d9c
chore: modify tests to use prevrandao
Evalir May 1, 2023
69a189a
chore: fmt
Evalir May 1, 2023
e15f1c4
chore: test out comp by setting solc 0.8.19
Evalir May 1, 2023
c5b29b8
chore: improve warning message
Evalir May 2, 2023
fd755b4
chore: unpin solidity version, fmt
Evalir May 2, 2023
b4d510b
chore: pin things to ethers default (merge) instead of shanghai
Evalir May 2, 2023
2d0ede3
chore: clippy
Evalir May 2, 2023
4b79837
chore: force forge tests to use at least 0.8.19
Evalir May 2, 2023
cd49c4e
feat: fix fixtures and other test-related compiler errors
Evalir May 2, 2023
256a1d7
chore: add missing semicolons to failed compiler run msg
Evalir May 2, 2023
a082949
chore: fix last complaining test
Evalir May 2, 2023
2534e69
chore: fix remaining tests
Evalir May 2, 2023
39a323f
chore: format warning as yellow, use Chain type instead of raw U256s
Evalir May 2, 2023
fecaf26
chore: correct difficulty for prevrandao
Evalir May 2, 2023
5fb5b2d
chore: make testconfig evm spec nicely configurable
Evalir May 3, 2023
623bcfc
feat: add Shanghai compat test (thanks karmacoma and vex)
Evalir May 3, 2023
e38b91b
chore: make own folder for evm spec tests
Evalir May 3, 2023
5bd9126
chore: move shanghai compat test to its own spec folder
Evalir May 3, 2023
edef79b
chore: remove duplicated function
Evalir May 3, 2023
b17b21c
Apply suggestions from code review
Evalir May 3, 2023
d58ebae
feat: rewrite shanghai support check to be more efficient
Evalir May 3, 2023
87aea94
chore: use any
Evalir May 3, 2023
6cfe5c3
chore: fmt
Evalir May 3, 2023
c846898
chore: show chain IDs that are unsupported
Evalir May 4, 2023
a864839
Merge branch 'master' into evalir/upgrade_evm_version
Evalir May 4, 2023
ad8803f
chore: point out unsupported chain IDs explicitly in message
Evalir May 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 65 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ panic = "abort"
codegen-units = 1

[workspace.dependencies]
ethers = { version = "2", default-features = false }
ethers = { version = "2.0.4", default-features = false }
ethers-addressbook = { version = "2", default-features = false }
ethers-core = { version = "2", default-features = false }
ethers-contract = { version = "2", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,7 @@ impl Backend {
nonce: Some(nonce),
base_fee_per_gas,
other: Default::default(),
..Default::default()
}
}

Expand Down
2 changes: 1 addition & 1 deletion chisel/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl SessionSource {
.with_config(env)
.with_chisel_state(final_pc)
.set_tracing(true)
.with_spec(foundry_cli::utils::evm_spec(&self.config.foundry_config.evm_version))
.with_spec(foundry_evm::utils::evm_spec(&self.config.foundry_config.evm_version))
.with_gas_limit(self.config.evm_opts.gas_limit())
.with_cheatcodes(CheatsConfig::new(&self.config.foundry_config, &self.config.evm_opts))
.build(backend);
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ foundry-utils = { path = "../utils" }
forge = { path = "../forge" }
foundry-config = { path = "../config" }
foundry-common = { path = "../common" }
foundry-evm = { path = "../evm" }
cast = { path = "../cast" }
ui = { path = "../ui" }

Expand Down
6 changes: 3 additions & 3 deletions cli/src/cmd/cast/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use forge::{
utils::h256_to_b256,
};
use foundry_config::{find_project_root_path, Config};
use foundry_evm::utils::evm_spec;
use std::{collections::BTreeMap, str::FromStr};
use tracing::trace;
use ui::{TUIExitReason, Tui, Ui};
Expand Down Expand Up @@ -92,9 +93,8 @@ impl RunArgs {

// configures a bare version of the evm executor: no cheatcode inspector is enabled,
// tracing will be enabled only for the targeted transaction
let builder = ExecutorBuilder::default()
.with_config(env)
.with_spec(crate::utils::evm_spec(&config.evm_version));
let builder =
ExecutorBuilder::default().with_config(env).with_spec(evm_spec(&config.evm_version));

let mut executor = builder.build(db);

Expand Down
5 changes: 3 additions & 2 deletions cli/src/cmd/forge/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
forge::{build::CoreBuildArgs, install, test::FilterArgs},
Cmd, LoadConfig,
},
utils::{self, p_println, STATIC_FUZZ_SEED},
utils::{p_println, STATIC_FUZZ_SEED},
};
use clap::{Parser, ValueEnum};
use ethers::{
Expand All @@ -29,6 +29,7 @@ use forge::{
};
use foundry_common::{compile::ProjectCompiler, evm::EvmArgs, fs};
use foundry_config::Config;
use foundry_evm::utils::evm_spec;
use semver::Version;
use std::{collections::HashMap, sync::mpsc::channel, thread};
use tracing::trace;
Expand Down Expand Up @@ -266,7 +267,7 @@ impl CoverageArgs {
let root = project.paths.root;

// Build the contract runner
let evm_spec = utils::evm_spec(&config.evm_version);
let evm_spec = evm_spec(&config.evm_version);
let env = evm_opts.evm_env_blocking()?;
let mut runner = MultiContractRunnerBuilder::default()
.initial_balance(evm_opts.initial_balance)
Expand Down
Loading