-
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.
feat(relayer): introduce
StarknetMessage
type containing counterpar…
…ty Cosmos height (#165) * Add StarknetMessage which contains the counterparty height and use it instead of Call for Messages * helper methods * rm redundant counterparty height * rename var * happy clippy --------- Co-authored-by: Ranadeep Biswas <[email protected]>
- Loading branch information
Showing
12 changed files
with
154 additions
and
55 deletions.
There are no files selected for viewing
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
13 changes: 7 additions & 6 deletions
13
relayer/crates/starknet-chain-components/src/impls/counterparty_message_height.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,20 +1,21 @@ | ||
use hermes_chain_components::traits::types::height::HasHeightType; | ||
use hermes_chain_components::traits::types::ibc::CounterpartyMessageHeightGetter; | ||
use hermes_chain_components::traits::types::message::HasMessageType; | ||
use ibc::core::client::types::Height; | ||
|
||
use crate::impls::types::message::StarknetMessage; | ||
|
||
pub struct GetCounterpartyCosmosHeightFromStarknetMessage; | ||
|
||
impl<Chain, Counterparty> CounterpartyMessageHeightGetter<Chain, Counterparty> | ||
for GetCounterpartyCosmosHeightFromStarknetMessage | ||
where | ||
Chain: HasMessageType, | ||
Counterparty: HasHeightType, | ||
Chain: HasMessageType<Message = StarknetMessage>, | ||
Counterparty: HasHeightType<Height = Height>, | ||
{ | ||
fn counterparty_message_height_for_update_client( | ||
_message: &Chain::Message, | ||
message: &Chain::Message, | ||
) -> Option<Counterparty::Height> { | ||
// TODO: Define a `StarknetMessage` type that wraps around `Call` | ||
// and provide counterparty height | ||
None | ||
message.counterparty_height | ||
} | ||
} |
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
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
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
Oops, something went wrong.