-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 14 additions & 1 deletion
15
relayer/crates/starknet-chain-components/src/types/status.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
use core::fmt::{Display, Formatter, Result}; | ||
|
||
use hermes_cosmos_chain_components::types::status::Time; | ||
use serde::Serialize; | ||
use starknet::core::types::Felt; | ||
|
||
#[derive(Debug)] | ||
#[derive(Debug, Serialize)] | ||
pub struct StarknetChainStatus { | ||
pub height: u64, | ||
pub block_hash: Felt, | ||
pub time: Time, | ||
} | ||
|
||
impl Display for StarknetChainStatus { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> Result { | ||
write!( | ||
f, | ||
"height: {}, block_hash: {}, time: {}", | ||
self.height, self.block_hash, self.time | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters