use crate::evm::CustomBlockAssembler; use alloy_consensus::{Block, Header}; use alloy_evm::EvmEnv; use alloy_op_evm::OpBlockExecutionCtx; use op_revm::OpSpecId; use reth_ethereum::{ node::api::ConfigureEvm, primitives::{SealedBlock, SealedHeader}, }; use reth_op::{ node::{OpEvmConfig, OpNextBlockEnvAttributes}, OpPrimitives, OpTransactionSigned, }; #[derive(Debug, Clone)] pub struct CustomEvmConfig { pub(super) inner: OpEvmConfig, pub(super) block_assembler: CustomBlockAssembler, } impl ConfigureEvm for CustomEvmConfig { type Primitives = OpPrimitives; type Error = ::Error; type NextBlockEnvCtx = ::NextBlockEnvCtx; type BlockExecutorFactory = Self; type BlockAssembler = CustomBlockAssembler; fn block_executor_factory(&self) -> &Self::BlockExecutorFactory { self } fn block_assembler(&self) -> &Self::BlockAssembler { &self.block_assembler } fn evm_env(&self, header: &Header) -> EvmEnv { self.inner.evm_env(header) } fn next_evm_env( &self, parent: &Header, attributes: &OpNextBlockEnvAttributes, ) -> Result, Self::Error> { self.inner.next_evm_env(parent, attributes) } fn context_for_block( &self, block: &SealedBlock>, ) -> OpBlockExecutionCtx { self.inner.context_for_block(block) } fn context_for_next_block( &self, parent: &SealedHeader, attributes: Self::NextBlockEnvCtx, ) -> OpBlockExecutionCtx { self.inner.context_for_next_block(parent, attributes) } }