From 771887d5bff173474d3e7b1933b708158b820960 Mon Sep 17 00:00:00 2001 From: Edgar Date: Mon, 18 Sep 2023 20:02:59 +0200 Subject: [PATCH] remove unneeded added set_compiled_class_hash (#1031) Co-authored-by: Juan Bono --- src/transaction/declare_v2.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/transaction/declare_v2.rs b/src/transaction/declare_v2.rs index cfc400186..0faa548b8 100644 --- a/src/transaction/declare_v2.rs +++ b/src/transaction/declare_v2.rs @@ -375,9 +375,7 @@ impl DeclareV2 { )); } state.set_compiled_class_hash(&self.sierra_class_hash, &self.compiled_class_hash)?; - // theorically class_hash == compiled_class_hash in v2, so this is like setting class_hash -> compiled_class_hash - // which is needed for get_compiled_class_hash later to work. - state.set_compiled_class_hash(&self.compiled_class_hash, &self.compiled_class_hash)?; + state.set_contract_class( &self.compiled_class_hash.to_be_bytes(), &CompiledClass::Casm(Arc::new(casm_class)),