whisky_common/models/
protocol.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4#[serde(rename_all = "camelCase")]
5pub struct Protocol {
6    pub epoch: i32,
7    pub min_fee_a: u64,
8    pub min_fee_b: u64,
9    pub max_block_size: i32,
10    pub max_tx_size: u32,
11    pub max_block_header_size: i32,
12    pub key_deposit: u64,
13    pub pool_deposit: u64,
14    pub decentralisation: f64,
15    pub min_pool_cost: String,
16    pub price_mem: f64,
17    pub price_step: f64,
18    pub max_tx_ex_mem: String,
19    pub max_tx_ex_steps: String,
20    pub max_block_ex_mem: String,
21    pub max_block_ex_steps: String,
22    pub max_val_size: u32,
23    pub collateral_percent: f64,
24    pub max_collateral_inputs: i32,
25    pub coins_per_utxo_size: u64,
26    pub min_fee_ref_script_cost_per_byte: u64,
27}
28
29impl Default for Protocol {
30    fn default() -> Self {
31        Protocol {
32            epoch: 0,
33            min_fee_a: 44,
34            min_fee_b: 155381,
35            max_block_size: 98304,
36            max_tx_size: 16384,
37            max_block_header_size: 1100,
38            key_deposit: 2000000,
39            pool_deposit: 500000000,
40            min_pool_cost: "340000000".to_string(),
41            price_mem: 0.0577,
42            price_step: 0.0000721,
43            max_tx_ex_mem: "16000000".to_string(),
44            max_tx_ex_steps: "10000000000".to_string(),
45            max_block_ex_mem: "80000000".to_string(),
46            max_block_ex_steps: "40000000000".to_string(),
47            max_val_size: 5000,
48            collateral_percent: 150.0,
49            max_collateral_inputs: 3,
50            coins_per_utxo_size: 4310,
51            min_fee_ref_script_cost_per_byte: 15,
52            decentralisation: 0.0,
53        }
54    }
55}