Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cairo_native): implement estimate_casm_hash_computation_resources_for native #2814

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading