reth_optimism_primitives/
lib.rs1#![doc(
4 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7)]
8#![cfg_attr(docsrs, feature(doc_cfg))]
9#![cfg_attr(not(test), warn(unused_crate_dependencies))]
10#![cfg_attr(not(feature = "std"), no_std)]
11#![allow(unused)]
12extern crate alloc;
13
14pub mod bedrock;
15
16pub use op_alloy_consensus::L2_TO_L1_MESSAGE_PASSER_ADDRESS;
18
19pub mod transaction;
20pub use transaction::*;
21
22mod receipt;
23pub use op_alloy_consensus::OpReceipt;
24pub use receipt::DepositReceipt;
25
26pub type OpBlock = alloy_consensus::Block<OpTransactionSigned>;
28
29pub type OpBlockBody = <OpBlock as reth_primitives_traits::Block>::Body;
31
32#[derive(Debug, Default, Clone, PartialEq, Eq)]
34#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
35pub struct OpPrimitives;
36
37impl reth_primitives_traits::NodePrimitives for OpPrimitives {
38 type Block = OpBlock;
39 type BlockHeader = alloy_consensus::Header;
40 type BlockBody = OpBlockBody;
41 type SignedTx = OpTransactionSigned;
42 type Receipt = OpReceipt;
43}
44
45#[cfg(feature = "serde-bincode-compat")]
47pub mod serde_bincode_compat {
48 pub use super::receipt::serde_bincode_compat::OpReceipt as LocalOpReceipt;
49 pub use op_alloy_consensus::serde_bincode_compat::OpReceipt;
50}