From 019890c77e81024347e507d54880f8d8101df441 Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Tue, 11 Nov 2025 20:21:47 +0200 Subject: [PATCH 1/5] fix(cli): clarify remove_contract docs --- crates/cli/src/utils/cmd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/utils/cmd.rs b/crates/cli/src/utils/cmd.rs index ab61f0f6cc498..5713f61bcb912 100644 --- a/crates/cli/src/utils/cmd.rs +++ b/crates/cli/src/utils/cmd.rs @@ -22,8 +22,8 @@ use std::{ }; use yansi::Paint; -/// Given a `Project`'s output, removes the matching ABI, Bytecode and -/// Runtime Bytecode of the given contract. +/// Given a `Project`'s output, finds the contract by path and name and returns its +/// ABI, creation bytecode, and `ArtifactId`. #[track_caller] pub fn remove_contract( output: ProjectCompileOutput, From 44bd57486043660cc96303b7127610a97fa87fe0 Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Tue, 11 Nov 2025 20:22:57 +0200 Subject: [PATCH 2/5] Fix doc comment for Git::has_submodules to match behavior --- crates/cli/src/utils/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli/src/utils/mod.rs b/crates/cli/src/utils/mod.rs index 942fe6ae805b9..78e0f87d93e5d 100644 --- a/crates/cli/src/utils/mod.rs +++ b/crates/cli/src/utils/mod.rs @@ -630,7 +630,7 @@ ignore them in the `.gitignore` file." .map(|stdout| stdout.lines().any(|line| line.starts_with('-'))) } - /// Returns true if the given path has no submodules by checking `git submodule status` + /// Returns true if the given path has submodules by checking `git submodule status` pub fn has_submodules(self, paths: I) -> Result where I: IntoIterator, From 8695aad6d78f49fcf8ac74a6529660936aceeef7 Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Thu, 13 Nov 2025 17:01:21 +0200 Subject: [PATCH 3/5] rename function --- crates/cli/src/utils/cmd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli/src/utils/cmd.rs b/crates/cli/src/utils/cmd.rs index 5713f61bcb912..b8b7bf37d1c07 100644 --- a/crates/cli/src/utils/cmd.rs +++ b/crates/cli/src/utils/cmd.rs @@ -25,7 +25,7 @@ use yansi::Paint; /// Given a `Project`'s output, finds the contract by path and name and returns its /// ABI, creation bytecode, and `ArtifactId`. #[track_caller] -pub fn remove_contract( +pub fn find_contract_artifacts( output: ProjectCompileOutput, path: &Path, name: &str, From 6b37b9fb50e838a2a725e31d55d6df3cda9b020c Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Thu, 13 Nov 2025 17:02:01 +0200 Subject: [PATCH 4/5] rename --- crates/forge/src/cmd/create.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/forge/src/cmd/create.rs b/crates/forge/src/cmd/create.rs index 61c9d0dba180a..cf3e4b4f66d59 100644 --- a/crates/forge/src/cmd/create.rs +++ b/crates/forge/src/cmd/create.rs @@ -14,7 +14,7 @@ use eyre::{Context, Result}; use forge_verify::{RetryArgs, VerifierArgs, VerifyArgs}; use foundry_cli::{ opts::{BuildOpts, EthereumOpts, EtherscanOpts, TransactionOpts}, - utils::{self, LoadConfig, read_constructor_args_file, remove_contract}, + utils::{self, LoadConfig, read_constructor_args_file, find_contract_artifacts}, }; use foundry_common::{ compile::{self}, @@ -123,7 +123,7 @@ impl CreateArgs { let output = compile::compile_target(&target_path, &project, shell::is_json())?; - let (abi, bin, id) = remove_contract(output, &target_path, &self.contract.name)?; + let (abi, bin, id) = find_contract_artifacts(output, &target_path, &self.contract.name)?; let bin = match bin.object { BytecodeObject::Bytecode(_) => bin.object, From 28a8568045dcbc7dd7664da48b480c8fab996b27 Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Thu, 13 Nov 2025 19:02:52 +0200 Subject: [PATCH 5/5] cargo fmt --- crates/forge/src/cmd/create.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/forge/src/cmd/create.rs b/crates/forge/src/cmd/create.rs index cf3e4b4f66d59..0187020721af1 100644 --- a/crates/forge/src/cmd/create.rs +++ b/crates/forge/src/cmd/create.rs @@ -14,7 +14,7 @@ use eyre::{Context, Result}; use forge_verify::{RetryArgs, VerifierArgs, VerifyArgs}; use foundry_cli::{ opts::{BuildOpts, EthereumOpts, EtherscanOpts, TransactionOpts}, - utils::{self, LoadConfig, read_constructor_args_file, find_contract_artifacts}, + utils::{self, LoadConfig, find_contract_artifacts, read_constructor_args_file}, }; use foundry_common::{ compile::{self},