Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use chrono::NaiveDateTime; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct QuickVitBackendParameters { | ||
pub initials: Vec<u64>, | ||
pub vote_start: u64, | ||
pub vote_tally: u64, | ||
pub tally_end: u64, | ||
pub vote_start_timestamp: Option<NaiveDateTime>, | ||
pub tally_start_timestamp: Option<NaiveDateTime>, | ||
pub tally_end_timestamp: Option<NaiveDateTime>, | ||
pub next_vote_start_time: Option<NaiveDateTime>, | ||
pub proposals: u32, | ||
pub slot_duration: u8, | ||
pub slots_per_epoch: u32, | ||
pub voting_power: u64, | ||
pub fund_name: String, | ||
pub private: bool, | ||
} | ||
|
||
impl Default for QuickVitBackendParameters { | ||
fn default() -> Self { | ||
let initials: Vec<u64> = std::iter::from_fn(|| Some(10_000)).take(10).collect(); | ||
Self { | ||
initials, | ||
vote_start: 1, | ||
vote_tally: 2, | ||
tally_end: 3, | ||
proposals: 100, | ||
slot_duration: 20, | ||
slots_per_epoch: 30, | ||
voting_power: 8000_000000, | ||
vote_start_timestamp: None, | ||
tally_start_timestamp: None, | ||
tally_end_timestamp: None, | ||
next_vote_start_time: None, | ||
fund_name: "fund_3".to_owned(), | ||
private: false, | ||
} | ||
} | ||
} |