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