From 68c849c0d50db26141d8f4da2a4e58a5539d28e4 Mon Sep 17 00:00:00 2001 From: Arni Hod Date: Sun, 24 Nov 2024 11:39:47 +0200 Subject: [PATCH] feat(blockifier): derive serialize for block info --- crates/blockifier/src/blockifier/block.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/blockifier/src/blockifier/block.rs b/crates/blockifier/src/blockifier/block.rs index 9f764590203..337c2cbe76d 100644 --- a/crates/blockifier/src/blockifier/block.rs +++ b/crates/blockifier/src/blockifier/block.rs @@ -1,4 +1,5 @@ use log::warn; +use serde::{Deserialize, Serialize}; use starknet_api::block::{ BlockHashAndNumber, BlockNumber, @@ -20,8 +21,7 @@ use crate::versioned_constants::VersionedConstants; #[path = "block_test.rs"] pub mod block_test; -#[cfg_attr(feature = "transaction_serde", derive(serde::Serialize, serde::Deserialize))] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct BlockInfo { pub block_number: BlockNumber, pub block_timestamp: BlockTimestamp, @@ -32,8 +32,7 @@ pub struct BlockInfo { pub use_kzg_da: bool, } -#[cfg_attr(feature = "transaction_serde", derive(serde::Serialize, serde::Deserialize))] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct GasPrices { pub eth_gas_prices: GasPriceVector, // In wei. pub strk_gas_prices: GasPriceVector, // In fri.