reth_ethereum_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
12extern crate alloc;
13
14mod receipt;
15pub use receipt::*;
16
17mod transaction;
18pub use transaction::*;
19
20#[cfg(feature = "alloy-compat")]
21mod alloy_compat;
22
23#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))]
25pub mod serde_bincode_compat {
26 pub use super::{receipt::serde_bincode_compat::*, transaction::serde_bincode_compat::*};
27}
28
29pub type Block = alloy_consensus::Block<TransactionSigned>;
31
32pub type BlockBody = alloy_consensus::BlockBody<TransactionSigned>;
34
35#[derive(Debug, Clone, Default, PartialEq, Eq)]
38#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
39#[non_exhaustive]
40pub struct EthPrimitives;
41
42impl reth_primitives_traits::NodePrimitives for EthPrimitives {
43 type Block = crate::Block;
44 type BlockHeader = alloy_consensus::Header;
45 type BlockBody = crate::BlockBody;
46 type SignedTx = crate::TransactionSigned;
47 type Receipt = crate::Receipt;
48}