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

@@ -1,8 +1,8 @@
//! Loads a receipt from database. Helper trait for `eth_` block and transaction RPC methods, that
//! loads receipt data w.r.t. network.
use alloy_consensus::transaction::TransactionMeta;
use futures::Future;
use reth_primitives::TransactionMeta;
use reth_provider::{ProviderReceipt, ProviderTx, ReceiptProvider, TransactionsProvider};
use crate::{EthApiTypes, RpcNodeCoreExt, RpcReceipt};

View File

@@ -1,7 +1,12 @@
//! Database access for `eth_` transaction RPC methods. Loads transaction and receipt data w.r.t.
//! network.
use alloy_consensus::{BlockHeader, Transaction};
use super::{EthApiSpec, EthSigner, LoadBlock, LoadReceipt, LoadState, SpawnBlocking};
use crate::{
helpers::estimate::EstimateCall, FromEthApiError, FullEthApiTypes, IntoEthApiError,
RpcNodeCore, RpcNodeCoreExt, RpcReceipt, RpcTransaction,
};
use alloy_consensus::{transaction::TransactionMeta, BlockHeader, Transaction};
use alloy_dyn_abi::TypedData;
use alloy_eips::{eip2718::Encodable2718, BlockId};
use alloy_network::TransactionBuilder;
@@ -9,9 +14,7 @@ use alloy_primitives::{Address, Bytes, TxHash, B256};
use alloy_rpc_types_eth::{transaction::TransactionRequest, BlockNumberOrTag, TransactionInfo};
use futures::Future;
use reth_node_api::BlockBody;
use reth_primitives::{
transaction::SignedTransactionIntoRecoveredExt, SealedBlockWithSenders, TransactionMeta,
};
use reth_primitives::{transaction::SignedTransactionIntoRecoveredExt, SealedBlockWithSenders};
use reth_primitives_traits::SignedTransaction;
use reth_provider::{
BlockNumReader, BlockReaderIdExt, ProviderBlock, ProviderReceipt, ProviderTx, ReceiptProvider,
@@ -22,12 +25,6 @@ use reth_rpc_types_compat::transaction::{from_recovered, from_recovered_with_blo
use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool};
use std::sync::Arc;
use super::{EthApiSpec, EthSigner, LoadBlock, LoadReceipt, LoadState, SpawnBlocking};
use crate::{
helpers::estimate::EstimateCall, FromEthApiError, FullEthApiTypes, IntoEthApiError,
RpcNodeCore, RpcNodeCoreExt, RpcReceipt, RpcTransaction,
};
/// Transaction related functions for the [`EthApiServer`](crate::EthApiServer) trait in
/// the `eth_` namespace.
///

View File

@@ -1,10 +1,10 @@
//! RPC receipt response builder, extends a layer one receipt with layer two data.
use super::{EthApiError, EthResult};
use alloy_consensus::{ReceiptEnvelope, TxReceipt};
use alloy_consensus::{transaction::TransactionMeta, ReceiptEnvelope, TxReceipt};
use alloy_primitives::{Address, TxKind};
use alloy_rpc_types_eth::{Log, ReceiptWithBloom, TransactionReceipt};
use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType};
use reth_primitives::{Receipt, TransactionSigned, TxType};
use reth_primitives_traits::SignedTransaction;
/// Builds an [`TransactionReceipt`] obtaining the inner receipt envelope from the given closure.

View File

@@ -1,8 +1,7 @@
//! Contains RPC handler implementations specific to blocks.
use alloy_consensus::BlockHeader;
use alloy_consensus::{transaction::TransactionMeta, BlockHeader};
use alloy_rpc_types_eth::{BlockId, TransactionReceipt};
use reth_primitives::TransactionMeta;
use reth_primitives_traits::{BlockBody, SignedTransaction};
use reth_provider::BlockReader;
use reth_rpc_eth_api::{

View File

@@ -1,6 +1,7 @@
//! Builds an RPC receipt response w.r.t. data layout of network.
use reth_primitives::{Receipt, TransactionMeta, TransactionSigned};
use alloy_consensus::transaction::TransactionMeta;
use reth_primitives::{Receipt, TransactionSigned};
use reth_provider::{BlockReader, ReceiptProvider, TransactionsProvider};
use reth_rpc_eth_api::{helpers::LoadReceipt, FromEthApiError, RpcNodeCoreExt, RpcReceipt};
use reth_rpc_eth_types::{EthApiError, EthReceiptBuilder};