-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description Cleans up the `maili-rpc` crate.
- Loading branch information
Showing
14 changed files
with
324 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//! Optimism Payload attributes that reference the parent L2 block. | ||
use maili_protocol::L2BlockInfo; | ||
use op_alloy_rpc_types_engine::OpPayloadAttributes; | ||
|
||
/// Optimism Payload Attributes with parent block reference. | ||
#[derive(Debug, Clone, PartialEq)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct OpAttributesWithParent { | ||
/// The payload attributes. | ||
pub attributes: OpPayloadAttributes, | ||
/// The parent block reference. | ||
pub parent: L2BlockInfo, | ||
/// Whether the current batch is the last in its span. | ||
pub is_last_in_span: bool, | ||
} | ||
|
||
impl OpAttributesWithParent { | ||
/// Create a new [OpAttributesWithParent] instance. | ||
pub const fn new( | ||
attributes: OpPayloadAttributes, | ||
parent: L2BlockInfo, | ||
is_last_in_span: bool, | ||
) -> Self { | ||
Self { attributes, parent, is_last_in_span } | ||
} | ||
|
||
/// Returns the payload attributes. | ||
pub const fn attributes(&self) -> &OpPayloadAttributes { | ||
&self.attributes | ||
} | ||
|
||
/// Returns the parent block reference. | ||
pub const fn parent(&self) -> &L2BlockInfo { | ||
&self.parent | ||
} | ||
|
||
/// Returns whether the current batch is the last in its span. | ||
pub const fn is_last_in_span(&self) -> bool { | ||
self.is_last_in_span | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.