multiversx_sdk/data/
network_economics.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use serde::{Deserialize, Serialize};

// NetworkEconomics holds the network economics details
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NetworkEconomics {
    #[serde(rename = "erd_dev_rewards")]
    pub dev_rewards: String,
    #[serde(rename = "erd_epoch_for_economics_data")]
    pub epoch_for_economics_data: u32,
    #[serde(rename = "erd_inflation")]
    pub inflation: String,
    #[serde(rename = "erd_total_fees")]
    pub total_fees: String,
    #[serde(rename = "erd_total_base_staked_value")]
    pub total_base_staked_value: String,
    #[serde(rename = "erd_total_supply")]
    pub total_supply: String,
    #[serde(rename = "erd_total_top_up_value")]
    pub total_top_up_value: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NetworkEconomicsData {
    pub metrics: NetworkEconomics,
}

// NetworkEconomicsResponse holds the network economics endpoint response
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NetworkEconomicsResponse {
    pub error: String,
    pub code: String,
    pub data: Option<NetworkEconomicsData>,
}