diff --git a/crates/cheatcodes/assets/cheatcodes.json b/crates/cheatcodes/assets/cheatcodes.json index d2c9ea2ce..6bd4a67b3 100644 --- a/crates/cheatcodes/assets/cheatcodes.json +++ b/crates/cheatcodes/assets/cheatcodes.json @@ -10500,4 +10500,4 @@ "safety": "safe" } ] -} +} \ No newline at end of file diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index af678c70d..b7e9513e8 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -217,9 +217,13 @@ pub fn create2_handler_register( let mut code_hash = ctx.evm.load_account(create2_deployer)?.info.code_hash; // NOTE(zk): We check which deployer we are using to separate the logic for zkSync // and original foundry. + // TODO(zk): adding this check to skip comparing to evm create2 deployer + // hash, should we compare vs zkevm one? + let mut zk_is_create2_deployer = false; if call_inputs.target_address == DEFAULT_CREATE2_DEPLOYER_ZKSYNC { code_hash = ctx.evm.load_account(call_inputs.target_address)?.info.code_hash; - }; + zk_is_create2_deployer = true; + } if code_hash == KECCAK_EMPTY { return Ok(FrameOrResult::Result(FrameResult::Call(CallOutcome { result: InterpreterResult { @@ -229,7 +233,7 @@ pub fn create2_handler_register( }, memory_offset: 0..0, }))) - } else if code_hash != DEFAULT_CREATE2_DEPLOYER_CODEHASH { + } else if code_hash != DEFAULT_CREATE2_DEPLOYER_CODEHASH && !zk_is_create2_deployer { return Ok(FrameOrResult::Result(FrameResult::Call(CallOutcome { result: InterpreterResult { result: InstructionResult::Revert, diff --git a/crates/forge/tests/it/test_helpers.rs b/crates/forge/tests/it/test_helpers.rs index d0e8398a0..7da206659 100644 --- a/crates/forge/tests/it/test_helpers.rs +++ b/crates/forge/tests/it/test_helpers.rs @@ -203,6 +203,7 @@ impl ForgeTestProfile { zk_config.zksync.optimizer_mode = '3'; zk_config.zksync.zksolc = Some(foundry_config::SolcReq::Version(Version::new(1, 5, 7))); zk_config.fuzz.no_zksync_reserved_addresses = true; + zk_config.invariant.depth = 15; zk_config } diff --git a/crates/zksync/compilers/src/artifacts/contract.rs b/crates/zksync/compilers/src/artifacts/contract.rs index 7ec459da9..3b9be91ca 100644 --- a/crates/zksync/compilers/src/artifacts/contract.rs +++ b/crates/zksync/compilers/src/artifacts/contract.rs @@ -90,7 +90,7 @@ impl Contract { // CompactContract variants // TODO: for zkEvm, the distinction between bytecode and deployed_bytecode makes little sense, -// and there some fields that the ouptut doesn't provide (e.g: source_map) +// and there some fields that the output doesn't provide (e.g: source_map) // However, we implement these because we get the Artifact trait and can reuse lots of // the crate's helpers without needing to duplicate everything. Maybe there's a way // we can get all these without having to add the same bytecode twice on each struct. diff --git a/crates/zksync/compilers/src/compilers/artifact_output/zk.rs b/crates/zksync/compilers/src/compilers/artifact_output/zk.rs index 58409e44f..0ece4b670 100644 --- a/crates/zksync/compilers/src/compilers/artifact_output/zk.rs +++ b/crates/zksync/compilers/src/compilers/artifact_output/zk.rs @@ -63,7 +63,7 @@ impl ZkContractArtifact { // CompactContract variants // TODO: for zkEvm, the distinction between bytecode and deployed_bytecode makes little sense, -// and there some fields that the ouptut doesn't provide (e.g: source_map) +// and there some fields that the output doesn't provide (e.g: source_map) // However, we implement these because we get the Artifact trait and can reuse lots of // the crate's helpers without needing to duplicate everything. Maybe there's a way // we can get all these without having to add the same bytecode twice on each struct. diff --git a/crates/zksync/compilers/src/compilers/zksolc/mod.rs b/crates/zksync/compilers/src/compilers/zksolc/mod.rs index 368b8f70e..203a0fd45 100644 --- a/crates/zksync/compilers/src/compilers/zksolc/mod.rs +++ b/crates/zksync/compilers/src/compilers/zksolc/mod.rs @@ -653,7 +653,7 @@ fn compiler_blocking_install( let _lock = try_lock_file(lock_path)?; trace!("got lock for {label}"); - // Only write to file if it is not there. The check is doneafter adquiring the lock + // Only write to file if it is not there. The check is done after acquiring the lock // to ensure the thread remains blocked until the required compiler is // fully installed if !compiler_path.exists() { @@ -679,7 +679,7 @@ fn compiler_blocking_install( response.status() ))); } - trace!("{label} instalation completed"); + trace!("{label} installation completed"); Ok(compiler_path) }) }