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
use crate::{builder::VotePlanKey, config::CommitteeTemplate};
use chain_impl_mockchain::certificate::Proposals;
use jormungandr_lib::interfaces::{BlockDate, TokenIdentifier};
use serde::Deserialize;

#[derive(Clone, Debug, Deserialize)]
pub struct VotePlanTemplate {
    pub committees: Vec<CommitteeTemplate>,
    pub vote_start: BlockDate,
    pub vote_end: BlockDate,
    pub committee_end: BlockDate,
    #[serde(with = "jormungandr_lib::interfaces::serde_proposals")]
    pub proposals: Proposals,
    #[serde(
        with = "jormungandr_lib::interfaces::serde_committee_member_public_keys",
        default = "Vec::new"
    )]
    pub committee_member_public_keys: Vec<chain_vote::MemberPublicKey>,
    pub voting_token: TokenIdentifier,
    #[serde(flatten)]
    pub vote_plan_key: VotePlanKey,
    pub private: Option<PrivateParameters>,
}

#[derive(Clone, Debug, Deserialize)]
pub struct PrivateParameters {
    pub crs: Option<String>,
    pub threshold: Option<usize>,
}