Skip to content

chore: remove additional EOF leftovers #10506

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 0 additions & 9 deletions crates/cli/src/opts/build/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ pub struct BuildOpts {
#[serde(skip_serializing_if = "Option::is_none")]
pub build_info_path: Option<PathBuf>,

/// Whether to compile contracts to EOF bytecode.
#[arg(long)]
#[serde(skip)]
pub eof: bool,

/// Skip building files whose names contain the given filter.
///
/// `test` and `script` are aliases for `.t.sol` and `.s.sol`.
Expand Down Expand Up @@ -282,10 +277,6 @@ impl Provider for BuildOpts {
dict.insert("revert_strings".to_string(), revert.to_string().into());
}

if self.eof {
dict.insert("eof".to_string(), true.into());
}

Ok(Map::from([(Config::selected_profile(), dict)]))
}
}
78 changes: 0 additions & 78 deletions crates/common/fmt/src/eof.rs

This file was deleted.

26 changes: 0 additions & 26 deletions crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,6 @@ pub struct Config {
/// Timeout for transactions in seconds.
pub transaction_timeout: u64,

/// Use EOF-enabled solc for compilation.
pub eof: bool,

/// Warnings gathered when loading the Config. See [`WarningsProvider`] for more information.
#[serde(rename = "__warnings", default, skip_serializing)]
pub warnings: Vec<Warning>,
Expand Down Expand Up @@ -883,8 +880,6 @@ impl Config {
config.libs.sort_unstable();
config.libs.dedup();

config.sanitize_eof_settings();

config
}

Expand All @@ -902,26 +897,6 @@ impl Config {
}
}

/// Adjusts settings if EOF compilation is enabled.
///
/// This includes enabling optimizer, via_ir, eof_version and ensuring that evm_version is not
/// lower than Osaka.
pub fn sanitize_eof_settings(&mut self) {
if self.eof {
self.optimizer = Some(true);
self.normalize_optimizer_settings();

if self.eof_version.is_none() {
self.eof_version = Some(EofVersion::V1);
}

self.via_ir = true;
if self.evm_version < EvmVersion::Osaka {
self.evm_version = EvmVersion::Osaka;
}
}
}

/// Returns the directory in which dependencies should be installed
///
/// Returns the first dir from `libs` that is not `node_modules` or `lib` if `libs` is empty
Expand Down Expand Up @@ -2438,7 +2413,6 @@ impl Default for Config {
transaction_timeout: 120,
additional_compiler_profiles: Default::default(),
compilation_restrictions: Default::default(),
eof: false,
script_execution_protection: true,
_non_exhaustive: (),
}
Expand Down
3 changes: 0 additions & 3 deletions crates/forge/tests/cli/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ forgetest!(can_extract_config_values, |prj, cmd| {
transaction_timeout: 120,
additional_compiler_profiles: Default::default(),
compilation_restrictions: Default::default(),
eof: false,
script_execution_protection: true,
_non_exhaustive: (),
};
Expand Down Expand Up @@ -1040,7 +1039,6 @@ assertions_revert = true
legacy_assertions = false
odyssey = false
transaction_timeout = 120
eof = false
additional_compiler_profiles = []
compilation_restrictions = []
script_execution_protection = true
Expand Down Expand Up @@ -1300,7 +1298,6 @@ exclude = []
"legacy_assertions": false,
"odyssey": false,
"transaction_timeout": 120,
"eof": false,
"additional_compiler_profiles": [],
"compilation_restrictions": [],
"script_execution_protection": true
Expand Down
25 changes: 0 additions & 25 deletions crates/forge/tests/cli/eof.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/forge/tests/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ mod create;
mod debug;
mod doc;
mod eip712;
mod eof;
mod failure_assertions;
mod geiger;
mod inline_config;
Expand Down