reth_optimism_evm/
config.rs1pub use alloy_op_evm::{
2 spec as revm_spec, spec_by_timestamp_after_bedrock as revm_spec_by_timestamp_after_bedrock,
3};
4
5use alloy_consensus::BlockHeader;
6use revm::primitives::{Address, Bytes, B256};
7
8#[derive(Debug, Clone, PartialEq, Eq)]
10pub struct OpNextBlockEnvAttributes {
11 pub timestamp: u64,
13 pub suggested_fee_recipient: Address,
15 pub prev_randao: B256,
17 pub gas_limit: u64,
19 pub parent_beacon_block_root: Option<B256>,
21 pub extra_data: Bytes,
23}
24
25#[cfg(feature = "rpc")]
26impl<H: BlockHeader> reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv<H>
27 for OpNextBlockEnvAttributes
28{
29 fn build_pending_env(parent: &crate::SealedHeader<H>) -> Self {
30 Self {
31 timestamp: parent.timestamp().saturating_add(12),
32 suggested_fee_recipient: parent.beneficiary(),
33 prev_randao: B256::random(),
34 gas_limit: parent.gas_limit(),
35 parent_beacon_block_root: parent.parent_beacon_block_root(),
36 extra_data: parent.extra_data().clone(),
37 }
38 }
39}