From 56ad18de3449c7dfcdc51b3b77e920707a97ffcb Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:23:45 +0100 Subject: [PATCH] chore: fix typos (#6399) * chore: fix typos * more --- crates/anvil/src/eth/api.rs | 2 +- crates/anvil/src/eth/miner.rs | 2 +- crates/anvil/tests/it/fork.rs | 16 ++++++++-------- crates/anvil/tests/it/otterscan.rs | 2 +- crates/binder/src/utils.rs | 2 +- crates/cheatcodes/src/inspector.rs | 2 +- crates/cheatcodes/src/json.rs | 2 +- crates/cheatcodes/src/utils.rs | 2 +- crates/common/src/runtime_client.rs | 2 +- crates/config/src/inline/natspec.rs | 8 ++++---- crates/config/src/providers/remappings.rs | 2 +- crates/doc/src/builder.rs | 2 +- crates/doc/src/preprocessor/mod.rs | 2 +- crates/doc/src/writer/buf_writer.rs | 4 ++-- crates/evm/core/src/backend/fuzz.rs | 4 ++-- crates/evm/core/src/backend/mod.rs | 4 ++-- crates/evm/coverage/src/analysis.rs | 2 +- crates/evm/evm/src/executors/invariant/mod.rs | 2 +- crates/fmt/src/comments.rs | 2 +- crates/fmt/src/formatter.rs | 2 +- crates/fmt/src/solang_ext/ast_eq.rs | 2 +- crates/fmt/testdata/DocComments/fmt.sol | 4 ++-- crates/fmt/testdata/DocComments/original.sol | 4 ++-- .../testdata/DocComments/wrap-comments.fmt.sol | 4 ++-- crates/fmt/testdata/InlineDisable/fmt.sol | 4 ++-- crates/fmt/testdata/InlineDisable/original.sol | 4 ++-- crates/fmt/testdata/UnitExpression/fmt.sol | 4 ++-- crates/fmt/testdata/UnitExpression/original.sol | 4 ++-- crates/forge/bin/cmd/script/receipts.rs | 4 ++-- crates/forge/tests/cli/cmd.rs | 10 +++++----- crates/test-utils/src/util.rs | 2 +- crates/utils/src/lib.rs | 2 +- testdata/cheats/Env.t.sol | 12 ++++++------ testdata/cheats/ExpectCall.t.sol | 4 ++-- testdata/cheats/ExpectRevert.t.sol | 2 +- testdata/cheats/Fork2.t.sol | 2 +- testdata/cheats/RecordAccountAccesses.t.sol | 2 +- testdata/repros/Issue3437.t.sol | 4 ++-- 38 files changed, 70 insertions(+), 70 deletions(-) diff --git a/crates/anvil/src/eth/api.rs b/crates/anvil/src/eth/api.rs index b4093937e86e..71fd8170b22e 100644 --- a/crates/anvil/src/eth/api.rs +++ b/crates/anvil/src/eth/api.rs @@ -1640,7 +1640,7 @@ impl EthApi { Ok(()) } - /// Create a bufer that represents all state on the chain, which can be loaded to separate + /// Create a buffer that represents all state on the chain, which can be loaded to separate /// process by calling `anvil_loadState` /// /// Handler for RPC call: `anvil_dumpState` diff --git a/crates/anvil/src/eth/miner.rs b/crates/anvil/src/eth/miner.rs index 9e859f800188..0c1d1758db21 100644 --- a/crates/anvil/src/eth/miner.rs +++ b/crates/anvil/src/eth/miner.rs @@ -179,7 +179,7 @@ impl Default for FixedBlockTimeMiner { pub struct ReadyTransactionMiner { /// how many transactions to mine per block max_transactions: usize, - /// stores whether there are pending transacions (if known) + /// stores whether there are pending transactions (if known) has_pending_txs: Option, /// Receives hashes of transactions that are ready rx: Fuse>, diff --git a/crates/anvil/tests/it/fork.rs b/crates/anvil/tests/it/fork.rs index a99a7c646606..2258d0341772 100644 --- a/crates/anvil/tests/it/fork.rs +++ b/crates/anvil/tests/it/fork.rs @@ -503,26 +503,26 @@ async fn test_fork_nft_set_approve_all() { let nouns = Erc721::new(nouns_addr, Arc::clone(&provider)); - let real_onwer = nouns.owner_of(token_id).call().await.unwrap(); - assert_eq!(real_onwer, owner); + let real_owner = nouns.owner_of(token_id).call().await.unwrap(); + assert_eq!(real_owner, owner); let approval = nouns.set_approval_for_all(nouns_addr, true); let tx = approval.send().await.unwrap().await.unwrap().unwrap(); assert_eq!(tx.status, Some(1u64.into())); // transfer: impersonate real owner and transfer nft - api.anvil_impersonate_account(real_onwer).await.unwrap(); + api.anvil_impersonate_account(real_owner).await.unwrap(); - api.anvil_set_balance(real_onwer, U256::from(10000e18 as u64)).await.unwrap(); + api.anvil_set_balance(real_owner, U256::from(10000e18 as u64)).await.unwrap(); - let call = nouns.transfer_from(real_onwer, wallet.address(), token_id); + let call = nouns.transfer_from(real_owner, wallet.address(), token_id); let mut tx: TypedTransaction = call.tx; - tx.set_from(real_onwer); + tx.set_from(real_owner); provider.fill_transaction(&mut tx, None).await.unwrap(); let tx = provider.send_transaction(tx, None).await.unwrap().await.unwrap().unwrap(); assert_eq!(tx.status, Some(1u64.into())); - let real_onwer = nouns.owner_of(token_id).call().await.unwrap(); - assert_eq!(real_onwer, wallet.address()); + let real_owner = nouns.owner_of(token_id).call().await.unwrap(); + assert_eq!(real_owner, wallet.address()); } // diff --git a/crates/anvil/tests/it/otterscan.rs b/crates/anvil/tests/it/otterscan.rs index 3c460424ccbf..becbcb852e53 100644 --- a/crates/anvil/tests/it/otterscan.rs +++ b/crates/anvil/tests/it/otterscan.rs @@ -65,7 +65,7 @@ async fn can_call_ots_get_internal_operations_contract_deploy() { } #[tokio::test(flavor = "multi_thread")] -async fn can_call_ots_get_internal_operations_contract_trasfer() { +async fn can_call_ots_get_internal_operations_contract_transfer() { let (api, handle) = spawn(NodeConfig::test()).await; let provider = handle.http_provider(); diff --git a/crates/binder/src/utils.rs b/crates/binder/src/utils.rs index 7667fe26f148..a2186b650a9e 100644 --- a/crates/binder/src/utils.rs +++ b/crates/binder/src/utils.rs @@ -527,7 +527,7 @@ where // // If ssh-agent authentication fails, libgit2 will keep calling this // callback asking for other authentication methods to try. Check - // cred_helper_bad to make sure we only try the git credentail helper + // cred_helper_bad to make sure we only try the git credential helper // once, to avoid looping forever. if allowed.contains(git2::CredentialType::USER_PASS_PLAINTEXT) && cred_helper_bad.is_none() { diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 0e6bb3624c8f..7a5859c5fe91 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -129,7 +129,7 @@ pub struct Cheatcodes { /// Address labels pub labels: HashMap, - /// Rememebered private keys + /// Remembered private keys pub script_wallets: Vec, /// Whether the skip cheatcode was activated diff --git a/crates/cheatcodes/src/json.rs b/crates/cheatcodes/src/json.rs index f401d7903ce1..94f8f9440a28 100644 --- a/crates/cheatcodes/src/json.rs +++ b/crates/cheatcodes/src/json.rs @@ -404,7 +404,7 @@ pub(super) fn value_to_token(value: &Value) -> Result { // to f64. let s = number.to_string(); - // Coerced to scientific notation, so short-ciruit to using fallback. + // Coerced to scientific notation, so short-circuit to using fallback. // This will not have a problem with hex numbers, as for parsing these // We'd need to prefix this with 0x. // See also diff --git a/crates/cheatcodes/src/utils.rs b/crates/cheatcodes/src/utils.rs index 020d465cc3fe..e319cfebc895 100644 --- a/crates/cheatcodes/src/utils.rs +++ b/crates/cheatcodes/src/utils.rs @@ -135,7 +135,7 @@ impl Cheatcode for computeCreate2Address_1Call { } /// Using a given private key, return its public ETH address, its public key affine x and y -/// coodinates, and its private key (see the 'Wallet' struct) +/// coordinates, and its private key (see the 'Wallet' struct) /// /// If 'label' is set to 'Some()', assign that label to the associated ETH address in state fn create_wallet(private_key: &U256, label: Option<&str>, state: &mut Cheatcodes) -> Result { diff --git a/crates/common/src/runtime_client.rs b/crates/common/src/runtime_client.rs index 62d4810dcb90..972ee9029540 100644 --- a/crates/common/src/runtime_client.rs +++ b/crates/common/src/runtime_client.rs @@ -118,7 +118,7 @@ fn build_auth(jwt: String) -> eyre::Result { let auth = JwtAuth::new(secret, None, None); let token = auth.generate_token()?; - // Essentially unrolled ethers-rs new_with_auth to accomodate the custom timeout + // Essentially unrolled ethers-rs new_with_auth to accommodate the custom timeout let auth = Authorization::Bearer(token); Ok(auth) diff --git a/crates/config/src/inline/natspec.rs b/crates/config/src/inline/natspec.rs index 407317d32894..c73cc4492dc7 100644 --- a/crates/config/src/inline/natspec.rs +++ b/crates/config/src/inline/natspec.rs @@ -192,8 +192,8 @@ mod tests { #[test] fn can_handle_unavailable_src_line_with_fallback() { let mut fn_data: BTreeMap = BTreeMap::new(); - let doc_withouth_src_field = json!({ "text": "forge-config:default.fuzz.runs=600" }); - fn_data.insert("documentation".into(), doc_withouth_src_field); + let doc_without_src_field = json!({ "text": "forge-config:default.fuzz.runs=600" }); + fn_data.insert("documentation".into(), doc_without_src_field); let (_, src_line) = get_fn_docs(&fn_data).expect("Some docs"); assert_eq!(src_line, "".to_string()); } @@ -201,9 +201,9 @@ mod tests { #[test] fn can_handle_available_src_line() { let mut fn_data: BTreeMap = BTreeMap::new(); - let doc_withouth_src_field = + let doc_without_src_field = json!({ "text": "forge-config:default.fuzz.runs=600", "src": "73:21:12" }); - fn_data.insert("documentation".into(), doc_withouth_src_field); + fn_data.insert("documentation".into(), doc_without_src_field); let (_, src_line) = get_fn_docs(&fn_data).expect("Some docs"); assert_eq!(src_line, "73:21:12".to_string()); } diff --git a/crates/config/src/providers/remappings.rs b/crates/config/src/providers/remappings.rs index 43048643a822..7d81b568c890 100644 --- a/crates/config/src/providers/remappings.rs +++ b/crates/config/src/providers/remappings.rs @@ -45,7 +45,7 @@ impl Remappings { remappings } - /// Push an element ot the remappings vector, but only if it's not already present. + /// Push an element to the remappings vector, but only if it's not already present. pub fn push(&mut self, remapping: Remapping) { if !self.remappings.iter().any(|existing| { // What we're doing here is filtering for ambiguous paths. For example, if we have diff --git a/crates/doc/src/builder.rs b/crates/doc/src/builder.rs index c4f68d809666..177c45e7c31e 100644 --- a/crates/doc/src/builder.rs +++ b/crates/doc/src/builder.rs @@ -66,7 +66,7 @@ impl DocBuilder { } } - /// Set `shoul_build` flag on the builder + /// Set `should_build` flag on the builder pub fn with_should_build(mut self, should_build: bool) -> Self { self.should_build = should_build; self diff --git a/crates/doc/src/preprocessor/mod.rs b/crates/doc/src/preprocessor/mod.rs index 5874dab54cd1..40cb7843cb66 100644 --- a/crates/doc/src/preprocessor/mod.rs +++ b/crates/doc/src/preprocessor/mod.rs @@ -20,7 +20,7 @@ pub use deployments::{Deployment, Deployments, DEPLOYMENTS_ID}; pub struct PreprocessorId(&'static str); /// Preprocessor output. -/// Wraps all exisiting preprocessor outputs +/// Wraps all existing preprocessor outputs /// in a single abstraction. #[derive(Debug, Clone)] pub enum PreprocessorOutput { diff --git a/crates/doc/src/writer/buf_writer.rs b/crates/doc/src/writer/buf_writer.rs index af9a3b80e5ba..3c1728b840ba 100644 --- a/crates/doc/src/writer/buf_writer.rs +++ b/crates/doc/src/writer/buf_writer.rs @@ -80,7 +80,7 @@ impl BufWriter { writeln!(self.buf, "{}", Markdown::Italic(text)) } - /// Writes bold text to the bufffer formatted as [Markdown::Bold]. + /// Writes bold text to the buffer formatted as [Markdown::Bold]. pub fn write_bold(&mut self, text: &str) -> fmt::Result { writeln!(self.buf, "{}", Markdown::Bold(text)) } @@ -90,7 +90,7 @@ impl BufWriter { writeln!(self.buf, "{}", Markdown::Link(name, path)) } - /// Writes a list item to the bufffer indented by specified depth. + /// Writes a list item to the buffer indented by specified depth. pub fn write_list_item(&mut self, item: &str, depth: usize) -> fmt::Result { let indent = " ".repeat(depth * 2); writeln!(self.buf, "{indent}- {item}") diff --git a/crates/evm/core/src/backend/fuzz.rs b/crates/evm/core/src/backend/fuzz.rs index 7fa3de4b2546..ac15212b2744 100644 --- a/crates/evm/core/src/backend/fuzz.rs +++ b/crates/evm/core/src/backend/fuzz.rs @@ -37,9 +37,9 @@ pub struct FuzzBackendWrapper<'a> { /// /// No calls on the `FuzzBackendWrapper` will ever persistently modify the `backend`'s state. pub backend: Cow<'a, Backend>, - /// Keeps track of whether the backed is already intialized + /// Keeps track of whether the backed is already initialized is_initialized: bool, - /// Keeps track of wheter there was a snapshot failure. + /// Keeps track of whether there was a snapshot failure. /// /// Necessary as the backend is dropped after usage, but we'll need to persist /// the snapshot failure anyhow. diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 4e756af98268..1600f0e6484e 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -779,8 +779,8 @@ impl Backend { self.inner.precompiles().contains(addr) } - /// Ths will clean up already loaded accounts that would be initialized without the correct data - /// from the fork + /// Cleans up already loaded accounts that would be initialized without the correct data from + /// the fork. /// /// It can happen that an account is loaded before the first fork is selected, like /// `getNonce(addr)`, which will load an empty account by default. diff --git a/crates/evm/coverage/src/analysis.rs b/crates/evm/coverage/src/analysis.rs index a28dc6ea77db..8928f44770c1 100644 --- a/crates/evm/coverage/src/analysis.rs +++ b/crates/evm/coverage/src/analysis.rs @@ -528,7 +528,7 @@ impl SourceAnalyzer { // // The missing contracts are: // 1. libraries used in ancestors of this contracts - // 2. libraries used in libaries (i.e libs indirectly used by this contract) + // 2. libraries used in libraries (i.e libs indirectly used by this contract) // // We want to find out all the above contracts and libraries related to this contract. diff --git a/crates/evm/evm/src/executors/invariant/mod.rs b/crates/evm/evm/src/executors/invariant/mod.rs index 81ea0e669e6b..fa56c97c4dc9 100644 --- a/crates/evm/evm/src/executors/invariant/mod.rs +++ b/crates/evm/evm/src/executors/invariant/mod.rs @@ -749,7 +749,7 @@ fn can_continue( } else { // Increase the amount of reverts. failures.reverts += 1; - // If fail on revert is set, we must return inmediately. + // If fail on revert is set, we must return immediately. if fail_on_revert { let error = InvariantFuzzError::new( invariant_contract, diff --git a/crates/fmt/src/comments.rs b/crates/fmt/src/comments.rs index a76c64ffc53a..f0316aa2b9c9 100644 --- a/crates/fmt/src/comments.rs +++ b/crates/fmt/src/comments.rs @@ -230,7 +230,7 @@ impl Comments { Self { prefixes, postfixes } } - /// Heloer for removing comments before a byte offset + /// Helper for removing comments before a byte offset fn remove_comments_before( comments: &mut VecDeque, byte: usize, diff --git a/crates/fmt/src/formatter.rs b/crates/fmt/src/formatter.rs index 95dba14d4996..467fa72bff2b 100644 --- a/crates/fmt/src/formatter.rs +++ b/crates/fmt/src/formatter.rs @@ -1071,7 +1071,7 @@ impl<'a, W: Write> Formatter<'a, W> { /// Visit the right side of an assignment. The function will try to write the assignment on a /// single line or indented on the next line. If it can't do this it resorts to letting the - /// expression decide how to split iself on multiple lines + /// expression decide how to split itself on multiple lines fn visit_assignment(&mut self, expr: &mut Expression) -> Result<()> { if self.try_on_single_line(|fmt| expr.visit(fmt))? { return Ok(()) diff --git a/crates/fmt/src/solang_ext/ast_eq.rs b/crates/fmt/src/solang_ext/ast_eq.rs index 9990618df565..f29a7cc02683 100644 --- a/crates/fmt/src/solang_ext/ast_eq.rs +++ b/crates/fmt/src/solang_ext/ast_eq.rs @@ -311,7 +311,7 @@ impl AstEq for Statement { While(loc, expr, stmt1), DoWhile(loc, stmt1, expr), For(loc, stmt1, expr, stmt2, stmt3), - Try(loc, expr, params, claus), + Try(loc, expr, params, clause), Error(loc) _ Block { diff --git a/crates/fmt/testdata/DocComments/fmt.sol b/crates/fmt/testdata/DocComments/fmt.sol index a002e6c2364f..4248f0fe587d 100644 --- a/crates/fmt/testdata/DocComments/fmt.sol +++ b/crates/fmt/testdata/DocComments/fmt.sol @@ -49,7 +49,7 @@ contract HelloWorld { /// A long doc line comment that will be wrapped function docLineOverflow() external {} - function docLinePostfixOveflow() external {} + function docLinePostfixOverflow() external {} /// A long doc line comment that will be wrapped @@ -87,7 +87,7 @@ contract HelloWorld { * } * } */ - function malformedIndentOveflow() external {} + function malformedIndentOverflow() external {} } /** diff --git a/crates/fmt/testdata/DocComments/original.sol b/crates/fmt/testdata/DocComments/original.sol index dff602236c24..28f654b57903 100644 --- a/crates/fmt/testdata/DocComments/original.sol +++ b/crates/fmt/testdata/DocComments/original.sol @@ -46,7 +46,7 @@ contract HelloWorld { /// A long doc line comment that will be wrapped function docLineOverflow() external {} - function docLinePostfixOveflow() external {} /// A long doc line comment that will be wrapped + function docLinePostfixOverflow() external {} /// A long doc line comment that will be wrapped /** * @notice Here is my comment @@ -82,7 +82,7 @@ function withALongNameThatWillCauseCommentWrap() public { } } */ - function malformedIndentOveflow() external {} + function malformedIndentOverflow() external {} } /** diff --git a/crates/fmt/testdata/DocComments/wrap-comments.fmt.sol b/crates/fmt/testdata/DocComments/wrap-comments.fmt.sol index 6d7f3c584ce4..c3c7fe00c918 100644 --- a/crates/fmt/testdata/DocComments/wrap-comments.fmt.sol +++ b/crates/fmt/testdata/DocComments/wrap-comments.fmt.sol @@ -64,7 +64,7 @@ contract HelloWorld { external {} - function docLinePostfixOveflow() + function docLinePostfixOverflow() external {} @@ -113,7 +113,7 @@ contract HelloWorld { * } * } */ - function malformedIndentOveflow() + function malformedIndentOverflow() external {} } diff --git a/crates/fmt/testdata/InlineDisable/fmt.sol b/crates/fmt/testdata/InlineDisable/fmt.sol index 03979bc18893..31667c5e99a4 100644 --- a/crates/fmt/testdata/InlineDisable/fmt.sol +++ b/crates/fmt/testdata/InlineDisable/fmt.sol @@ -406,9 +406,9 @@ function testUnit() { value = 1 gwei; value = 1 ether; - uint256 someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue; + uint256 someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue; - value = someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 + value = someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 value = 1 // comment3 // comment4 diff --git a/crates/fmt/testdata/InlineDisable/original.sol b/crates/fmt/testdata/InlineDisable/original.sol index 617da7719c2c..83d4ee172b00 100644 --- a/crates/fmt/testdata/InlineDisable/original.sol +++ b/crates/fmt/testdata/InlineDisable/original.sol @@ -387,9 +387,9 @@ function testUnit() { value = 1 gwei; value = 1 ether; - uint256 someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue; + uint256 someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue; - value = someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 + value = someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 value = 1 // comment3 // comment4 diff --git a/crates/fmt/testdata/UnitExpression/fmt.sol b/crates/fmt/testdata/UnitExpression/fmt.sol index 2d616ee6e07a..ceb16c86c781 100644 --- a/crates/fmt/testdata/UnitExpression/fmt.sol +++ b/crates/fmt/testdata/UnitExpression/fmt.sol @@ -12,9 +12,9 @@ contract UnitExpression { value = 1 gwei; value = 1 ether; - uint256 someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue; + uint256 someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue; - value = someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue + value = someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 value = 1 // comment3 diff --git a/crates/fmt/testdata/UnitExpression/original.sol b/crates/fmt/testdata/UnitExpression/original.sol index b48a1d49fc6a..f85af34fe777 100644 --- a/crates/fmt/testdata/UnitExpression/original.sol +++ b/crates/fmt/testdata/UnitExpression/original.sol @@ -12,9 +12,9 @@ contract UnitExpression { value = 1 gwei; value = 1 ether; - uint256 someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue; + uint256 someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue; - value = someVeryVeryVeryLongVaribleNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 + value = someVeryVeryVeryLongVariableNameForTheMultiplierForEtherValue * 1 /* comment1 */ ether; // comment2 value = 1 // comment3 // comment4 diff --git a/crates/forge/bin/cmd/script/receipts.rs b/crates/forge/bin/cmd/script/receipts.rs index 638e92f91f86..79565996587f 100644 --- a/crates/forge/bin/cmd/script/receipts.rs +++ b/crates/forge/bin/cmd/script/receipts.rs @@ -41,7 +41,7 @@ pub async fn wait_for_pending( } /// Traverses a set of pendings and either finds receipts, or clears them from -/// the deployment sequnce. +/// the deployment sequence. /// /// If no `tx_hashes` are provided, then `deployment_sequence.pending` will be /// used. For each `tx_hash`, we check if it has confirmed. If it has @@ -111,7 +111,7 @@ pub async fn clear_pendings( deployment_sequence.add_receipt(receipt); } - // print any erros + // print any errors if !errors.is_empty() { let mut error_msg = errors.join("\n"); if !deployment_sequence.pending.is_empty() { diff --git a/crates/forge/tests/cli/cmd.rs b/crates/forge/tests/cli/cmd.rs index a9eee34f3a52..8eafecce5845 100644 --- a/crates/forge/tests/cli/cmd.rs +++ b/crates/forge/tests/cli/cmd.rs @@ -1401,9 +1401,9 @@ contract ContractThreeTest is DSTest { }); forgetest_init!(can_use_absolute_imports, |prj, cmd| { - let remapping = prj.paths().libraries[0].join("myDepdendency"); + let remapping = prj.paths().libraries[0].join("myDependency"); let config = Config { - remappings: vec![Remapping::from_str(&format!("myDepdendency/={}", remapping.display())) + remappings: vec![Remapping::from_str(&format!("myDependency/={}", remapping.display())) .unwrap() .into()], ..Default::default() @@ -1411,7 +1411,7 @@ forgetest_init!(can_use_absolute_imports, |prj, cmd| { prj.write_config(config); prj.add_lib( - "myDepdendency/src/interfaces/IConfig.sol", + "myDependency/src/interfaces/IConfig.sol", r" interface IConfig {} @@ -1420,7 +1420,7 @@ forgetest_init!(can_use_absolute_imports, |prj, cmd| { .unwrap(); prj.add_lib( - "myDepdendency/src/Config.sol", + "myDependency/src/Config.sol", r#" import "src/interfaces/IConfig.sol"; @@ -1432,7 +1432,7 @@ forgetest_init!(can_use_absolute_imports, |prj, cmd| { prj.add_source( "Greeter", r#" - import "myDepdendency/src/Config.sol"; + import "myDependency/src/Config.sol"; contract Greeter {} "#, diff --git a/crates/test-utils/src/util.rs b/crates/test-utils/src/util.rs index 10a6db9fdddb..6a879378acdf 100644 --- a/crates/test-utils/src/util.rs +++ b/crates/test-utils/src/util.rs @@ -225,7 +225,7 @@ pub fn setup_forge_remote(prj: impl Into) -> (TestProject, TestCo try_setup_forge_remote(prj).unwrap() } -/// Same as `setup_forge_remote` but not panicing +/// Same as `setup_forge_remote` but not panicking pub fn try_setup_forge_remote( config: impl Into, ) -> Result<(TestProject, TestCommand)> { diff --git a/crates/utils/src/lib.rs b/crates/utils/src/lib.rs index d795d667dd03..92c58ebbacaf 100644 --- a/crates/utils/src/lib.rs +++ b/crates/utils/src/lib.rs @@ -286,7 +286,7 @@ fn recurse_link<'a>( // libraries we have already deployed during the linking process. // the key is `file:contract` and the value is the address we computed internally_deployed_libraries: &'a mut HashMap, - // deployed library addresses fname => adddress + // deployed library addresses fname => address deployed_library_addresses: &'a Libraries, // nonce to start at nonce: &mut u64, diff --git a/testdata/cheats/Env.t.sol b/testdata/cheats/Env.t.sol index 179f2c2998e3..ae6c89ec9856 100644 --- a/testdata/cheats/Env.t.sol +++ b/testdata/cheats/Env.t.sol @@ -968,8 +968,8 @@ contract EnvTest is DSTest { } } - function testEnvWithDefaulBytesEmptyArrKey() public { - string memory key = "_foundryCheatcodeEnvWithDefaulBytesEmptyArrTestKey"; + function testEnvWithDefaultBytesEmptyArrKey() public { + string memory key = "_foundryCheatcodeEnvWithDefaultBytesEmptyArrTestKey"; string memory value = ""; bytes[] memory expected = new bytes[](0); bytes[] memory defaultValues = new bytes[](0); @@ -980,13 +980,13 @@ contract EnvTest is DSTest { for (uint256 i = 0; i < expected.length; ++i) { require( keccak256(abi.encodePacked((output[i]))) == keccak256(abi.encodePacked((expected[i]))), - "envWithDefaulBytesEmptyArrKey failed" + "envWithDefaultBytesEmptyArrKey failed" ); } } - function testEnvWithDefaulBytesEmptyArrDefault() public { - string memory key = "_foundryCheatcodeEnvWithDefaulBytesEmptyArrTestDefault"; + function testEnvWithDefaultBytesEmptyArrDefault() public { + string memory key = "_foundryCheatcodeEnvWithDefaultBytesEmptyArrTestDefault"; string memory value = ""; bytes[] memory expected = new bytes[](0); bytes[] memory defaultValues = new bytes[](0); @@ -996,7 +996,7 @@ contract EnvTest is DSTest { for (uint256 i = 0; i < expected.length; ++i) { require( keccak256(abi.encodePacked((output[i]))) == keccak256(abi.encodePacked((expected[i]))), - "envWithDefaulBytesEmptyArrDefault failed" + "envWithDefaultBytesEmptyArrDefault failed" ); } } diff --git a/testdata/cheats/ExpectCall.t.sol b/testdata/cheats/ExpectCall.t.sol index 2fb33d91fcaa..3cc9e6c573c0 100644 --- a/testdata/cheats/ExpectCall.t.sol +++ b/testdata/cheats/ExpectCall.t.sol @@ -451,7 +451,7 @@ contract ExpectCallMixedTest is DSTest { function testExpectMatchPartialAndFull() public { Contract target = new Contract(); vm.expectCall(address(target), abi.encodeWithSelector(target.add.selector), 2); - // Even if a partial match is speciifed, you should still be able to look for full matches + // Even if a partial match is specified, you should still be able to look for full matches // as one does not override the other. vm.expectCall(address(target), abi.encodeWithSelector(target.add.selector, 1, 2)); this.exposed_expectMatchPartialAndFull(target); @@ -465,7 +465,7 @@ contract ExpectCallMixedTest is DSTest { function testExpectMatchPartialAndFullFlipped() public { Contract target = new Contract(); vm.expectCall(address(target), abi.encodeWithSelector(target.add.selector)); - // Even if a partial match is speciifed, you should still be able to look for full matches + // Even if a partial match is specified, you should still be able to look for full matches // as one does not override the other. vm.expectCall(address(target), abi.encodeWithSelector(target.add.selector, 1, 2), 2); this.exposed_expectMatchPartialAndFullFlipped(target); diff --git a/testdata/cheats/ExpectRevert.t.sol b/testdata/cheats/ExpectRevert.t.sol index 9fdeb2fef9d4..b2179a25db98 100644 --- a/testdata/cheats/ExpectRevert.t.sol +++ b/testdata/cheats/ExpectRevert.t.sol @@ -89,7 +89,7 @@ contract ExpectRevertTest is DSTest { function testFailRevertNotOnImmediateNextCall() public { Reverter reverter = new Reverter(); // expectRevert should only work for the next call. However, - // we do not inmediately revert, so, + // we do not immediately revert, so, // we fail. vm.expectRevert("revert"); reverter.doNotRevert(); diff --git a/testdata/cheats/Fork2.t.sol b/testdata/cheats/Fork2.t.sol index c4cab03b880c..382cb1b91596 100644 --- a/testdata/cheats/Fork2.t.sol +++ b/testdata/cheats/Fork2.t.sol @@ -62,7 +62,7 @@ contract ForkTest is DSTest { } // ensures forks have different block hashes - function testBlockNumbersMimatch() public { + function testBlockNumbersMismatch() public { vm.selectFork(mainnetFork); uint256 num = block.number; bytes32 mainHash = blockhash(block.number - 1); diff --git a/testdata/cheats/RecordAccountAccesses.t.sol b/testdata/cheats/RecordAccountAccesses.t.sol index 60652c130ed0..9f818e8eed8f 100644 --- a/testdata/cheats/RecordAccountAccesses.t.sol +++ b/testdata/cheats/RecordAccountAccesses.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.18; import "ds-test/test.sol"; import "./Vm.sol"; -/// @notice Helper contract with a constructo that makes a call to itself then +/// @notice Helper contract with a construction that makes a call to itself then /// optionally reverts if zero-length data is passed contract SelfCaller { constructor(bytes memory) payable { diff --git a/testdata/repros/Issue3437.t.sol b/testdata/repros/Issue3437.t.sol index 4174bea20888..acd02ada7421 100644 --- a/testdata/repros/Issue3437.t.sol +++ b/testdata/repros/Issue3437.t.sol @@ -8,12 +8,12 @@ import "../cheats/Vm.sol"; contract Issue3347Test is DSTest { Vm constant vm = Vm(HEVM_ADDRESS); - function rever() internal { + function internalRevert() internal { revert(); } function testFailExample() public { vm.expectRevert(); - rever(); + internalRevert(); } }