reth_ethereum_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
12#[cfg(feature = "reth-codec")]
14use reth_codecs as _;
15
16mod receipt;
17pub use receipt::*;
18
19pub use alloy_consensus::{transaction::PooledTransaction, TxType};
20use alloy_consensus::{TxEip4844, TxEip4844WithSidecar};
21use alloy_eips::eip7594::BlobTransactionSidecarVariant;
22
23pub type Transaction = alloy_consensus::EthereumTypedTransaction<TxEip4844>;
25
26pub type TransactionSigned = alloy_consensus::EthereumTxEnvelope<TxEip4844>;
28
29pub type PooledTransactionVariant =
31 alloy_consensus::EthereumTxEnvelope<TxEip4844WithSidecar<BlobTransactionSidecarVariant>>;
32
33#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))]
35pub mod serde_bincode_compat {
36 pub use alloy_consensus::serde_bincode_compat::{transaction::*, EthereumReceipt as Receipt};
37}
38
39pub type Block = alloy_consensus::Block<TransactionSigned>;
41
42pub type BlockBody = alloy_consensus::BlockBody<TransactionSigned>;
44
45#[derive(Debug, Clone, Default, PartialEq, Eq)]
48#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
49#[non_exhaustive]
50pub struct EthPrimitives;
51
52impl reth_primitives_traits::NodePrimitives for EthPrimitives {
53 type Block = crate::Block;
54 type BlockHeader = alloy_consensus::Header;
55 type BlockBody = crate::BlockBody;
56 type SignedTx = crate::TransactionSigned;
57 type Receipt = crate::Receipt;
58}