Skip to content

Commit 47251a3

Browse files
authored
chore: remove mainnet osaka timestamps (#71)
* chore: remove mainnet osaka timestamps * doc_auto_cfg * fix
1 parent 607f3e1 commit 47251a3

4 files changed

Lines changed: 4 additions & 18 deletions

File tree

crates/hardforks/src/ethereum/mainnet.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,3 @@ pub const MAINNET_SHANGHAI_TIMESTAMP: u64 = 1_681_338_455;
7979
pub const MAINNET_CANCUN_TIMESTAMP: u64 = 1_710_338_135;
8080
/// Prague hard fork activation timestamp is 1746612311.
8181
pub const MAINNET_PRAGUE_TIMESTAMP: u64 = 1_746_612_311;
82-
/// Osaka hard fork activation timestamp is 1764798551.
83-
pub const MAINNET_OSAKA_TIMESTAMP: u64 = 1_764_798_551;
84-
85-
/// BPO1 hardfork activation timestamp
86-
pub const MAINNET_BPO1_TIMESTAMP: u64 = 1765978199;
87-
88-
/// BPO2 hardfork activation timestamp
89-
pub const MAINNET_BPO2_TIMESTAMP: u64 = 1767747671;

crates/hardforks/src/hardfork/ethereum.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ impl EthereumHardfork {
274274
Self::Shanghai => Some(MAINNET_SHANGHAI_TIMESTAMP),
275275
Self::Cancun => Some(MAINNET_CANCUN_TIMESTAMP),
276276
Self::Prague => Some(MAINNET_PRAGUE_TIMESTAMP),
277-
Self::Osaka => Some(MAINNET_OSAKA_TIMESTAMP),
278277
// upcoming hardforks
279278
_ => None,
280279
}
@@ -410,7 +409,7 @@ impl EthereumHardfork {
410409
}
411410

412411
/// Ethereum mainnet list of hardforks.
413-
pub const fn mainnet() -> [(Self, ForkCondition); 21] {
412+
pub const fn mainnet() -> [(Self, ForkCondition); 18] {
414413
[
415414
(Self::Frontier, ForkCondition::Block(MAINNET_FRONTIER_BLOCK)),
416415
(Self::Homestead, ForkCondition::Block(MAINNET_HOMESTEAD_BLOCK)),
@@ -437,9 +436,6 @@ impl EthereumHardfork {
437436
(Self::Shanghai, ForkCondition::Timestamp(MAINNET_SHANGHAI_TIMESTAMP)),
438437
(Self::Cancun, ForkCondition::Timestamp(MAINNET_CANCUN_TIMESTAMP)),
439438
(Self::Prague, ForkCondition::Timestamp(MAINNET_PRAGUE_TIMESTAMP)),
440-
(Self::Osaka, ForkCondition::Timestamp(MAINNET_OSAKA_TIMESTAMP)),
441-
(Self::Bpo1, ForkCondition::Timestamp(MAINNET_BPO1_TIMESTAMP)),
442-
(Self::Bpo2, ForkCondition::Timestamp(MAINNET_BPO2_TIMESTAMP)),
443439
]
444440
}
445441

@@ -616,8 +612,7 @@ impl EthereumHardfork {
616612
_i if timestamp < MAINNET_SHANGHAI_TIMESTAMP => Self::Paris,
617613
_i if timestamp < MAINNET_CANCUN_TIMESTAMP => Self::Shanghai,
618614
_i if timestamp < MAINNET_PRAGUE_TIMESTAMP => Self::Cancun,
619-
_i if timestamp < MAINNET_OSAKA_TIMESTAMP => Self::Prague,
620-
_ => Self::Osaka,
615+
_ => Self::Prague,
621616
}),
622617
NamedChain::Sepolia => Some(match timestamp {
623618
_i if timestamp < SEPOLIA_PARIS_TIMESTAMP => Self::London,
@@ -934,7 +929,6 @@ mod tests {
934929
(Chain::mainnet(), MAINNET_SHANGHAI_TIMESTAMP, EthereumHardfork::Shanghai),
935930
(Chain::mainnet(), MAINNET_CANCUN_TIMESTAMP, EthereumHardfork::Cancun),
936931
(Chain::mainnet(), MAINNET_PRAGUE_TIMESTAMP, EthereumHardfork::Prague),
937-
(Chain::mainnet(), MAINNET_OSAKA_TIMESTAMP, EthereumHardfork::Osaka),
938932
// Sepolia
939933
// At block 0: London
940934
(Chain::sepolia(), SEPOLIA_PARIS_TIMESTAMP - 1, EthereumHardfork::London),

crates/hardforks/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
55
)]
66
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
7-
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
7+
#![cfg_attr(docsrs, feature(doc_cfg))]
88
#![no_std]
99

1010
extern crate alloc;

crates/op-hardforks/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
55
)]
66
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
7-
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
7+
#![cfg_attr(docsrs, feature(doc_cfg))]
88
#![no_std]
99

1010
extern crate alloc;

0 commit comments

Comments
 (0)