Skip to content

Commit ef5b0c3

Browse files
authored
Merge pull request #1 from OisinKyne/master
Add hoodi
2 parents dc72471 + 9d68a94 commit ef5b0c3

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

ethereum/src/config/networks.rs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub enum Network {
2323
Mainnet,
2424
Sepolia,
2525
Holesky,
26+
Hoodi,
2627
}
2728

2829
impl FromStr for Network {
@@ -33,6 +34,7 @@ impl FromStr for Network {
3334
"mainnet" => Ok(Self::Mainnet),
3435
"sepolia" => Ok(Self::Sepolia),
3536
"holesky" => Ok(Self::Holesky),
37+
"hoodi" => Ok(Self::Hoodi),
3638
_ => Err(eyre::eyre!("network not recognized")),
3739
}
3840
}
@@ -44,6 +46,7 @@ impl Display for Network {
4446
Self::Mainnet => "mainnet",
4547
Self::Sepolia => "sepolia",
4648
Self::Holesky => "holesky",
49+
Self::Hoodi => "hoodi",
4750
};
4851

4952
f.write_str(str)
@@ -56,6 +59,7 @@ impl Network {
5659
Self::Mainnet => mainnet(),
5760
Self::Sepolia => sepolia(),
5861
Self::Holesky => holesky(),
62+
Self::Hoodi => hoodi(),
5963
}
6064
}
6165

@@ -64,6 +68,7 @@ impl Network {
6468
1 => Ok(Network::Mainnet),
6569
11155111 => Ok(Network::Sepolia),
6670
17000 => Ok(Network::Holesky),
71+
560048 => Ok(Network::Hoodi),
6772
_ => Err(eyre::eyre!("chain id not known")),
6873
}
6974
}
@@ -213,6 +218,54 @@ pub fn holesky() -> BaseConfig {
213218
}
214219
}
215220

221+
pub fn hoodi() -> BaseConfig {
222+
BaseConfig {
223+
default_checkpoint: b256!(
224+
"689dc3d39faf53c360ada45a734139bfb195f96d04416c797bb0c1a46da903ad"
225+
),
226+
rpc_port: 8545,
227+
consensus_rpc: None,
228+
chain: ChainConfig {
229+
chain_id: 560048,
230+
genesis_time: 1742213400,
231+
genesis_root: b256!("212f13fc4df078b6cb7db228f1c8307566dcecf900867401a92023d7ba99cb5f"),
232+
},
233+
forks: Forks {
234+
genesis: Fork {
235+
epoch: 0,
236+
fork_version: fixed_bytes!("10000910"),
237+
},
238+
altair: Fork {
239+
epoch: 0,
240+
fork_version: fixed_bytes!("20000910"),
241+
},
242+
bellatrix: Fork {
243+
epoch: 0,
244+
fork_version: fixed_bytes!("30000910"),
245+
},
246+
capella: Fork {
247+
epoch: 0,
248+
fork_version: fixed_bytes!("40000910"),
249+
},
250+
deneb: Fork {
251+
epoch: 0,
252+
fork_version: fixed_bytes!("50000910"),
253+
},
254+
electra: Fork {
255+
epoch: 2048,
256+
fork_version: fixed_bytes!("60000910"),
257+
},
258+
},
259+
execution_forks: ForkSchedule {
260+
prague_timestamp: 1742999832,
261+
},
262+
max_checkpoint_age: 1_209_600, // 14 days
263+
#[cfg(not(target_arch = "wasm32"))]
264+
data_dir: Some(data_dir(Network::Hoodi)),
265+
..std::default::Default::default()
266+
}
267+
}
268+
216269
#[cfg(not(target_arch = "wasm32"))]
217270
fn data_dir(network: Network) -> PathBuf {
218271
home_dir()

0 commit comments

Comments
 (0)