Initial reth port

This commit is contained in:
sprites0
2025-02-25 03:39:06 +00:00
parent 434ee6bc0d
commit d574b9ef58
23 changed files with 618 additions and 306 deletions

View File

@ -6,6 +6,7 @@ use alloy_primitives::PrimitiveSignature as Signature;
use alloy_rpc_types::TransactionRequest;
use alloy_rpc_types_eth::{Transaction, TransactionInfo};
use reth_primitives::{Recovered, TransactionSigned};
use reth_primitives_traits::SignedTransaction;
use reth_rpc_eth_api::EthApiTypes;
use reth_rpc_eth_types::EthApiError;
use reth_rpc_types_compat::TransactionCompat;
@ -43,6 +44,7 @@ where
tx_info: TransactionInfo,
) -> Result<Self::Transaction, Self::Error> {
let (tx, from) = tx.into_parts();
let from = tx.recover_signer().unwrap_or(from);
let inner: TxEnvelope = tx.into();
let TransactionInfo {
@ -70,7 +72,7 @@ where
request: TransactionRequest,
) -> Result<TransactionSigned, Self::Error> {
let Ok(tx) = request.build_typed_tx() else {
return Err(EthApiError::TransactionConversionError)
return Err(EthApiError::TransactionConversionError);
};
// Create an empty signature for the transaction.