mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: use new ChainHardforks type on ChainSpec (#9065)
This commit is contained in:
@ -5,7 +5,7 @@ use crate::{
|
||||
payload::{OptimismBuiltPayload, OptimismPayloadBuilderAttributes},
|
||||
};
|
||||
use reth_basic_payload_builder::*;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_chainspec::{ChainSpec, EthereumHardforks, OptimismHardfork};
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_execution_types::ExecutionOutcome;
|
||||
use reth_payload_builder::error::PayloadBuilderError;
|
||||
@ -14,8 +14,7 @@ use reth_primitives::{
|
||||
eip4844::calculate_excess_blob_gas,
|
||||
proofs,
|
||||
revm::env::tx_env_with_recovered,
|
||||
Block, Hardfork, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH,
|
||||
U256,
|
||||
Block, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH, U256,
|
||||
};
|
||||
use reth_provider::StateProviderFactory;
|
||||
use reth_revm::database::StateProviderDatabase;
|
||||
@ -281,8 +280,10 @@ where
|
||||
|
||||
let block_number = initialized_block_env.number.to::<u64>();
|
||||
|
||||
let is_regolith = chain_spec
|
||||
.is_fork_active_at_timestamp(Hardfork::Regolith, attributes.payload_attributes.timestamp);
|
||||
let is_regolith = chain_spec.is_fork_active_at_timestamp(
|
||||
OptimismHardfork::Regolith,
|
||||
attributes.payload_attributes.timestamp,
|
||||
);
|
||||
|
||||
// apply eip-4788 pre block contract call
|
||||
pre_block_beacon_root_contract_call(
|
||||
@ -393,7 +394,7 @@ where
|
||||
// ensures this is only set for post-Canyon deposit transactions.
|
||||
deposit_receipt_version: chain_spec
|
||||
.is_fork_active_at_timestamp(
|
||||
Hardfork::Canyon,
|
||||
OptimismHardfork::Canyon,
|
||||
attributes.payload_attributes.timestamp,
|
||||
)
|
||||
.then_some(1),
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//! Optimism builder support
|
||||
|
||||
use alloy_rlp::Encodable;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_chainspec::{ChainSpec, EthereumHardforks};
|
||||
use reth_payload_builder::EthPayloadBuilderAttributes;
|
||||
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
|
||||
use reth_primitives::{
|
||||
|
||||
Reference in New Issue
Block a user