@@ -71,7 +71,7 @@ pub struct SlotCalculator {
7171}
7272
7373impl SlotCalculator {
74- /// Creates a new slot calculator.
74+ /// Create a new slot calculator.
7575 pub const fn new ( start_timestamp : u64 , slot_offset : usize , slot_duration : u64 ) -> Self {
7676 Self {
7777 start_timestamp,
@@ -80,7 +80,7 @@ impl SlotCalculator {
8080 }
8181 }
8282
83- /// Creates a new slot calculator for Holesky.
83+ /// Create a new slot calculator for Holesky.
8484 pub const fn holesky ( ) -> Self {
8585 // begin slot calculation for Holesky from block number 1, slot number 2, timestamp 1695902424
8686 // because of a strange 324 second gap between block 0 and 1 which
@@ -92,7 +92,16 @@ impl SlotCalculator {
9292 }
9393 }
9494
95- /// Creates a new slot calculator for Pecorino host network.
95+ /// Create a new slot calculator for Parmigiana host network.
96+ pub const fn parmigiana_host ( ) -> Self {
97+ Self {
98+ start_timestamp : 1765226348 ,
99+ slot_offset : 0 ,
100+ slot_duration : 12 ,
101+ }
102+ }
103+
104+ /// Create a new slot calculator for Pecorino host network.
96105 pub const fn pecorino_host ( ) -> Self {
97106 Self {
98107 start_timestamp : 1754584265 ,
@@ -101,7 +110,7 @@ impl SlotCalculator {
101110 }
102111 }
103112
104- /// Creates a new slot calculator for Ethereum mainnet.
113+ /// Create a new slot calculator for Ethereum mainnet.
105114 pub const fn mainnet ( ) -> Self {
106115 Self {
107116 start_timestamp : 1663224179 ,
@@ -325,9 +334,11 @@ impl FromEnv for SlotCalculator {
325334impl From < KnownChains > for SlotCalculator {
326335 fn from ( value : KnownChains ) -> Self {
327336 match value {
337+ KnownChains :: Mainnet => SlotCalculator :: mainnet ( ) ,
338+ KnownChains :: Parmigiana => SlotCalculator :: parmigiana_host ( ) ,
339+ #[ allow( deprecated) ]
328340 KnownChains :: Pecorino => SlotCalculator :: pecorino_host ( ) ,
329341 KnownChains :: Test => SlotCalculator :: new ( 12 , 0 , 12 ) ,
330- KnownChains :: Mainnet => SlotCalculator :: mainnet ( ) ,
331342 }
332343 }
333344}
0 commit comments