Skip to content

Commit

Permalink
dev: remove unused code from storage-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
GMKrieger committed Nov 25, 2024
1 parent cb2a6d2 commit d4eaa59
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions crates/starknet-os/src/storage/storage_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,3 @@ pub async fn build_starknet_storage_async<S: Storage + Send + Sync, H: HashFunct

Ok((storage_by_address, initial_state, final_state))
}

/// Convert a starknet_api deprecated ContractClass to a cairo-vm ContractClass (v0 only).
/// Note that this makes a serialize -> deserialize pass, so it is not cheap!
pub fn deprecated_contract_class_api2vm(
api_class: &starknet_api::deprecated_contract_class::ContractClass,
) -> serde_json::Result<blockifier::execution::contract_class::ContractClass> {
let serialized = serde_json::to_string(&api_class)?;

let vm_class_v0_inner: blockifier::execution::contract_class::ContractClassV0Inner =
serde_json::from_str(serialized.as_str())?;

let vm_class_v0 = blockifier::execution::contract_class::ContractClassV0(std::sync::Arc::new(vm_class_v0_inner));
let vm_class = blockifier::execution::contract_class::ContractClass::V0(vm_class_v0);

Ok(vm_class)
}

0 comments on commit d4eaa59

Please sign in to comment.