This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp: place AnyCodec under sov-celestia-cw + reomve now unused PrettyS…
…lice + clean-ups
- Loading branch information
1 parent
e3d9e5a
commit 9df342a
Showing
13 changed files
with
55 additions
and
77 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
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,30 @@ | ||
use ibc_client_wasm_types::{SUBJECT_PREFIX, SUBSTITUTE_PREFIX}; | ||
|
||
/// The MigrationPrefix enumerates the prefix type used during migration mode. | ||
/// The migration mode is activated when there is an incoming | ||
/// `MigrateClientStore` message. It specifies the prefix key for either the | ||
/// subject or substitute store, or none if the migration is not active. | ||
#[derive(Clone, Debug)] | ||
pub enum MigrationPrefix { | ||
Subject, | ||
Substitute, | ||
None, | ||
} | ||
|
||
impl MigrationPrefix { | ||
pub fn key(&self) -> &[u8] { | ||
match self { | ||
MigrationPrefix::Subject => SUBJECT_PREFIX, | ||
MigrationPrefix::Substitute => SUBSTITUTE_PREFIX, | ||
MigrationPrefix::None => b"", | ||
} | ||
} | ||
} | ||
|
||
/// Travel is an enum to represent the direction of travel in the context of | ||
/// height. | ||
#[derive(Clone, Debug)] | ||
pub enum HeightTravel { | ||
Next, | ||
Prev, | ||
} |
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,11 +1,11 @@ | ||
mod client_type; | ||
mod error; | ||
mod helper; | ||
mod msgs; | ||
mod response; | ||
mod utils; | ||
|
||
pub use client_type::*; | ||
pub use error::*; | ||
pub use helper::*; | ||
pub use msgs::*; | ||
pub use response::*; | ||
pub use utils::*; |
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.
File renamed without changes.
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,17 @@ | ||
mod codec; | ||
|
||
pub use codec::*; | ||
use ibc_core::client::types::error::ClientError; | ||
use ibc_core::client::types::Height; | ||
|
||
/// Decodes a `Height` from a UTF-8 encoded byte array. | ||
pub fn parse_height(encoded_height: Vec<u8>) -> Result<Height, ClientError> { | ||
let height_str = | ||
alloc::str::from_utf8(encoded_height.as_slice()).map_err(|e| ClientError::Other { | ||
description: e.to_string(), | ||
})?; | ||
|
||
Height::try_from(height_str).map_err(|e| ClientError::Other { | ||
description: e.to_string(), | ||
}) | ||
} |
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