Skip to content

Commit

Permalink
chore: rm deposit contract config for op (#11479)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Oct 4, 2024
1 parent 62e6293 commit 1f190ad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions crates/optimism/chainspec/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//! OP stack variation of chain spec constants.

use alloy_primitives::{address, b256};
use reth_chainspec::DepositContract;

//------------------------------- BASE MAINNET -------------------------------//

/// Max gas limit on Base: <https://basescan.org/block/17208876>
Expand All @@ -12,10 +9,3 @@ pub const BASE_MAINNET_MAX_GAS_LIMIT: u64 = 105_000_000;

/// Max gas limit on Base Sepolia: <https://sepolia.basescan.org/block/12506483>
pub const BASE_SEPOLIA_MAX_GAS_LIMIT: u64 = 45_000_000;

/// Deposit contract address: `0x00000000219ab540356cbb839cbe05303d7705fa`
pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::new(
address!("00000000219ab540356cbb839cbe05303d7705fa"),
11052984,
b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
);
10 changes: 0 additions & 10 deletions crates/optimism/chainspec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub use dev::OP_DEV;
pub use op::OP_MAINNET;
pub use op_sepolia::OP_SEPOLIA;

use crate::constants::MAINNET_DEPOSIT_CONTRACT;
use derive_more::{Constructor, Deref, Into};
use once_cell::sync::OnceCell;
use reth_chainspec::{
Expand Down Expand Up @@ -209,22 +208,13 @@ impl From<Genesis> for OpChainSpec {
// append the remaining unknown hardforks to ensure we don't filter any out
ordered_hardforks.append(&mut block_hardforks);

// NOTE: in full node, we prune all receipts except the deposit contract's. We do not
// have the deployment block in the genesis file, so we use block zero. We use the same
// deposit topic as the mainnet contract if we have the deposit contract address in the
// genesis json.
let deposit_contract = genesis.config.deposit_contract_address.map(|address| {
DepositContract { address, block: 0, topic: MAINNET_DEPOSIT_CONTRACT.topic }
});

Self {
inner: ChainSpec {
chain: genesis.config.chain_id.into(),
genesis,
genesis_hash: OnceCell::new(),
hardforks: ChainHardforks::new(ordered_hardforks),
paris_block_and_final_difficulty,
deposit_contract,
base_fee_params: optimism_genesis_info.base_fee_params,
..Default::default()
},
Expand Down

0 comments on commit 1f190ad

Please sign in to comment.