From 1177466de27a8f877cc8f80a592468e8694150cd Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Fri, 4 Oct 2024 14:11:20 -0500 Subject: [PATCH] fix: fix build issue with zk_source --- crates/verify/src/zksync/mod.rs | 5 ++--- crates/verify/src/zksync/standard_json.rs | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/verify/src/zksync/mod.rs b/crates/verify/src/zksync/mod.rs index a53138505..1cf5dd57c 100644 --- a/crates/verify/src/zksync/mod.rs +++ b/crates/verify/src/zksync/mod.rs @@ -11,7 +11,7 @@ use std::{fmt::Debug, thread::sleep, time::Duration}; pub mod standard_json; -// TODO: This is hardcode for Sepolia verification URL, need to be updated. +// TODO: This is hardcoded for Sepolia verification URL, need to be updated. pub static ZKSYNC_VERIFICATION_URL: &str = "https://explorer.sepolia.era.zksync.dev/contract_verification"; @@ -22,7 +22,6 @@ pub struct ZkVerificationProvider; pub trait ZksyncSourceProvider: Send + Sync + Debug { fn zk_source( &self, - args: &VerifyArgs, context: &ZkVerificationContext, ) -> Result<(StandardJsonCompilerInput, String)>; } @@ -131,7 +130,7 @@ impl ZkVerificationProvider { ) -> Result { let (source, contract_name) = if let CompilerVerificationContext::ZkSolc(context) = context { - self.source_provider().zk_source(args, context)? + self.source_provider().zk_source(context)? } else { eyre::bail!("Unsupported compiler context: only ZkSolc is supported"); }; diff --git a/crates/verify/src/zksync/standard_json.rs b/crates/verify/src/zksync/standard_json.rs index 9509a36c6..f1792ee72 100644 --- a/crates/verify/src/zksync/standard_json.rs +++ b/crates/verify/src/zksync/standard_json.rs @@ -1,4 +1,4 @@ -use super::{VerifyArgs, ZksyncSourceProvider}; +use super::ZksyncSourceProvider; use crate::zk_provider::ZkVerificationContext; use eyre::{Context, Result}; use foundry_compilers::zksolc::input::StandardJsonCompilerInput; @@ -9,7 +9,6 @@ pub struct ZksyncStandardJsonSource; impl ZksyncSourceProvider for ZksyncStandardJsonSource { fn zk_source( &self, - _args: &VerifyArgs, context: &ZkVerificationContext, ) -> Result<(StandardJsonCompilerInput, String)> { let input = foundry_compilers::zksync::project_standard_json_input( @@ -18,7 +17,6 @@ impl ZksyncSourceProvider for ZksyncStandardJsonSource { ) .wrap_err("failed to get zksolc standard json")?; - // Extract the path relative to the project root let relative_path = context .target_path .strip_prefix(context.project.root()) @@ -26,7 +24,6 @@ impl ZksyncSourceProvider for ZksyncStandardJsonSource { .display() .to_string(); - // Ensure the path uses forward slashes consistently (handles Windows paths) let normalized_path = relative_path.replace("\\", "/"); // Format the name as /: