whisky_provider/blockfrost/models/
epoch.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
4pub struct EpochParam {
5    /// Epoch number
6    #[serde(rename = "epoch")]
7    pub epoch: i32,
8    /// The linear factor for the minimum fee calculation for given epoch
9    #[serde(rename = "min_fee_a")]
10    pub min_fee_a: i32,
11    /// The constant factor for the minimum fee calculation
12    #[serde(rename = "min_fee_b")]
13    pub min_fee_b: i32,
14    /// Maximum block body size in Bytes
15    #[serde(rename = "max_block_size")]
16    pub max_block_size: i32,
17    /// Maximum transaction size
18    #[serde(rename = "max_tx_size")]
19    pub max_tx_size: i32,
20    /// Maximum block header size
21    #[serde(rename = "max_block_header_size")]
22    pub max_block_header_size: i32,
23    /// The amount of a key registration deposit in Lovelaces
24    #[serde(rename = "key_deposit")]
25    pub key_deposit: String,
26    /// The amount of a pool registration deposit in Lovelaces
27    #[serde(rename = "pool_deposit")]
28    pub pool_deposit: String,
29    /// Epoch bound on pool retirement
30    #[serde(rename = "e_max")]
31    pub e_max: i32,
32    /// Desired number of pools
33    #[serde(rename = "n_opt")]
34    pub n_opt: i32,
35    /// Pool pledge influence
36    #[serde(rename = "a0")]
37    pub a0: f64,
38    /// Monetary expansion
39    #[serde(rename = "rho")]
40    pub rho: f64,
41    /// Treasury expansion
42    #[serde(rename = "tau")]
43    pub tau: f64,
44    /// Percentage of blocks produced by federated nodes
45    #[serde(rename = "decentralisation_param")]
46    pub decentralisation_param: f64,
47    /// Seed for extra entropy
48    #[serde(rename = "extra_entropy", deserialize_with = "Option::deserialize")]
49    pub extra_entropy: Option<String>,
50    /// Accepted protocol major version
51    #[serde(rename = "protocol_major_ver")]
52    pub protocol_major_ver: i32,
53    /// Accepted protocol minor version
54    #[serde(rename = "protocol_minor_ver")]
55    pub protocol_minor_ver: i32,
56    /// Minimum UTXO value. Use `coins_per_utxo_size` for Alonzo and later eras
57    #[serde(rename = "min_utxo")]
58    pub min_utxo: String,
59    /// Minimum stake cost forced on the pool
60    #[serde(rename = "min_pool_cost")]
61    pub min_pool_cost: String,
62    /// Epoch number only used once
63    #[serde(rename = "nonce")]
64    pub nonce: String,
65    /// Cost models parameters for Plutus Core scripts
66    #[serde(rename = "cost_models", deserialize_with = "Option::deserialize")]
67    pub cost_models: Option<std::collections::HashMap<String, serde_json::Value>>,
68    /// Cost models parameters for Plutus Core scripts in raw list form
69    pub cost_models_raw: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
70    /// The per word cost of script memory usage
71    #[serde(rename = "price_mem", deserialize_with = "Option::deserialize")]
72    pub price_mem: Option<f64>,
73    /// The cost of script execution step usage
74    #[serde(rename = "price_step", deserialize_with = "Option::deserialize")]
75    pub price_step: Option<f64>,
76    /// The maximum number of execution memory allowed to be used in a single transaction
77    #[serde(rename = "max_tx_ex_mem", deserialize_with = "Option::deserialize")]
78    pub max_tx_ex_mem: Option<String>,
79    /// The maximum number of execution steps allowed to be used in a single transaction
80    #[serde(rename = "max_tx_ex_steps", deserialize_with = "Option::deserialize")]
81    pub max_tx_ex_steps: Option<String>,
82    /// The maximum number of execution memory allowed to be used in a single block
83    #[serde(rename = "max_block_ex_mem", deserialize_with = "Option::deserialize")]
84    pub max_block_ex_mem: Option<String>,
85    /// The maximum number of execution steps allowed to be used in a single block
86    #[serde(
87        rename = "max_block_ex_steps",
88        deserialize_with = "Option::deserialize"
89    )]
90    pub max_block_ex_steps: Option<String>,
91    /// The maximum Val size
92    #[serde(rename = "max_val_size", deserialize_with = "Option::deserialize")]
93    pub max_val_size: Option<String>,
94    /// The percentage of the transactions fee which must be provided as collateral when including non-native scripts
95    #[serde(
96        rename = "collateral_percent",
97        deserialize_with = "Option::deserialize"
98    )]
99    pub collateral_percent: Option<i32>,
100    /// The maximum number of collateral inputs allowed in a transaction
101    #[serde(
102        rename = "max_collateral_inputs",
103        deserialize_with = "Option::deserialize"
104    )]
105    pub max_collateral_inputs: Option<i32>,
106    /// Cost per UTxO word for Alonzo. Cost per UTxO byte for Babbage and later.
107    #[serde(
108        rename = "coins_per_utxo_size",
109        deserialize_with = "Option::deserialize"
110    )]
111    pub coins_per_utxo_size: Option<String>,
112    /// Cost per UTxO word for Alonzo. Cost per UTxO byte for Babbage and later.
113    #[serde(
114        rename = "coins_per_utxo_word",
115        deserialize_with = "Option::deserialize"
116    )]
117    pub coins_per_utxo_word: Option<String>,
118    /// Pool Voting threshold for motion of no-confidence.
119    #[serde(
120        rename = "pvt_motion_no_confidence",
121        deserialize_with = "Option::deserialize"
122    )]
123    pub pvt_motion_no_confidence: Option<f64>,
124    /// Pool Voting threshold for new committee/threshold (normal state).
125    #[serde(
126        rename = "pvt_committee_normal",
127        deserialize_with = "Option::deserialize"
128    )]
129    pub pvt_committee_normal: Option<f64>,
130    /// Pool Voting threshold for new committee/threshold (state of no-confidence).
131    #[serde(
132        rename = "pvt_committee_no_confidence",
133        deserialize_with = "Option::deserialize"
134    )]
135    pub pvt_committee_no_confidence: Option<f64>,
136    /// Pool Voting threshold for hard-fork initiation.
137    #[serde(
138        rename = "pvt_hard_fork_initiation",
139        deserialize_with = "Option::deserialize"
140    )]
141    pub pvt_hard_fork_initiation: Option<f64>,
142    /// DRep Vote threshold for motion of no-confidence.
143    #[serde(
144        rename = "dvt_motion_no_confidence",
145        deserialize_with = "Option::deserialize"
146    )]
147    pub dvt_motion_no_confidence: Option<f64>,
148    /// DRep Vote threshold for new committee/threshold (normal state).
149    #[serde(
150        rename = "dvt_committee_normal",
151        deserialize_with = "Option::deserialize"
152    )]
153    pub dvt_committee_normal: Option<f64>,
154    /// DRep Vote threshold for new committee/threshold (state of no-confidence).
155    #[serde(
156        rename = "dvt_committee_no_confidence",
157        deserialize_with = "Option::deserialize"
158    )]
159    pub dvt_committee_no_confidence: Option<f64>,
160    /// DRep Vote threshold for update to the Constitution.
161    #[serde(
162        rename = "dvt_update_to_constitution",
163        deserialize_with = "Option::deserialize"
164    )]
165    pub dvt_update_to_constitution: Option<f64>,
166    /// DRep Vote threshold for hard-fork initiation.
167    #[serde(
168        rename = "dvt_hard_fork_initiation",
169        deserialize_with = "Option::deserialize"
170    )]
171    pub dvt_hard_fork_initiation: Option<f64>,
172    /// DRep Vote threshold for protocol parameter changes, network group.
173    #[serde(
174        rename = "dvt_p_p_network_group",
175        deserialize_with = "Option::deserialize"
176    )]
177    pub dvt_p_p_network_group: Option<f64>,
178    /// DRep Vote threshold for protocol parameter changes, economic group.
179    #[serde(
180        rename = "dvt_p_p_economic_group",
181        deserialize_with = "Option::deserialize"
182    )]
183    pub dvt_p_p_economic_group: Option<f64>,
184    /// DRep Vote threshold for protocol parameter changes, technical group.
185    #[serde(
186        rename = "dvt_p_p_technical_group",
187        deserialize_with = "Option::deserialize"
188    )]
189    pub dvt_p_p_technical_group: Option<f64>,
190    /// DRep Vote threshold for protocol parameter changes, governance group.
191    #[serde(rename = "dvt_p_p_gov_group", deserialize_with = "Option::deserialize")]
192    pub dvt_p_p_gov_group: Option<f64>,
193    /// DRep Vote threshold for treasury withdrawal.
194    #[serde(
195        rename = "dvt_treasury_withdrawal",
196        deserialize_with = "Option::deserialize"
197    )]
198    pub dvt_treasury_withdrawal: Option<f64>,
199    /// Minimal constitutional committee size.
200    #[serde(
201        rename = "committee_min_size",
202        deserialize_with = "Option::deserialize"
203    )]
204    pub committee_min_size: Option<String>,
205    /// Constitutional committee term limits.
206    #[serde(
207        rename = "committee_max_term_length",
208        deserialize_with = "Option::deserialize"
209    )]
210    pub committee_max_term_length: Option<String>,
211    /// Governance action expiration.
212    #[serde(
213        rename = "gov_action_lifetime",
214        deserialize_with = "Option::deserialize"
215    )]
216    pub gov_action_lifetime: Option<String>,
217    /// Governance action deposit.
218    #[serde(
219        rename = "gov_action_deposit",
220        deserialize_with = "Option::deserialize"
221    )]
222    pub gov_action_deposit: Option<String>,
223    /// DRep deposit amount.
224    #[serde(rename = "drep_deposit", deserialize_with = "Option::deserialize")]
225    pub drep_deposit: Option<String>,
226    /// DRep activity period.
227    #[serde(rename = "drep_activity", deserialize_with = "Option::deserialize")]
228    pub drep_activity: Option<String>,
229    /// Pool Voting threshold for security-relevant protocol parameters changes. Renamed to pvt_p_p_security_group.
230    #[serde(
231        rename = "pvtpp_security_group",
232        deserialize_with = "Option::deserialize"
233    )]
234    pub pvtpp_security_group: Option<f64>,
235    /// Pool Voting threshold for security-relevant protocol parameters changes.
236    #[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}