1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use mina_serialization_types_macros::AutoFrom;
use serde::{Deserialize, Serialize};
use versioned::Versioned;
use crate::{
common::U32Json,
v1::{GlobalSlotNumberV1, LengthV1},
};
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
pub struct GlobalSlot {
pub slot_number: GlobalSlotNumberV1,
pub slots_per_epoch: LengthV1,
}
pub type GlobalSlotV1 = Versioned<Versioned<GlobalSlot, 1>, 1>;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, AutoFrom)]
#[auto_from(GlobalSlot)]
pub struct GlobalSlotJson {
pub slot_number: U32Json,
pub slots_per_epoch: U32Json,
}