Skip to content

Commit

Permalink
fix: sierra and legacy contracts are sn api contracts (#1777)
Browse files Browse the repository at this point in the history
  • Loading branch information
noaov1 authored Nov 4, 2024
1 parent a399828 commit 1f35306
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,12 @@ impl StateReader for OfflineStateReader {
class_hash: ClassHash,
) -> StateResult<RunnableContractClass> {
match self.get_contract_class(&class_hash)? {
StarknetContractClass::Sierra(sierra) => sierra_to_contact_class_v1(sierra),
StarknetContractClass::Legacy(legacy) => legacy_to_contract_class_v0(legacy),
StarknetContractClass::Sierra(sierra) => {
Ok(sierra_to_contact_class_v1(sierra).unwrap().try_into().unwrap())
}
StarknetContractClass::Legacy(legacy) => {
Ok(legacy_to_contract_class_v0(legacy).unwrap().try_into().unwrap())
}
}
}

Expand Down

0 comments on commit 1f35306

Please sign in to comment.