feat: add osaka hardfork (#11984)

This commit is contained in:
Oliver
2024-10-23 16:29:32 +02:00
committed by GitHub
parent e98a050dc7
commit fa30a4f758
5 changed files with 21 additions and 2 deletions

View File

@ -617,6 +617,7 @@ impl From<Genesis> for ChainSpec {
(EthereumHardfork::Shanghai.boxed(), genesis.config.shanghai_time),
(EthereumHardfork::Cancun.boxed(), genesis.config.cancun_time),
(EthereumHardfork::Prague.boxed(), genesis.config.prague_time),
(EthereumHardfork::Osaka.boxed(), genesis.config.osaka_time),
];
let mut time_hardforks = time_hardfork_opts
@ -864,6 +865,13 @@ impl ChainSpecBuilder {
self
}
/// Enable Osaka at genesis.
pub fn osaka_activated(mut self) -> Self {
self = self.prague_activated();
self.hardforks.insert(EthereumHardfork::Osaka, ForkCondition::Timestamp(0));
self
}
/// Build the resulting [`ChainSpec`].
///
/// # Panics