Skip to content

Commit d64298f

Browse files
authored
chore: rm NodeConfig::with_celo (#12034)
1 parent 1bf34e9 commit d64298f

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

crates/anvil/src/config.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,17 +1017,6 @@ impl NodeConfig {
10171017
self
10181018
}
10191019

1020-
/// Sets whether to enable Celo support
1021-
#[must_use]
1022-
pub fn with_celo(mut self, celo: bool) -> Self {
1023-
self.networks.celo = celo;
1024-
if celo {
1025-
// Celo requires Optimism support
1026-
self.networks.optimism = true;
1027-
}
1028-
self
1029-
}
1030-
10311020
/// Makes the node silent to not emit anything on stdout
10321021
#[must_use]
10331022
pub fn silent(self) -> Self {

crates/anvil/tests/it/fork.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use alloy_signer_local::PrivateKeySigner;
2323
use anvil::{EthereumHardfork, NodeConfig, NodeHandle, PrecompileFactory, eth::EthApi, spawn};
2424
use foundry_common::provider::get_http_provider;
2525
use foundry_config::Config;
26+
use foundry_evm_networks::NetworkConfigs;
2627
use foundry_test_utils::rpc::{self, next_http_rpc_endpoint, next_rpc_endpoint};
2728
use futures::StreamExt;
2829
use revm::precompile::{Precompile, PrecompileId, PrecompileOutput, PrecompileResult};
@@ -1711,7 +1712,9 @@ async fn test_config_with_cancun_hardfork() {
17111712
#[tokio::test(flavor = "multi_thread")]
17121713
async fn test_config_with_prague_hardfork_with_celo() {
17131714
let (api, _handle) = spawn(
1714-
NodeConfig::test().with_hardfork(Some(EthereumHardfork::Prague.into())).with_celo(true),
1715+
NodeConfig::test()
1716+
.with_hardfork(Some(EthereumHardfork::Prague.into()))
1717+
.with_networks(NetworkConfigs::with_celo()),
17151718
)
17161719
.await;
17171720

crates/evm/networks/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ impl NetworkConfigs {
3131
Self { optimism: true, ..Default::default() }
3232
}
3333

34+
pub fn with_celo() -> Self {
35+
Self { celo: true, ..Default::default() }
36+
}
37+
3438
pub fn with_chain_id(mut self, chain_id: u64) -> Self {
3539
if let Ok(NamedChain::Celo | NamedChain::CeloSepolia) = NamedChain::try_from(chain_id) {
3640
self.celo = true;

0 commit comments

Comments
 (0)