mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Initial reth port
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user