Skip to main content

cml_chain/genesis/byron/
raw.rs

1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4use super::config;
5
6#[allow(non_snake_case)]
7#[derive(Serialize, Deserialize, Debug)]
8pub struct GenesisData {
9    pub avvmDistr: HashMap<String, String>,
10    pub nonAvvmBalances: HashMap<String, String>,
11    pub bootStakeholders: HashMap<String, config::BootStakeWeight>,
12    pub heavyDelegation: HashMap<String, HeavyDelegation>,
13    pub protocolConsts: ProtocolConsts,
14    pub startTime: u64,
15    pub blockVersionData: BlockVersionData,
16}
17
18#[allow(non_snake_case)]
19#[derive(Serialize, Deserialize, Debug)]
20pub struct ProtocolConsts {
21    pub k: usize,
22    pub protocolMagic: u32,
23    //pub vssMaxTTL: u32,
24    //pub vssMinTTL: u32,
25}
26
27#[allow(non_snake_case)]
28#[derive(Serialize, Deserialize, Debug)]
29pub struct BlockVersionData {
30    //pub heavyDelThd: String,
31    //pub maxBlockSize: String,
32    //pub maxHeaderSize: String,
33    //pub maxProposalSize: String,
34    //pub maxTxSize: String,
35    //pub mpcThd: String,
36    //pub scriptVersion: u32,
37    pub slotDuration: String,
38    //pub softforkRule: SoftforkRule,
39    pub txFeePolicy: TxFeePolicy,
40    //pub unlockStakeEpoch: String,
41    //pub updateImplicit: String,
42    //pub updateProposalThd: String,
43    //pub updateVoteThd: String,
44}
45
46#[allow(non_snake_case)]
47#[derive(Serialize, Deserialize, Debug)]
48pub struct TxFeePolicy {
49    pub summand: String,
50    pub multiplier: String,
51}
52
53#[allow(non_snake_case)]
54#[derive(Serialize, Deserialize, Debug)]
55pub struct SoftforkRule {
56    pub initThd: String,
57    pub minThd: String,
58    pub thdDecrement: String,
59}
60
61#[allow(non_snake_case)]
62#[derive(Serialize, Deserialize, Debug)]
63pub struct HeavyDelegation {
64    pub issuerPk: String,
65    pub delegatePk: String,
66    pub cert: String,
67}