whisky_provider/maestro/models/
protocol_parameters.rs1use super::*;
2use serde::Deserialize;
3use std::collections::HashMap;
4
5#[derive(Deserialize, Debug, Clone)]
6pub struct Bytes {
7 pub bytes: u64,
8}
9
10#[derive(Deserialize, Debug, Clone)]
11pub struct ExUnits {
12 pub memory: u64,
13 pub cpu: u64,
14}
15#[derive(Deserialize, Debug, Clone)]
16pub struct LovelaceAmount {
17 pub lovelace: u64,
18}
19
20#[derive(Deserialize, Debug, Clone)]
21pub struct ProtocolVersion {
22 pub major: u64,
23 pub minor: u64,
24}
25
26#[derive(Deserialize, Debug, Clone)]
27pub struct PlutusCostModels {
28 pub plutus_v1: Vec<u64>,
29 pub plutus_v2: Vec<u64>,
30}
31
32#[derive(Deserialize, Debug, Clone)]
33pub struct ScriptExecutionPrices {
34 pub memory: String,
35 pub cpu: String,
36}
37
38#[derive(Deserialize, Debug, Clone)]
39pub struct ProtocolParametersData {
40 pub collateral_percentage: u64,
41 pub constitutional_committee_max_term_length: i64,
42 pub constitutional_committee_min_size: i64,
43 pub delegate_representative_deposit: HashMap<String, serde_json::Value>,
44 pub delegate_representative_max_idle_time: i64,
45 pub delegate_representative_voting_thresholds: HashMap<String, serde_json::Value>,
46 pub desired_number_of_stake_pools: u64,
47 pub governance_action_deposit: HashMap<String, serde_json::Value>,
48 pub governance_action_lifetime: i64,
49 pub max_block_body_size: Bytes,
50 pub max_block_header_size: Bytes,
51 pub max_collateral_inputs: u64,
52 pub max_execution_units_per_block: ExUnits,
53 pub max_execution_units_per_transaction: ExUnits,
54 pub max_reference_scripts_size: HashMap<String, serde_json::Value>,
55 pub max_transaction_size: Bytes,
56 pub max_value_size: Bytes,
57 pub min_fee_coefficient: u64,
58 pub min_fee_constant: HashMap<String, serde_json::Value>,
59 pub min_fee_reference_scripts: HashMap<String, serde_json::Value>,
60 pub min_stake_pool_cost: HashMap<String, serde_json::Value>,
61 pub min_utxo_deposit_coefficient: u64,
62 pub min_utxo_deposit_constant: HashMap<String, serde_json::Value>,
63 pub monetary_expansion: String,
64 pub plutus_cost_models: PlutusCostModels,
65 pub script_execution_prices: ScriptExecutionPrices,
66 pub stake_credential_deposit: HashMap<String, serde_json::Value>,
67 pub stake_pool_deposit: HashMap<String, serde_json::Value>,
68 pub stake_pool_pledge_influence: String,
69 pub stake_pool_retirement_epoch_bound: u64,
70 pub stake_pool_voting_thresholds: HashMap<String, serde_json::Value>,
71 pub treasury_expansion: String,
72 pub version: ProtocolVersion,
73}
74
75#[derive(Deserialize, Debug, Clone)]
76pub struct ProtocolParameters {
77 pub data: ProtocolParametersData,
78 pub last_updated: LastUpdated,
79}