whisky_provider/blockfrost/models/
epoch.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
4pub struct EpochParam {
5 #[serde(rename = "epoch")]
7 pub epoch: i32,
8 #[serde(rename = "min_fee_a")]
10 pub min_fee_a: i32,
11 #[serde(rename = "min_fee_b")]
13 pub min_fee_b: i32,
14 #[serde(rename = "max_block_size")]
16 pub max_block_size: i32,
17 #[serde(rename = "max_tx_size")]
19 pub max_tx_size: i32,
20 #[serde(rename = "max_block_header_size")]
22 pub max_block_header_size: i32,
23 #[serde(rename = "key_deposit")]
25 pub key_deposit: String,
26 #[serde(rename = "pool_deposit")]
28 pub pool_deposit: String,
29 #[serde(rename = "e_max")]
31 pub e_max: i32,
32 #[serde(rename = "n_opt")]
34 pub n_opt: i32,
35 #[serde(rename = "a0")]
37 pub a0: f64,
38 #[serde(rename = "rho")]
40 pub rho: f64,
41 #[serde(rename = "tau")]
43 pub tau: f64,
44 #[serde(rename = "decentralisation_param")]
46 pub decentralisation_param: f64,
47 #[serde(rename = "extra_entropy", deserialize_with = "Option::deserialize")]
49 pub extra_entropy: Option<String>,
50 #[serde(rename = "protocol_major_ver")]
52 pub protocol_major_ver: i32,
53 #[serde(rename = "protocol_minor_ver")]
55 pub protocol_minor_ver: i32,
56 #[serde(rename = "min_utxo")]
58 pub min_utxo: String,
59 #[serde(rename = "min_pool_cost")]
61 pub min_pool_cost: String,
62 #[serde(rename = "nonce")]
64 pub nonce: String,
65 #[serde(rename = "cost_models", deserialize_with = "Option::deserialize")]
67 pub cost_models: Option<std::collections::HashMap<String, serde_json::Value>>,
68 pub cost_models_raw: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
70 #[serde(rename = "price_mem", deserialize_with = "Option::deserialize")]
72 pub price_mem: Option<f64>,
73 #[serde(rename = "price_step", deserialize_with = "Option::deserialize")]
75 pub price_step: Option<f64>,
76 #[serde(rename = "max_tx_ex_mem", deserialize_with = "Option::deserialize")]
78 pub max_tx_ex_mem: Option<String>,
79 #[serde(rename = "max_tx_ex_steps", deserialize_with = "Option::deserialize")]
81 pub max_tx_ex_steps: Option<String>,
82 #[serde(rename = "max_block_ex_mem", deserialize_with = "Option::deserialize")]
84 pub max_block_ex_mem: Option<String>,
85 #[serde(
87 rename = "max_block_ex_steps",
88 deserialize_with = "Option::deserialize"
89 )]
90 pub max_block_ex_steps: Option<String>,
91 #[serde(rename = "max_val_size", deserialize_with = "Option::deserialize")]
93 pub max_val_size: Option<String>,
94 #[serde(
96 rename = "collateral_percent",
97 deserialize_with = "Option::deserialize"
98 )]
99 pub collateral_percent: Option<i32>,
100 #[serde(
102 rename = "max_collateral_inputs",
103 deserialize_with = "Option::deserialize"
104 )]
105 pub max_collateral_inputs: Option<i32>,
106 #[serde(
108 rename = "coins_per_utxo_size",
109 deserialize_with = "Option::deserialize"
110 )]
111 pub coins_per_utxo_size: Option<String>,
112 #[serde(
114 rename = "coins_per_utxo_word",
115 deserialize_with = "Option::deserialize"
116 )]
117 pub coins_per_utxo_word: Option<String>,
118 #[serde(
120 rename = "pvt_motion_no_confidence",
121 deserialize_with = "Option::deserialize"
122 )]
123 pub pvt_motion_no_confidence: Option<f64>,
124 #[serde(
126 rename = "pvt_committee_normal",
127 deserialize_with = "Option::deserialize"
128 )]
129 pub pvt_committee_normal: Option<f64>,
130 #[serde(
132 rename = "pvt_committee_no_confidence",
133 deserialize_with = "Option::deserialize"
134 )]
135 pub pvt_committee_no_confidence: Option<f64>,
136 #[serde(
138 rename = "pvt_hard_fork_initiation",
139 deserialize_with = "Option::deserialize"
140 )]
141 pub pvt_hard_fork_initiation: Option<f64>,
142 #[serde(
144 rename = "dvt_motion_no_confidence",
145 deserialize_with = "Option::deserialize"
146 )]
147 pub dvt_motion_no_confidence: Option<f64>,
148 #[serde(
150 rename = "dvt_committee_normal",
151 deserialize_with = "Option::deserialize"
152 )]
153 pub dvt_committee_normal: Option<f64>,
154 #[serde(
156 rename = "dvt_committee_no_confidence",
157 deserialize_with = "Option::deserialize"
158 )]
159 pub dvt_committee_no_confidence: Option<f64>,
160 #[serde(
162 rename = "dvt_update_to_constitution",
163 deserialize_with = "Option::deserialize"
164 )]
165 pub dvt_update_to_constitution: Option<f64>,
166 #[serde(
168 rename = "dvt_hard_fork_initiation",
169 deserialize_with = "Option::deserialize"
170 )]
171 pub dvt_hard_fork_initiation: Option<f64>,
172 #[serde(
174 rename = "dvt_p_p_network_group",
175 deserialize_with = "Option::deserialize"
176 )]
177 pub dvt_p_p_network_group: Option<f64>,
178 #[serde(
180 rename = "dvt_p_p_economic_group",
181 deserialize_with = "Option::deserialize"
182 )]
183 pub dvt_p_p_economic_group: Option<f64>,
184 #[serde(
186 rename = "dvt_p_p_technical_group",
187 deserialize_with = "Option::deserialize"
188 )]
189 pub dvt_p_p_technical_group: Option<f64>,
190 #[serde(rename = "dvt_p_p_gov_group", deserialize_with = "Option::deserialize")]
192 pub dvt_p_p_gov_group: Option<f64>,
193 #[serde(
195 rename = "dvt_treasury_withdrawal",
196 deserialize_with = "Option::deserialize"
197 )]
198 pub dvt_treasury_withdrawal: Option<f64>,
199 #[serde(
201 rename = "committee_min_size",
202 deserialize_with = "Option::deserialize"
203 )]
204 pub committee_min_size: Option<String>,
205 #[serde(
207 rename = "committee_max_term_length",
208 deserialize_with = "Option::deserialize"
209 )]
210 pub committee_max_term_length: Option<String>,
211 #[serde(
213 rename = "gov_action_lifetime",
214 deserialize_with = "Option::deserialize"
215 )]
216 pub gov_action_lifetime: Option<String>,
217 #[serde(
219 rename = "gov_action_deposit",
220 deserialize_with = "Option::deserialize"
221 )]
222 pub gov_action_deposit: Option<String>,
223 #[serde(rename = "drep_deposit", deserialize_with = "Option::deserialize")]
225 pub drep_deposit: Option<String>,
226 #[serde(rename = "drep_activity", deserialize_with = "Option::deserialize")]
228 pub drep_activity: Option<String>,
229 #[serde(
231 rename = "pvtpp_security_group",
232 deserialize_with = "Option::deserialize"
233 )]
234 pub pvtpp_security_group: Option<f64>,
235 #[serde(
237 rename = "pvt_p_p_security_group",
238 deserialize_with = "Option::deserialize"
239 )]
240 pub pvt_p_p_security_group: Option<f64>,
241 #[serde(
242 rename = "min_fee_ref_script_cost_per_byte",
243 deserialize_with = "Option::deserialize"
244 )]
245 pub min_fee_ref_script_cost_per_byte: Option<f64>,
246}