Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Dec 23, 2024
1 parent 53c7163 commit 509cc82
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/strategy/zksync/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,17 @@ impl BackendStrategyRunner for ZksyncBackendStrategyRunner {
&self,
backend: &mut Backend,
env: &mut EnvWithHandlerCfg,
_inspector: &mut dyn InspectorExt,
inspector: &mut dyn InspectorExt,
inspect_ctx: Box<dyn Any>,
) -> Result<ResultAndState> {
if !is_zksync_cainspect_context(&inspect_ctx) {

Check failure on line 89 in crates/strategy/zksync/src/backend.rs

View workflow job for this annotation

GitHub Actions / zk-cargo-test

cannot find function `is_zksync_cainspect_context` in this scope
return self.evm.inspect(backend, env, inspector, inspect_ctx);
}

let inspect_ctx = get_inspect_context(inspect_ctx);
let mut persisted_factory_deps =
get_context(backend.strategy.context.as_mut()).persisted_factory_deps.clone();

let inspect_ctx = get_inspect_context(inspect_ctx);
let result = foundry_zksync_core::vm::transact(
Some(&mut persisted_factory_deps),
Some(inspect_ctx.factory_deps),
Expand Down Expand Up @@ -421,3 +425,7 @@ fn get_context(ctx: &mut dyn BackendStrategyContext) -> &mut ZksyncBackendStrate
fn get_inspect_context(ctx: Box<dyn Any>) -> Box<ZksyncInspectContext> {
ctx.downcast().expect("expected ZksyncInspectContext")
}

fn is_zksync_inspect_context(ctx: &dyn Any) -> bool {
ctx.downcast_ref::<ZksyncInspectContext>().is_some()
}

0 comments on commit 509cc82

Please sign in to comment.