diff --git a/crates/cast/src/cmd/wallet/vanity.rs b/crates/cast/src/cmd/wallet/vanity.rs index 0424b28531c79..a0a58c3cd7851 100644 --- a/crates/cast/src/cmd/wallet/vanity.rs +++ b/crates/cast/src/cmd/wallet/vanity.rs @@ -193,15 +193,16 @@ pub fn find_vanity_address_with_nonce( wallet_generator().find_any(create_nonce_matcher(matcher, nonce)).map(|(key, _)| key.into()) } -/// Creates a nonce matcher function, which takes a reference to a [GeneratedWallet] and returns +/// Creates a matcher function, which takes a reference to a [GeneratedWallet] and returns /// whether it found a match or not by using `matcher`. #[inline] pub fn create_matcher(matcher: T) -> impl Fn(&GeneratedWallet) -> bool { move |(_, addr)| matcher.is_match(addr) } -/// Creates a nonce matcher function, which takes a reference to a [GeneratedWallet] and a nonce and -/// returns whether it found a match or not by using `matcher`. +/// Creates a contract address matcher function that uses the specified nonce. +/// The returned function takes a reference to a [GeneratedWallet] and returns +/// whether the contract address created with the nonce matches using `matcher`. #[inline] pub fn create_nonce_matcher( matcher: T, diff --git a/crates/common/src/provider/mod.rs b/crates/common/src/provider/mod.rs index b74904556241f..a551138ebaf91 100644 --- a/crates/common/src/provider/mod.rs +++ b/crates/common/src/provider/mod.rs @@ -328,6 +328,9 @@ impl ProviderBuilder { client.set_poll_interval( chain .average_blocktime_hint() + // we cap the poll interval because if not provided, chain would default to + // mainnet + .map(|hint| hint.min(DEFAULT_UNKNOWN_CHAIN_BLOCK_TIME)) .unwrap_or(DEFAULT_UNKNOWN_CHAIN_BLOCK_TIME) .mul_f32(POLL_INTERVAL_BLOCK_TIME_SCALE_FACTOR), ); diff --git a/crates/forge/tests/cli/cmd.rs b/crates/forge/tests/cli/cmd.rs index a7f88567580a5..bc004c45fa6c1 100644 --- a/crates/forge/tests/cli/cmd.rs +++ b/crates/forge/tests/cli/cmd.rs @@ -1114,7 +1114,7 @@ Ran 1 test suite [ELAPSED]: 1 tests passed, 0 failed, 0 skipped (1 total tests) // test that `forge build` does not print `(with warnings)` if file path is ignored forgetest!(can_compile_without_warnings_ignored_file_paths, |prj, cmd| { - // Ignoring path and setting empty error_codes as default would set would set some error codes + // Ignoring path and setting empty error_codes as default would set some error codes prj.update_config(|config| { config.ignored_file_paths = vec![Path::new("src").to_path_buf()]; config.ignored_error_codes = vec![]; diff --git a/crates/script/src/build.rs b/crates/script/src/build.rs index 9c3379dca8783..9ee4403923e06 100644 --- a/crates/script/src/build.rs +++ b/crates/script/src/build.rs @@ -193,7 +193,7 @@ impl PreprocessedState { let mut target_id: Option = None; - // Find target artfifact id by name and path in compilation artifacts. + // Find target artifact id by name and path in compilation artifacts. for (id, contract) in output.artifact_ids().filter(|(id, _)| id.source == target_path) { if let Some(name) = &target_name { if id.name != *name { diff --git a/crates/script/src/verify.rs b/crates/script/src/verify.rs index 76ab6b4bc3917..45a8d62344aa2 100644 --- a/crates/script/src/verify.rs +++ b/crates/script/src/verify.rs @@ -131,7 +131,7 @@ impl VerifyBundle { .to_string(), }; - // We strip the build metadadata information, since it can lead to + // We strip the build metadata information, since it can lead to // etherscan not identifying it correctly. eg: // `v0.8.10+commit.fc410830.Linux.gcc` != `v0.8.10+commit.fc410830` let version = Version::new( diff --git a/crates/sol-macro-gen/src/sol_macro_gen.rs b/crates/sol-macro-gen/src/sol_macro_gen.rs index b038fd5cf043a..5ca6787f88495 100644 --- a/crates/sol-macro-gen/src/sol_macro_gen.rs +++ b/crates/sol-macro-gen/src/sol_macro_gen.rs @@ -60,7 +60,7 @@ impl MultiSolMacroGen { pub fn populate_expansion(&mut self, bindings_path: &Path) -> Result<()> { for instance in &mut self.instances { - let path = bindings_path.join(format!("{}.rs", instance.name.to_lowercase())); + let path = bindings_path.join(format!("{}.rs", instance.name.to_snake_case())); let expansion = fs::read_to_string(path).wrap_err("Failed to read file")?; let tokens = TokenStream::from_str(&expansion) diff --git a/crates/wallets/src/wallet.rs b/crates/wallets/src/wallet.rs index 4c236a403702a..b8474e15930d8 100644 --- a/crates/wallets/src/wallet.rs +++ b/crates/wallets/src/wallet.rs @@ -111,7 +111,7 @@ impl WalletOpts { let key_name = get_env("GCP_NAME")?; let key_version = get_env("GCP_KEY_VERSION")? .parse() - .map_err(|_| eyre::eyre!("GCP_KEY_VERSION could not be be parsed into u64"))?; + .map_err(|_| eyre::eyre!("GCP_KEY_VERSION could not be parsed into u64"))?; WalletSigner::from_gcp(project_id, location, keyring, key_name, key_version).await? } else if let Some(raw_wallet) = self.raw.signer()? { raw_wallet