Skip to content

Commit

Permalink
fix(cairo_native): implement estimate_casm_hash_computation_resources…
Browse files Browse the repository at this point in the history
…_for native (#2814)
  • Loading branch information
noaov1 authored Dec 19, 2024
1 parent 4cb3bca commit ded24d2
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions crates/blockifier/src/execution/contract_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand All @@ -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,
Expand Down

0 comments on commit ded24d2

Please sign in to comment.