Skip to content

Commit ce167d3

Browse files
committed
chore: linting
1 parent e723151 commit ce167d3

2 files changed

Lines changed: 0 additions & 47 deletions

File tree

crates/core/generate-pie/src/state_update.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,25 +176,6 @@ pub enum StateUpdateError {
176176
CompilationFailed(String),
177177
}
178178

179-
// Legacy error type for backward compatibility
180-
#[derive(Debug, Error)]
181-
pub enum ProveBlockError {
182-
#[error("RPC Error: {0}")]
183-
RpcError(#[from] ProviderError),
184-
#[error("Conversion Failed: {0}")]
185-
ConversionFailed(String),
186-
}
187-
188-
impl From<StateUpdateError> for ProveBlockError {
189-
fn from(err: StateUpdateError) -> Self {
190-
match err {
191-
StateUpdateError::RpcError(e) => ProveBlockError::RpcError(e),
192-
StateUpdateError::ConversionFailed(e) => ProveBlockError::ConversionFailed(e),
193-
_ => ProveBlockError::ConversionFailed(err.to_string()),
194-
}
195-
}
196-
}
197-
198179
// ================================================================================================
199180
// Public API
200181
// ================================================================================================

crates/starknet-os-types/src/sierra_contract_class.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use once_cell::sync::OnceCell;
44
use std::sync::Arc;
55

6-
use cairo_vm::Felt252;
76
use serde::ser::Error;
87
use serde::{Deserialize, Deserializer, Serialize, Serializer};
98
use serde_with::serde_as;
@@ -314,33 +313,6 @@ pub struct FlattenedSierraClassWithAbi {
314313
pub abi: Option<cairo_lang_starknet_classes::abi::Contract>,
315314
}
316315

317-
/// A contract class structure for Pathfinder compatibility.
318-
///
319-
/// This struct is used internally for converting between different contract class formats
320-
/// while maintaining compatibility with Pathfinder's expected structure.
321-
#[derive(Debug, Serialize)]
322-
struct ContractClassForPathfinderCompat {
323-
/// The Sierra program as a list of Felt252 values.
324-
pub sierra_program: Vec<Felt252>,
325-
/// The contract class version string.
326-
pub contract_class_version: String,
327-
/// Entry points organized by type.
328-
pub entry_points_by_type: cairo_lang_starknet_classes::contract_class::ContractEntryPoints,
329-
/// The ABI as a JSON string.
330-
pub abi: String,
331-
}
332-
333-
impl From<cairo_lang_starknet_classes::contract_class::ContractClass> for ContractClassForPathfinderCompat {
334-
fn from(value: cairo_lang_starknet_classes::contract_class::ContractClass) -> Self {
335-
Self {
336-
sierra_program: value.sierra_program.into_iter().map(|x| Felt252::from(x.value)).collect(),
337-
contract_class_version: value.contract_class_version,
338-
entry_points_by_type: value.entry_points_by_type,
339-
abi: value.abi.map(|abi| abi.json()).unwrap_or_default(),
340-
}
341-
}
342-
}
343-
344316
impl TryFrom<&FlattenedSierraClass> for FlattenedSierraClassWithAbi {
345317
type Error = serde_json::error::Error;
346318

0 commit comments

Comments
 (0)