diff --git a/crates/primitives/src/eip7702.rs b/crates/primitives/src/eip7702.rs new file mode 100644 index 000000000000..48e4a01087d3 --- /dev/null +++ b/crates/primitives/src/eip7702.rs @@ -0,0 +1,5 @@ +//! Types for working with EIP-7702 transactions. + +/// Re-export from `alloy_eips`. +#[doc(inline)] +pub use alloy_eips::eip7702::{Authorization, OptionalNonce, SignedAuthorization}; diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index eae739965662..af78d86356da 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -28,6 +28,7 @@ mod block; mod compression; pub mod constants; pub mod eip4844; +pub mod eip7702; pub mod genesis; pub mod proofs; mod receipt; diff --git a/crates/primitives/src/transaction/eip7702.rs b/crates/primitives/src/transaction/eip7702.rs index 194a9a4d3636..e222597f5de5 100644 --- a/crates/primitives/src/transaction/eip7702.rs +++ b/crates/primitives/src/transaction/eip7702.rs @@ -1,6 +1,7 @@ use super::access_list::AccessList; -use crate::{keccak256, Bytes, ChainId, Signature, TxKind, TxType, B256, U256}; -use alloy_eips::eip7702::SignedAuthorization; +use crate::{ + eip7702::SignedAuthorization, keccak256, Bytes, ChainId, Signature, TxKind, TxType, B256, U256, +}; use alloy_rlp::{length_of_length, Decodable, Encodable, Header}; use core::mem; use reth_codecs::{main_codec, Compact}; diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index b5f1f1f7c472..502237a12ef9 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -2,9 +2,11 @@ #[cfg(any(feature = "arbitrary", feature = "zstd-codec"))] use crate::compression::{TRANSACTION_COMPRESSOR, TRANSACTION_DECOMPRESSOR}; -use crate::{keccak256, Address, BlockHashOrNumber, Bytes, TxHash, TxKind, B256, U256}; +use crate::{ + eip7702::SignedAuthorization, keccak256, Address, BlockHashOrNumber, Bytes, TxHash, TxKind, + B256, U256, +}; -use alloy_eips::eip7702::SignedAuthorization; use alloy_rlp::{ Decodable, Encodable, Error as RlpError, Header, EMPTY_LIST_CODE, EMPTY_STRING_CODE, };