Skip to content

Commit

Permalink
feat(primitives): serde for L1BlockInfoTx (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby authored Aug 24, 2024
1 parent 0048fcc commit edd7081
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/primitives/src/block_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const L1_INFO_DEPOSITOR_ADDRESS: Address = address!("deaddeaddeaddeaddeaddeaddea
/// transaction on OP Stack chains. This transaction always sits at the top of the block, and alters
/// the `L1 Block` contract's knowledge of the L1 chain.
#[derive(Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum L1BlockInfoTx {
/// A Bedrock L1 info transaction
Bedrock(L1BlockInfoBedrock),
Expand All @@ -52,7 +53,8 @@ pub enum L1BlockInfoTx {
// | 32 | L1FeeOverhead |
// | 32 | L1FeeScalar |
// +---------+--------------------------+
#[derive(Debug, Clone, Hash, Eq, PartialEq)]
#[derive(Debug, Clone, Hash, Eq, PartialEq, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct L1BlockInfoBedrock {
/// The current L1 origin block number
pub number: u64,
Expand Down Expand Up @@ -89,7 +91,8 @@ pub struct L1BlockInfoBedrock {
/// | 32 | BlockHash |
/// | 32 | BatcherHash |
/// +---------+--------------------------+
#[derive(Debug, Clone, Hash, Eq, PartialEq)]
#[derive(Debug, Clone, Hash, Eq, PartialEq, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct L1BlockInfoEcotone {
/// The current L1 origin block number
pub number: u64,
Expand Down

0 comments on commit edd7081

Please sign in to comment.