dpp/block/finalized_epoch_info/v0/
mod.rs

1pub mod getters;
2
3use crate::fee::Credits;
4use crate::prelude::{BlockHeight, BlockHeightInterval, CoreBlockHeight, TimestampMillis};
5#[cfg(feature = "json-conversion")]
6use crate::serialization::json_safe_fields;
7use bincode::{Decode, Encode};
8use platform_value::Identifier;
9use serde::{Deserialize, Serialize};
10use std::collections::BTreeMap;
11
12/// Finalized Epoch information
13#[cfg_attr(feature = "json-conversion", json_safe_fields)]
14#[derive(Clone, Debug, PartialEq, Encode, Decode, Serialize, Deserialize)]
15#[serde(rename_all = "camelCase")]
16pub struct FinalizedEpochInfoV0 {
17    /// First block time
18    pub first_block_time: TimestampMillis,
19    /// First block height
20    pub first_block_height: BlockHeight,
21    /// Total blocks in epoch
22    pub total_blocks_in_epoch: BlockHeightInterval,
23    /// First core block height
24    pub first_core_block_height: CoreBlockHeight,
25    /// Last core block height
26    pub next_epoch_start_core_block_height: CoreBlockHeight,
27    /// Total processing fees
28    pub total_processing_fees: Credits,
29    /// Total distributed storage fees
30    pub total_distributed_storage_fees: Credits,
31    /// Total created storage fees
32    pub total_created_storage_fees: Credits,
33    /// Total rewards given from core subsidy
34    pub core_block_rewards: Credits,
35    /// Block proposers
36    #[cfg_attr(
37        feature = "json-conversion",
38        serde(with = "crate::serialization::json::safe_integer_map::json_safe_identifier_u64_map")
39    )]
40    pub block_proposers: BTreeMap<Identifier, u64>,
41    /// Fee multiplier that you would divide by 1000 to get float value
42    pub fee_multiplier_permille: u64,
43    /// Protocol version
44    pub protocol_version: u32,
45}