From a192bb5d7d43fe45456eab68864637a760f16d36 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Fri, 13 Sep 2024 13:42:46 +0200 Subject: [PATCH] add solc artifacts to known contracts for traces --- crates/forge/src/multi_runner.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/forge/src/multi_runner.rs b/crates/forge/src/multi_runner.rs index 83bed5ad8..445b058fa 100644 --- a/crates/forge/src/multi_runner.rs +++ b/crates/forge/src/multi_runner.rs @@ -475,6 +475,12 @@ impl MultiContractRunnerBuilder { warn!("Abi not found for contract {}", id.identifier()); } } + + // Extend zk contracts with solc contracts as well. This is required for traces to + // accurately detect contract names deployed in EVM mode, and when using + // `vm.zkVmSkip()` cheatcode. + zk_contracts_map.extend(linked_contracts); + known_contracts = ContractsByArtifact::new(zk_contracts_map); }