mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: bump alloy (#12391)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
//! L1 `eth` API types.
|
||||
|
||||
use alloy_consensus::{Signed, TxEip4844Variant, TxEnvelope};
|
||||
use alloy_consensus::{Signed, Transaction as _, TxEip4844Variant, TxEnvelope};
|
||||
use alloy_network::{Ethereum, Network};
|
||||
use alloy_rpc_types::{Transaction, TransactionInfo};
|
||||
use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered};
|
||||
@ -24,7 +24,7 @@ where
|
||||
let from = tx.signer();
|
||||
let TransactionSigned { transaction, signature, hash } = tx.into_signed();
|
||||
|
||||
let inner = match transaction {
|
||||
let inner: TxEnvelope = match transaction {
|
||||
reth_primitives::Transaction::Legacy(tx) => {
|
||||
Signed::new_unchecked(tx, signature, hash).into()
|
||||
}
|
||||
@ -44,9 +44,24 @@ where
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
let TransactionInfo { block_hash, block_number, index: transaction_index, .. } = tx_info;
|
||||
let TransactionInfo {
|
||||
block_hash, block_number, index: transaction_index, base_fee, ..
|
||||
} = tx_info;
|
||||
|
||||
Transaction { inner, block_hash, block_number, transaction_index, from }
|
||||
let effective_gas_price = base_fee
|
||||
.map(|base_fee| {
|
||||
inner.effective_tip_per_gas(base_fee as u64).unwrap_or_default() + base_fee
|
||||
})
|
||||
.unwrap_or_else(|| inner.max_fee_per_gas());
|
||||
|
||||
Transaction {
|
||||
inner,
|
||||
block_hash,
|
||||
block_number,
|
||||
transaction_index,
|
||||
from,
|
||||
effective_gas_price: Some(effective_gas_price),
|
||||
}
|
||||
}
|
||||
|
||||
fn otterscan_api_truncate_input(tx: &mut Self::Transaction) {
|
||||
|
||||
Reference in New Issue
Block a user