Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/anvil/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub struct NodeArgs {

/// The EVM hardfork to use.
///
/// Choose the hardfork by name, e.g. `cancun`, `shanghai`, `paris`, `london`, etc...
/// Choose the hardfork by name, e.g. `prague`, `cancun`, `shanghai`, `paris`, `london`, etc...
/// [default: latest]
#[arg(long)]
pub hardfork: Option<String>,
Expand Down
6 changes: 3 additions & 3 deletions crates/anvil/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,15 +525,15 @@ impl NodeConfig {
/// Returns the hardfork to use
pub fn get_hardfork(&self) -> ChainHardfork {
if self.odyssey {
return ChainHardfork::Ethereum(EthereumHardfork::Prague);
return ChainHardfork::Ethereum(EthereumHardfork::default());
}
if let Some(hardfork) = self.hardfork {
return hardfork;
}
if self.enable_optimism {
return OpHardfork::Isthmus.into();
return OpHardfork::default().into();
}
EthereumHardfork::Cancun.into()
EthereumHardfork::default().into()
}

/// Sets a custom code size limit
Expand Down
2 changes: 1 addition & 1 deletion crates/anvil/tests/it/anvil_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ async fn can_get_node_info() {

let block_number = provider.get_block_number().await.unwrap();
let block = provider.get_block(BlockId::from(block_number)).await.unwrap().unwrap();
let hard_fork: &str = SpecId::CANCUN.into();
let hard_fork: &str = SpecId::PRAGUE.into();

let expected_node_info = NodeInfo {
current_block_number: 0_u64,
Expand Down