Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(primitives): serde for L1BlockInfoTx #460

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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