-
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.
Add ChainId to Starknet and Comet client state (#173)
* Add ChainId to CometClientState * use MutEncoder and MutDecoder * Fix clippy * Update CometClientState in Cairo to add chain_id field * Add chain ID type to StarknetClientState as Felt type * Use String in Rust code for Chain ID in Starknet client state * Remove unnecessary Felt to Protobuf wiring * Replace remaining Felt chainID types to String * use ChainId for chain_id type * debug: this compiles * wire ChainId encoding * add cgp trait bounds * comment ChainId cgp bound which does not work * Fix chain id encoding * Fix ChainId encoding in Starknet client state * Update ibc-starknet-cw nix * Remove unwrap * Use correct chain ID in ClientState update_state --------- Co-authored-by: Ranadeep Biswas <[email protected]> Co-authored-by: Soares Chen <[email protected]>
- Loading branch information
1 parent
3684271
commit 7e16860
Showing
22 changed files
with
147 additions
and
70 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
use cgp::prelude::*; | ||
use ibc_core::client::types::Height; | ||
use ibc_core::host::types::identifiers::ChainId; | ||
|
||
pub const STARKNET_CLIENT_STATE_TYPE_URL: &str = "/StarknetClientState"; | ||
|
||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[derive(Clone, Debug, PartialEq, derive_more::From, HasField)] | ||
pub struct StarknetClientState { | ||
pub latest_height: Height, | ||
pub chain_id: ChainId, | ||
} |
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.