loom_rpc_handler/dto/
block.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::Serialize;
use utoipa::ToSchema;

#[derive(Debug, Serialize)]
#[serde(tag = "type", rename_all = "SCREAMING_SNAKE_CASE")]
pub enum WebSocketMessage {
    BlockHeader(BlockHeader),
}

#[derive(Debug, Serialize, ToSchema)]
pub struct BlockHeader {
    pub number: u64,
    pub timestamp: u64,
    pub base_fee_per_gas: Option<u64>,
    pub next_block_base_fee: u64,
}