Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
remove unneeded added set_compiled_class_hash (#1031)
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Bono <juanbono94@gmail.com>
  • Loading branch information
2 people authored and fannyguthmann committed Sep 22, 2023
1 parent 1437e7b commit 771887d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/transaction/declare_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 771887d

Please # to comment.