-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description Addresses a handful of issues in #2865 ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
- Loading branch information
Showing
8 changed files
with
23 additions
and
148 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
19 changes: 16 additions & 3 deletions
19
rust/chains/hyperlane-cosmos/src/payloads/aggregate_ism.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,17 +1,30 @@ | ||
use hyperlane_core::{HyperlaneMessage, RawHyperlaneMessage}; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct ModulesAndThresholdRequest { | ||
pub modules_and_threshold: ModulesAndThresholdRequestInner, | ||
modules_and_threshold: ModulesAndThresholdRequestInner, | ||
} | ||
|
||
impl ModulesAndThresholdRequest { | ||
pub fn new(message: &HyperlaneMessage) -> Self { | ||
Self { | ||
modules_and_threshold: ModulesAndThresholdRequestInner { | ||
message: hex::encode(RawHyperlaneMessage::from(message)), | ||
}, | ||
} | ||
} | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct ModulesAndThresholdRequestInner { | ||
pub message: String, // hexbinary | ||
struct ModulesAndThresholdRequestInner { | ||
/// Hex-encoded Hyperlane message | ||
pub message: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct ModulesAndThresholdResponse { | ||
pub threshold: u8, | ||
/// Bech32-encoded module addresses | ||
pub modules: Vec<String>, | ||
} |