1use alloy_eips::BlockNumHash;
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "camelCase")]
11pub struct SafeHeadResponse {
12 pub l1_block: BlockNumHash,
14 pub safe_head: BlockNumHash,
16}
17
18#[cfg(test)]
19mod tests {
20 use super::*;
21
22 #[test]
24 fn test_safe_head_response() {
25 let s = r#"{"l1Block":{"hash":"0x7de331305c2bb3e5642a2adcb9c003cc67cefc7b05a3da5a6a4b12cf3af15407","number":6834391},"safeHead":{"hash":"0xa5e5ec1ade7d6fef209f73861bf0080950cde74c4b0c07823983eb5225e282a8","number":18266679}}"#;
26 let _response: SafeHeadResponse = serde_json::from_str(s).unwrap();
27 }
28}