-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,835 additions
and
953 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
58 changes: 58 additions & 0 deletions
58
crates/astria-cli/src/sequencer/sudo/recover_ibc_client.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,58 @@ | ||
use astria_core::protocol::transaction::v1::{ | ||
action::RecoverIbcClient, | ||
Action, | ||
}; | ||
use color_eyre::eyre::{ | ||
self, | ||
WrapErr as _, | ||
}; | ||
|
||
use crate::utils::submit_transaction; | ||
|
||
#[derive(Debug, clap::Args)] | ||
pub(super) struct Command { | ||
/// The bech32m prefix that will be used for constructing addresses using the private key | ||
#[arg(long, default_value = "astria")] | ||
prefix: String, | ||
// TODO: https://github.com/astriaorg/astria/issues/594 | ||
// Don't use a plain text private, prefer wrapper like from | ||
// the secrecy crate with specialized `Debug` and `Drop` implementations | ||
// that overwrite the key on drop and don't reveal it when printing. | ||
#[arg(long, env = "SEQUENCER_PRIVATE_KEY")] | ||
private_key: String, | ||
/// The url of the Sequencer node | ||
#[arg(long, env = "SEQUENCER_URL")] | ||
sequencer_url: String, | ||
/// The chain id of the sequencing chain being used | ||
#[arg(long = "sequencer.chain-id", env = "ROLLUP_SEQUENCER_CHAIN_ID")] | ||
sequencer_chain_id: String, | ||
|
||
/// The client id of the client to be replaced | ||
#[arg(long)] | ||
client_id: String, | ||
|
||
/// The client id of the client to replace the subject client | ||
#[arg(long)] | ||
replacement_client_id: String, | ||
} | ||
|
||
impl Command { | ||
pub(super) async fn run(self) -> eyre::Result<()> { | ||
let res = submit_transaction( | ||
self.sequencer_url.as_str(), | ||
self.sequencer_chain_id.clone(), | ||
&self.prefix, | ||
self.private_key.as_str(), | ||
Action::RecoverIbcClient(RecoverIbcClient { | ||
client_id: self.client_id.parse()?, | ||
replacement_client_id: self.replacement_client_id.parse()?, | ||
}), | ||
) | ||
.await | ||
.wrap_err("failed to submit RecoverIbcClient transaction")?; | ||
|
||
println!("RecoverIbcClient completed!"); | ||
println!("Included in block: {}", res.height); | ||
Ok(()) | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
crates/astria-core/src/generated/astria.protocol.fees.v1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
108 changes: 108 additions & 0 deletions
108
crates/astria-core/src/generated/astria.protocol.fees.v1.serde.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
crates/astria-core/src/generated/astria.protocol.genesis.v1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
crates/astria-core/src/generated/astria.protocol.genesis.v1.serde.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 34 additions & 2 deletions
36
crates/astria-core/src/generated/astria.protocol.transaction.v1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.