Skip to content

Commit

Permalink
fix create
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Jul 9, 2024
1 parent d639c48 commit fb81c05
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions crates/forge/bin/cmd/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ impl CreateArgs {
let config = self.opts.try_load_config_emit_warnings()?;
let zk_project = foundry_zksync_compiler::create_project(&config, config.cache, false)?;
let zk_compiler = ProjectCompiler::new().quiet(self.json || self.opts.silent);
let mut zk_output = zk_compiler.zksync_compile(&zk_project)?;
let mut zk_output =
zk_compiler.zksync_compile(&zk_project, config.zksync.avoid_contracts())?;

let artifact = remove_zk_contract(&mut zk_output, &target_path, &self.contract.name)?;

Expand Down Expand Up @@ -650,6 +651,7 @@ impl CreateArgs {
evm_version: self.opts.compiler.evm_version,
show_standard_json_input: self.show_standard_json_input,
guess_constructor_args: false,
zksync: true,
};
println!("Waiting for {} to detect contract deployment...", verify.verifier.verifier);
verify.run().await
Expand Down Expand Up @@ -765,7 +767,6 @@ where
P: Provider<T, AnyNetwork>,
T: Transport + Clone,
{

/// Set zksync's factory deps.
pub fn set_zk_factory_deps(mut self, deps: Vec<Vec<u8>>) -> Self {
self.zk_factory_deps = Some(deps);
Expand Down
5 changes: 3 additions & 2 deletions crates/forge/bin/cmd/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,9 @@ impl TestArgs {
.quiet_if(self.json || self.opts.silent)
.files(sources_to_compile);

let zk_output = zk_compiler.zksync_compile(&zk_project)?;
let dual_compiled_contracts = DualCompiledContracts::new(&output, &zk_output, &project.paths);
let zk_output = zk_compiler.zksync_compile(&zk_project, None)?;
let dual_compiled_contracts =
DualCompiledContracts::new(&output, &zk_output, &project.paths);
(Some(zk_output), Some(dual_compiled_contracts))
} else {
(None, None)
Expand Down
5 changes: 3 additions & 2 deletions crates/forge/src/multi_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ use alloy_primitives::{Address, Bytes, U256};
use eyre::Result;
use foundry_common::{get_contract_name, ContractsByArtifact, TestFunctionExt};
use foundry_compilers::{
artifacts::Libraries, compilers::Compiler, Artifact, ArtifactId, ProjectCompileOutput,
zksync::compile::output::ProjectCompileOutput as ZkProjectCompileOutput,
artifacts::Libraries, compilers::Compiler,
zksync::compile::output::ProjectCompileOutput as ZkProjectCompileOutput, Artifact, ArtifactId,
ProjectCompileOutput,
};
use foundry_config::Config;
use foundry_evm::{
Expand Down
2 changes: 1 addition & 1 deletion crates/script/src/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use alloy_chains::Chain;
use alloy_primitives::{utils::format_units, TxHash, U256};
use alloy_provider::{PendingTransactionBuilder, Provider};
use alloy_rpc_types::AnyTransactionReceipt;
use eyre::{Context, Result};
use eyre::Result;
use foundry_common::provider::RetryProvider;
use std::time::Duration;

Expand Down

0 comments on commit fb81c05

Please sign in to comment.