multiversx_sdk/data/
hyperblock.rs

1use serde::{Deserialize, Serialize};
2
3// HyperBlock holds a hyper block's details
4#[derive(Debug, Clone, Serialize, Deserialize)]
5#[serde(rename_all = "camelCase")]
6pub struct HyperBlock {
7    pub nonce: u64,
8    pub round: u64,
9    pub hash: String,
10    pub prev_block_hash: String,
11    pub epoch: u64,
12    pub num_txs: u64,
13    pub shard_blocks: Vec<ShardBlocks>,
14    pub timestamp: u64,
15    pub accumulated_fees: String,
16    pub developer_fees: String,
17    pub accumulated_fees_in_epoch: String,
18    pub developer_fees_in_epoch: String,
19}
20
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct ShardBlocks {
23    pub hash: String,
24    pub nonce: u64,
25    pub shard: u32,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct HyperBlockData {
30    pub hyperblock: HyperBlock,
31}
32
33#[derive(Debug, Clone, Serialize, Deserialize)]
34pub struct HyperBlockResponse {
35    pub data: Option<HyperBlockData>,
36    pub error: String,
37    pub code: String,
38}