Skip to content

Commit

Permalink
handler register
Browse files Browse the repository at this point in the history
  • Loading branch information
CeciliaZ030 committed Jan 18, 2024
1 parent 72a085e commit c306f98
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 1,245 deletions.
2 changes: 2 additions & 0 deletions crates/interpreter/src/lib.rs
Expand Up @@ -6,6 +6,8 @@
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(all(feature = "optimism", feature = "taiko"))]
compile_error!("Features 'optimism' and 'taiko' cannot be enabled at the same time.");

extern crate alloc;

Expand Down
2 changes: 2 additions & 0 deletions crates/precompile/src/lib.rs
Expand Up @@ -6,6 +6,8 @@
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(all(feature = "optimism", feature = "taiko"))]
compile_error!("Features 'optimism' and 'taiko' cannot be enabled at the same time.");

#[macro_use]
extern crate alloc;
Expand Down
2 changes: 2 additions & 0 deletions crates/primitives/src/lib.rs
Expand Up @@ -6,6 +6,8 @@
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(all(feature = "optimism", feature = "taiko"))]
compile_error!("Features 'optimism' and 'taiko' cannot be enabled at the same time.");

extern crate alloc;

Expand Down
11 changes: 9 additions & 2 deletions crates/primitives/src/specification.rs
Expand Up @@ -130,7 +130,8 @@ impl From<&str> for SpecId {
"Regolith" => SpecId::REGOLITH,
#[cfg(all(feature = "optimism", not(feature = "taiko")))]
"Canyon" => SpecId::CANYON,
#[cfg(all(feature = "taiko", not(feature = "optimism")))] "Katla" => SpecId::KATLA,
#[cfg(all(feature = "taiko", not(feature = "optimism")))]
"Katla" => SpecId::KATLA,
_ => Self::LATEST,
}
}
Expand Down Expand Up @@ -186,7 +187,8 @@ spec!(BEDROCK, BedrockSpec);
spec!(REGOLITH, RegolithSpec);

// Taiko Hardforks
#[cfg(all(feature = "taiko", not(feature = "optimism")))]spec!(KATLA, KatlaSpec);
#[cfg(all(feature = "taiko", not(feature = "optimism")))]
spec!(KATLA, KatlaSpec);

#[cfg(all(feature = "optimism", not(feature = "taiko")))]
spec!(CANYON, CanyonSpec);
Expand Down Expand Up @@ -265,6 +267,11 @@ macro_rules! spec_to_generic {
use $crate::CanyonSpec as SPEC;
$e
}
#[cfg(all(feature = "taiko", not(feature = "optimism")))]
$crate::SpecId::KATLA => {
use $crate::KatlaSpec as SPEC;
$e
}
}
}};
}
Expand Down

0 comments on commit c306f98

Please sign in to comment.