diff --git a/crates/rpc/src/v06/types.rs b/crates/rpc/src/v06/types.rs index 32882fd310..dcc92ecb06 100644 --- a/crates/rpc/src/v06/types.rs +++ b/crates/rpc/src/v06/types.rs @@ -8,11 +8,9 @@ use pathfinder_common::{ SequencerAddress, StarknetVersion, StateCommitment, - TransactionVersion, }; use serde::Serialize; use serde_with::{serde_as, skip_serializing_none, DisplayFromStr}; -pub use transaction::TransactionWithHash; use crate::felt::RpcFelt; @@ -62,26 +60,6 @@ impl From for BlockHeader { } } -impl BlockHeader { - /// Constructs [BlockHeader] from [sequencer's pending block - /// representation](starknet_gateway_types::reply::PendingBlock) - pub fn from_sequencer_pending(pending: starknet_gateway_types::reply::PendingBlock) -> Self { - Self { - block_hash: None, - parent_hash: pending.parent_hash, - block_number: None, - new_root: None, - timestamp: pending.timestamp, - sequencer_address: pending.sequencer_address, - l1_gas_price: ResourcePrice { - price_in_fri: pending.l1_gas_price.price_in_fri, - price_in_wei: pending.l1_gas_price.price_in_wei, - }, - starknet_version: pending.starknet_version, - } - } -} - #[derive(Clone, Debug, serde::Serialize, PartialEq, Eq)] #[cfg_attr(test, derive(serde::Deserialize))] pub enum PriceUnit { @@ -99,12 +77,3 @@ impl From for PriceUnit { } } } - -impl PriceUnit { - pub fn for_transaction_version(version: &TransactionVersion) -> Self { - match version.without_query_version() { - 0..=2 => PriceUnit::Wei, - _ => PriceUnit::Fri, - } - } -}