diff --git a/crates/rpc/rpc-types-compat/src/transaction.rs b/crates/rpc/rpc-types-compat/src/transaction.rs index 625cf585b2..bbef07474e 100644 --- a/crates/rpc/rpc-types-compat/src/transaction.rs +++ b/crates/rpc/rpc-types-compat/src/transaction.rs @@ -22,7 +22,7 @@ use reth_evm::{ ConfigureEvm, TxEnvFor, }; use reth_optimism_primitives::DepositReceipt; -use reth_primitives_traits::{NodePrimitives, SignedTransaction, TxTy}; +use reth_primitives_traits::{NodePrimitives, TxTy}; use reth_storage_api::{errors::ProviderError, ReceiptProvider}; use revm_context::{BlockEnv, CfgEnv, TxEnv}; use serde::{Deserialize, Serialize}; @@ -123,10 +123,12 @@ pub trait FromConsensusTx { fn from_consensus_tx(tx: T, signer: Address, tx_info: Self::TxInfo) -> Self; } -impl FromConsensusTx for Transaction { +impl> + FromConsensusTx for Transaction +{ type TxInfo = TransactionInfo; - fn from_consensus_tx(tx: T, signer: Address, tx_info: Self::TxInfo) -> Self { + fn from_consensus_tx(tx: TxIn, signer: Address, tx_info: Self::TxInfo) -> Self { let TransactionInfo { block_hash, block_number, index: transaction_index, base_fee, .. } = tx_info; @@ -137,7 +139,7 @@ impl FromConsensusTx for Transaction { .unwrap_or_else(|| tx.max_fee_per_gas()); Self { - inner: Recovered::new_unchecked(tx, signer), + inner: Recovered::new_unchecked(tx, signer).convert(), block_hash, block_number, transaction_index, @@ -175,14 +177,6 @@ where fn try_into_sim_tx(self) -> Result>; } -impl IntoRpcTx for EthereumTxEnvelope { - type TxInfo = TransactionInfo; - - fn into_rpc_tx(self, signer: Address, tx_info: TransactionInfo) -> Transaction { - Transaction::from_transaction(self.with_signer(signer).convert(), tx_info) - } -} - /// Adds extra context to [`TransactionInfo`]. pub trait TxInfoMapper { /// An associated output type that carries [`TransactionInfo`] with some extra context.