mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-03 19:45:20 -05:00
primitive: introduce reth Transaction trait (#11728)
This commit is contained in:
@@ -23,6 +23,9 @@ pub use account::{Account, Bytecode};
|
||||
pub mod receipt;
|
||||
pub use receipt::Receipt;
|
||||
|
||||
pub mod transaction;
|
||||
pub use transaction::Transaction;
|
||||
|
||||
mod integer_list;
|
||||
pub use integer_list::{IntegerList, IntegerListError};
|
||||
|
||||
|
||||
26
crates/primitives-traits/src/transaction.rs
Normal file
26
crates/primitives-traits/src/transaction.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
//! Transaction abstraction
|
||||
|
||||
use alloc::fmt;
|
||||
|
||||
use reth_codecs::Compact;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Helper trait that unifies all behaviour required by transaction to support full node operations.
|
||||
pub trait FullTransaction: Transaction + Compact {}
|
||||
|
||||
impl<T> FullTransaction for T where T: Transaction + Compact {}
|
||||
|
||||
/// Abstraction of a transaction.
|
||||
pub trait Transaction:
|
||||
alloy_consensus::Transaction
|
||||
+ Clone
|
||||
+ fmt::Debug
|
||||
+ PartialEq
|
||||
+ Eq
|
||||
+ Default
|
||||
+ alloy_rlp::Encodable
|
||||
+ alloy_rlp::Decodable
|
||||
+ Serialize
|
||||
+ for<'de> Deserialize<'de>
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user