File tree Expand file tree Collapse file tree
common/src/main/java/com/bloxbean/cardano/client/common/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .bloxbean .cardano .client .common .model ;
2+
3+ import java .util .Objects ;
4+
5+ public class SlotConfig {
6+
7+ private int slotLength ;
8+ private long zeroSlot ;
9+ private long zeroTime ;
10+
11+ public SlotConfig (int slotLength , long zeroSlot , long zeroTime ) {
12+ this .slotLength = slotLength ;
13+ this .zeroSlot = zeroSlot ;
14+ this .zeroTime = zeroTime ;
15+ }
16+
17+ public int getSlotLength () {
18+ return slotLength ;
19+ }
20+
21+ public long getZeroSlot () {
22+ return zeroSlot ;
23+ }
24+
25+ public long getZeroTime () {
26+ return zeroTime ;
27+ }
28+
29+ @ Override
30+ public boolean equals (Object o ) {
31+ if (this == o ) return true ;
32+ if (o == null || getClass () != o .getClass ()) return false ;
33+ SlotConfig that = (SlotConfig ) o ;
34+ return slotLength == that .slotLength && zeroSlot == that .zeroSlot && zeroTime == that .zeroTime ;
35+ }
36+
37+ @ Override
38+ public int hashCode () {
39+ return Objects .hash (slotLength , zeroSlot , zeroTime );
40+ }
41+ }
Original file line number Diff line number Diff line change 1+ package com .bloxbean .cardano .client .common .model ;
2+
3+ public class SlotConfigs {
4+
5+ public static SlotConfig mainnet () {
6+ return new SlotConfig (1000 , 4492800L , 1596059091000L );
7+ }
8+
9+ public static SlotConfig preprod () {
10+ return new SlotConfig (1000 , 86400L , 1655769600000L );
11+ }
12+
13+ public static SlotConfig preview () {
14+ return new SlotConfig (1000 , 0L , 1666656000000L );
15+ }
16+
17+ }
You can’t perform that action at this time.
0 commit comments