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/SeismicSystems/seismic-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
17#[cfg(test)]
19mod transaction;
20
21pub use alloy_consensus::{transaction::PooledTransaction, TxType};
22use alloy_consensus::{TxEip4844, TxEip4844WithSidecar};
23use alloy_eips::eip7594::BlobTransactionSidecarVariant;
24
25pub type Transaction = alloy_consensus::EthereumTypedTransaction<TxEip4844>;
27
28pub type TransactionSigned = alloy_consensus::EthereumTxEnvelope<TxEip4844>;
30
31pub type PooledTransactionVariant =
33 alloy_consensus::EthereumTxEnvelope<TxEip4844WithSidecar<BlobTransactionSidecarVariant>>;
34
35#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))]
37pub mod serde_bincode_compat {
38 pub use super::receipt::serde_bincode_compat::*;
39 pub use alloy_consensus::serde_bincode_compat::transaction::*;
40}
41
42pub type Block = alloy_consensus::Block<TransactionSigned>;
44
45pub type BlockBody = alloy_consensus::BlockBody<TransactionSigned>;
47
48#[derive(Debug, Clone, Default, PartialEq, Eq)]
51#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
52#[non_exhaustive]
53pub struct EthPrimitives;
54
55impl reth_primitives_traits::NodePrimitives for EthPrimitives {
56 type Block = crate::Block;
57 type BlockHeader = alloy_consensus::Header;
58 type BlockBody = crate::BlockBody;
59 type SignedTx = crate::TransactionSigned;
60 type Receipt = crate::Receipt;
61}