-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into luca_joss/remove-ibc-relayer-dependency
- Loading branch information
Showing
62 changed files
with
696 additions
and
277 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use cgp::prelude::*; | ||
use hermes_chain_type_components::traits::types::ibc::packet::{ | ||
HasIncomingPacketType, HasOutgoingPacketType, | ||
}; | ||
|
||
#[cgp_component { | ||
context: Chain, | ||
provider: OutgoingPacketFilter, | ||
}] | ||
#[async_trait] | ||
pub trait CanFilterOutgoingPacket<Counterparty>: | ||
HasOutgoingPacketType<Counterparty> + HasErrorType | ||
{ | ||
async fn should_relay_outgoing_packet( | ||
&self, | ||
packet: &Self::OutgoingPacket, | ||
) -> Result<bool, Self::Error>; | ||
} | ||
|
||
#[cgp_component { | ||
context: Chain, | ||
provider: IncomingPacketFilter, | ||
}] | ||
#[async_trait] | ||
pub trait CanFilterIncomingPacket<Counterparty>: | ||
HasIncomingPacketType<Counterparty> + HasErrorType | ||
{ | ||
async fn should_relay_incoming_packet( | ||
&self, | ||
packet: &Self::IncomingPacket, | ||
) -> Result<bool, Self::Error>; | ||
} |
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,2 +1,3 @@ | ||
pub mod fields; | ||
pub mod filter; | ||
pub mod from_write_ack; |
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
14 changes: 14 additions & 0 deletions
14
crates/chain/chain-type-components/src/traits/types/counterparty.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pub trait HasCounterparty<Counterparty> { | ||
type Counterparty; | ||
} | ||
|
||
impl<Chain, Counterparty> HasCounterparty<Counterparty> for Chain { | ||
type Counterparty = Counterparty; | ||
} | ||
|
||
pub trait CanUseCounterparty<Counterparty>: | ||
HasCounterparty<Counterparty, Counterparty = Counterparty> | ||
{ | ||
} | ||
|
||
impl<Chain, Counterparty> CanUseCounterparty<Counterparty> for Chain {} |
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
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.