reth_primitives_traits/transaction/mod.rs
1//! Transaction abstraction
2
3pub mod execute;
4pub mod signature;
5pub mod signed;
6
7pub mod error;
8pub mod recover;
9
10pub use alloy_consensus::transaction::{TransactionInfo, TransactionMeta};
11
12use crate::{InMemorySize, MaybeCompact, MaybeSerde};
13use core::{fmt, hash::Hash};
14
15#[cfg(test)]
16mod access_list;
17
18/// Helper trait that unifies all behaviour required by transaction to support full node operations.
19pub trait FullTransaction: Transaction + MaybeCompact {}
20
21impl<T> FullTransaction for T where T: Transaction + MaybeCompact {}
22
23/// Abstraction of a transaction.
24pub trait Transaction:
25 Send
26 + Sync
27 + Unpin
28 + Clone
29 + fmt::Debug
30 + Eq
31 + PartialEq
32 + Hash
33 + alloy_consensus::Transaction
34 + InMemorySize
35 + MaybeSerde
36{
37}
38
39impl<T> Transaction for T where
40 T: Send
41 + Sync
42 + Unpin
43 + Clone
44 + fmt::Debug
45 + Eq
46 + PartialEq
47 + Hash
48 + alloy_consensus::Transaction
49 + InMemorySize
50 + MaybeSerde
51{
52}