reth_optimism_primitives/
lib.rs
1#![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, doc_auto_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 mod predeploys;
17pub use predeploys::ADDRESS_L2_TO_L1_MESSAGE_PASSER;
18
19pub mod transaction;
20pub use transaction::*;
21
22mod receipt;
23pub use receipt::{DepositReceipt, OpReceipt};
24
25pub type OpBlock = alloy_consensus::Block<OpTransactionSigned>;
27
28pub type OpBlockBody = <OpBlock as reth_primitives_traits::Block>::Body;
30
31#[derive(Debug, Default, Clone, PartialEq, Eq)]
33#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
34pub struct OpPrimitives;
35
36impl reth_primitives_traits::NodePrimitives for OpPrimitives {
37 type Block = OpBlock;
38 type BlockHeader = alloy_consensus::Header;
39 type BlockBody = OpBlockBody;
40 type SignedTx = OpTransactionSigned;
41 type Receipt = OpReceipt;
42}
43
44#[cfg(feature = "serde-bincode-compat")]
46pub mod serde_bincode_compat {
47 pub use super::receipt::serde_bincode_compat::*;
48 pub use op_alloy_consensus::serde_bincode_compat::*;
49}