Skip to content

Commit

Permalink
chore(blockifier): use serde explicitly in tx serde
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoni-Starkware committed Sep 26, 2024
1 parent f430bc8 commit 805f5cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/call_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct OrderedEvent {
pub event: EventContent,
}

#[cfg_attr(feature = "transaction_serde", derive(Serialize, serde::Deserialize))]
#[cfg_attr(feature = "transaction_serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Default, Eq, PartialEq, Clone)]
pub struct MessageL1CostInfo {
pub l2_to_l1_payload_lengths: Vec<usize>,
Expand Down
6 changes: 3 additions & 3 deletions crates/blockifier/src/transaction/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub struct CommonAccountFields {
}

/// Contains the information gathered by the execution of a transaction.
#[cfg_attr(feature = "transaction_serde", derive(Serialize, serde::Deserialize))]
#[cfg_attr(feature = "transaction_serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Default, PartialEq)]
pub struct TransactionExecutionInfo {
/// Transaction validation call info; [None] for `L1Handler`.
Expand Down Expand Up @@ -289,7 +289,7 @@ impl ResourcesMapping {
}

/// Contains all the L2 resources consumed by a transaction
#[cfg_attr(feature = "transaction_serde", derive(Serialize, serde::Deserialize))]
#[cfg_attr(feature = "transaction_serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct StarknetResources {
pub calldata_length: usize,
Expand Down Expand Up @@ -475,7 +475,7 @@ impl StarknetResources {
}
}

#[cfg_attr(feature = "transaction_serde", derive(Serialize, serde::Deserialize))]
#[cfg_attr(feature = "transaction_serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Default, Clone, Debug, PartialEq)]
pub struct TransactionResources {
pub starknet_resources: StarknetResources,
Expand Down

0 comments on commit 805f5cd

Please sign in to comment.