Skip to content
Merged
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
66 changes: 33 additions & 33 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 @@ -29,7 +29,7 @@ members = [
resolver = "2"

[workspace.package]
version = "1.3.1"
version = "1.3.2"
edition = "2024"
# Remember to update clippy.toml as well
rust-version = "1.88"
Expand Down
3 changes: 3 additions & 0 deletions crates/cheatcodes/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{
};
use alloy_consensus::TxEnvelope;
use alloy_genesis::{Genesis, GenesisAccount};
use alloy_network::eip2718::EIP4844_TX_TYPE_ID;
use alloy_primitives::{Address, B256, Bytes, U256, map::HashMap};
use alloy_rlp::Decodable;
use alloy_sol_types::SolValue;
Expand Down Expand Up @@ -437,6 +438,8 @@ impl Cheatcode for blobhashesCall {
see EIP-4844: https://eips.ethereum.org/EIPS/eip-4844"
);
ccx.ecx.tx.blob_hashes.clone_from(hashes);
// force this as 4844 txtype
ccx.ecx.tx.tx_type = EIP4844_TX_TYPE_ID;
Ok(Default::default())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl ContractsByArtifact {
pub fn find_abi_by_name_or_src_path(&self, name_or_path: &str) -> Option<(JsonAbi, String)> {
self.iter()
.find(|(artifact, _)| {
artifact.name == name_or_path || artifact.source == PathBuf::from(name_or_path)
artifact.name == name_or_path || artifact.source == Path::new(name_or_path)
})
.map(|(_, contract)| (contract.abi.clone(), contract.name.clone()))
}
Expand Down
2 changes: 2 additions & 0 deletions crates/evm/core/src/fork/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,7 @@ pub fn configure_env(chain_id: u64, memory_limit: u64, disable_block_gas_limit:
cfg.disable_eip3607 = true;
cfg.disable_block_gas_limit = disable_block_gas_limit;
cfg.disable_nonce_check = true;
// For Osaka EIP-7825
cfg.tx_gas_limit_cap = Some(u64::MAX);
cfg
}
14 changes: 12 additions & 2 deletions crates/evm/traces/src/identifier/etherscan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,19 @@ impl EtherscanIdentifier {
if config.offline {
return Ok(None);
}
let Some(config) = config.get_etherscan_config_with_chain(chain)? else {
return Ok(None);

let config = match config.get_etherscan_config_with_chain(chain) {
Ok(Some(config)) => config,
Ok(None) => {
warn!(target: "traces::etherscan", "etherscan config not found");
return Ok(None);
}
Err(err) => {
warn!(?err, "failed to get etherscan config");
return Ok(None);
}
};

trace!(target: "traces::etherscan", chain=?config.chain, url=?config.api_url, "using etherscan identifier");
Ok(Some(Self {
client: Arc::new(config.into_client()?),
Expand Down
17 changes: 11 additions & 6 deletions crates/forge/src/cmd/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{install, watch::WatchArgs};
use clap::Parser;
use eyre::Result;
use eyre::{Result, eyre};
use forge_lint::{linter::Linter, sol::SolidityLinter};
use foundry_cli::{
opts::{BuildOpts, solar_pcx_from_build_opts},
Expand Down Expand Up @@ -112,17 +112,18 @@ impl BuildArgs {
sh_println!("{}", serde_json::to_string_pretty(&output.output())?)?;
}

// Only run the `SolidityLinter` if there are no compilation errors
if output.output().errors.iter().all(|e| !e.is_error()) {
self.lint(&project, &config)?;
// Only run the `SolidityLinter` if lint on build and no compilation errors.
if config.lint.lint_on_build && !output.output().errors.iter().any(|e| e.is_error()) {
self.lint(&project, &config, self.paths.as_deref())
.map_err(|err| eyre!("Lint failed: {err}"))?;
}

Ok(output)
}

fn lint(&self, project: &Project, config: &Config) -> Result<()> {
fn lint(&self, project: &Project, config: &Config, files: Option<&[PathBuf]>) -> Result<()> {
let format_json = shell::is_json();
if project.compiler.solc.is_some() && config.lint.lint_on_build && !shell::is_quiet() {
if project.compiler.solc.is_some() && !shell::is_quiet() {
let linter = SolidityLinter::new(config.project_paths())
.with_json_emitter(format_json)
.with_description(!format_json)
Expand Down Expand Up @@ -156,6 +157,10 @@ impl BuildArgs {
.project_paths::<SolcLanguage>()
.input_files_iter()
.filter(|p| {
// Lint only specified build files, if any.
if let Some(files) = files {
return files.iter().any(|file| &curr_dir.join(file) == p);
}
skip.is_match(p)
&& !(ignored.contains(p) || ignored.contains(&curr_dir.join(p)))
})
Expand Down
Loading
Loading