Skip to content

Commit

Permalink
feat(primitives): re-export EIP-7702 types (#9481)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Jul 12, 2024
1 parent d8b104f commit d036350
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions crates/primitives/src/eip7702.rs
Original file line number Diff line number Diff line change
@@ -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};
1 change: 1 addition & 0 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions crates/primitives/src/transaction/eip7702.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
6 changes: 4 additions & 2 deletions crates/primitives/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit d036350

Please sign in to comment.