From 0721dba12d2657ab1d1c8ff0933ada7a2571650d Mon Sep 17 00:00:00 2001 From: Noa Oved Date: Thu, 19 Dec 2024 12:00:34 +0200 Subject: [PATCH] fix(cairo_native): implement estimate_casm_hash_computation_resources_for native --- crates/blockifier/src/execution/contract_class.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 976397bd18..9abf7c404d 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -115,9 +115,7 @@ impl RunnableCompiledClass { Self::V0(class) => class.estimate_casm_hash_computation_resources(), Self::V1(class) => class.estimate_casm_hash_computation_resources(), #[cfg(feature = "cairo_native")] - Self::V1Native(_) => { - todo!("Use casm to estimate casm hash computation resources") - } + Self::V1Native(class) => class.casm().estimate_casm_hash_computation_resources(), } } @@ -137,17 +135,6 @@ impl RunnableCompiledClass { } } - pub fn bytecode_length(&self) -> usize { - match self { - Self::V0(class) => class.bytecode_length(), - Self::V1(class) => class.bytecode_length(), - #[cfg(feature = "cairo_native")] - Self::V1Native(_) => { - todo!("implement bytecode_length for native contracts.") - } - } - } - /// Returns whether this contract should run using Cairo steps or Sierra gas. pub fn tracked_resource( &self,