Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
fix: removed unecessary conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
taco-paco committed Oct 18, 2024
1 parent fb1fa87 commit 826cbe9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/worker/src/commands/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub async fn do_verify(
// instantly create the directories
tokio::fs::create_dir_all(&workspace_path)
.await
.map_err(anyhow::Error::from)
.with_context(|| {
format!(
"Couldn't create workspace dir: {}",
Expand All @@ -79,7 +78,6 @@ pub async fn do_verify(
})?;
tokio::fs::create_dir_all(&artifacts_path)
.await
.map_err(anyhow::Error::from)
.with_context(|| {
format!(
"Couldn't create artifacts dir: {}",
Expand All @@ -101,9 +99,8 @@ pub async fn do_verify(
.to_string_config();

// create parent directories
tokio::fs::create_dir_all(hardhat_config_path.parent().unwrap())
tokio::fs::create_dir_all(&workspace_path)
.await
.map_err(anyhow::Error::from)
.with_context(|| {
format!(
"Couldn't create hardhat dir: {}",
Expand All @@ -112,13 +109,11 @@ pub async fn do_verify(
})?;
tokio::fs::write(hardhat_config_path, hardhat_config_content)
.await
.map_err(anyhow::Error::from)
.with_context(|| "Couldn't write hardhat.config file")?;

// initialize the files
initialize_files(&workspace_path, verification_request.contracts)
.await
.map_err(anyhow::Error::from)
.with_context(|| "Couldn't write contract to fs")?;

// Limit number of spawned processes. RAII released
Expand All @@ -131,7 +126,6 @@ pub async fn do_verify(
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()
.map_err(anyhow::Error::from)
.with_context(|| "Couldn't spawn process")?;

let output = process
Expand Down

0 comments on commit 826cbe9

Please sign in to comment.