Skip to content

Commit

Permalink
feat(blockifier): derive serialize for block info
Browse files Browse the repository at this point in the history
  • Loading branch information
ArniStarkware committed Nov 25, 2024
1 parent ffe02e2 commit 68c849c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/blockifier/src/blockifier/block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use log::warn;
use serde::{Deserialize, Serialize};
use starknet_api::block::{
BlockHashAndNumber,
BlockNumber,
Expand All @@ -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,
Expand All @@ -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.
Expand Down

0 comments on commit 68c849c

Please sign in to comment.