Skip to content
Draft
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
13 changes: 10 additions & 3 deletions crates/apollo_gateway/src/sync_state_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ impl SyncStateReader {

Ok(contract_class)
}
}

impl FetchCompiledClasses for SyncStateReader {
fn get_compiled_classes(&self, class_hash: ClassHash) -> StateResult<CompiledClasses> {
fn get_compiled_classes_from_client(
&self,
class_hash: ClassHash,
) -> StateResult<CompiledClasses> {
let contract_class = self.get_contract_class_from_client(class_hash)?;
match contract_class {
ContractClass::V1(casm_contract_class) => {
Expand All @@ -118,6 +119,12 @@ impl FetchCompiledClasses for SyncStateReader {
}
}
}
}

impl FetchCompiledClasses for SyncStateReader {
fn get_compiled_classes(&self, class_hash: ClassHash) -> StateResult<CompiledClasses> {
self.get_compiled_classes_from_client(class_hash)
}

/// Returns whether the given Cairo1 class is declared.
fn is_declared(&self, class_hash: ClassHash) -> StateResult<bool> {
Expand Down
Loading