chore: use alloy TransactionMeta (#13632)

This commit is contained in:
Matthias Seitz
2025-01-03 16:49:22 +01:00
committed by GitHub
parent 5b050feca4
commit afdffadafd
22 changed files with 40 additions and 64 deletions

View File

@ -43,11 +43,14 @@ pub use reth_primitives_traits::{
};
pub use static_file::StaticFileSegment;
pub use alloy_consensus::{transaction::PooledTransaction, ReceiptWithBloom};
pub use alloy_consensus::{
transaction::{PooledTransaction, TransactionMeta},
ReceiptWithBloom,
};
pub use transaction::{
util::secp256k1::{public_key_to_address, recover_signer_unchecked, sign_message},
InvalidTransactionError, PooledTransactionsElementEcRecovered, RecoveredTx, Transaction,
TransactionMeta, TransactionSigned, TransactionSignedEcRecovered, TxType,
TransactionSigned, TransactionSignedEcRecovered, TxType,
};
// Re-exports

View File

@ -1,20 +0,0 @@
use alloy_primitives::B256;
/// Additional fields in the context of a block that contains this transaction.
#[derive(Debug, Clone, Copy, Default, Eq, PartialEq)]
pub struct TransactionMeta {
/// Hash of the transaction.
pub tx_hash: B256,
/// Index of the transaction in the block
pub index: u64,
/// Hash of the block.
pub block_hash: B256,
/// Number of the block.
pub block_number: u64,
/// Base fee of the block.
pub base_fee: Option<u64>,
/// The excess blob gas of the block.
pub excess_blob_gas: Option<u64>,
/// The block's timestamp.
pub timestamp: u64,
}

View File

@ -19,7 +19,6 @@ use alloy_primitives::{
use alloy_rlp::{Decodable, Encodable, Error as RlpError, Header};
use core::hash::{Hash, Hasher};
use derive_more::{AsRef, Deref};
pub use meta::TransactionMeta;
use once_cell as _;
#[cfg(not(feature = "std"))]
use once_cell::sync::{Lazy as LazyLock, OnceCell as OnceLock};
@ -49,7 +48,6 @@ pub mod signature;
pub mod util;
pub(crate) mod access_list;
mod meta;
mod pooled;
mod tx_type;