From be9a472639b81c8c94b7e42b53de62e3475e1e4d Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 27 Feb 2024 17:45:09 +0100 Subject: [PATCH] chore: add helper function for spec id (#1130) --- crates/primitives/src/env/handler_cfg.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/primitives/src/env/handler_cfg.rs b/crates/primitives/src/env/handler_cfg.rs index e1766d02fe..e7c1818527 100644 --- a/crates/primitives/src/env/handler_cfg.rs +++ b/crates/primitives/src/env/handler_cfg.rs @@ -126,6 +126,11 @@ impl EnvWithHandlerCfg { Self::new(Env::boxed(cfg.cfg_env, block, tx), cfg.handler_cfg) } + /// Returns the specification id. + pub const fn spec_id(&self) -> SpecId { + self.handler_cfg.spec_id + } + /// Enables the optimism handle register. #[cfg(feature = "optimism")] pub fn enable_optimism(&mut self) {