Skip to content
Snippets Groups Projects
Verified Commit 65d723b2 authored by Pascal Engélibert's avatar Pascal Engélibert :bicyclist:
Browse files

feat: sudo.set_key

parent fa298dad
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,9 @@ pub enum Subcommand { ...@@ -122,6 +122,9 @@ pub enum Subcommand {
}, },
#[clap(hide = true)] #[clap(hide = true)]
SpamRoll { actual_repart: usize }, SpamRoll { actual_repart: usize },
SudoSetKey {
new_key: sp_core::crypto::AccountId32,
},
Transfer { Transfer {
balance: u64, balance: u64,
dest: sp_core::crypto::AccountId32, dest: sp_core::crypto::AccountId32,
...@@ -557,6 +560,18 @@ async fn main() -> Result<()> { ...@@ -557,6 +560,18 @@ async fn main() -> Result<()> {
} }
} }
} }
Subcommand::SudoSetKey { new_key } => {
let pair = pair.expect("This subcommand needs a secret.");
client
.tx()
.sign_and_submit_then_watch(
&gdev_300::tx().sudo().set_key(new_key.into()),
&PairSigner::new(pair),
BaseExtrinsicParamsBuilder::new(),
)
.await?;
}
Subcommand::Transfer { Subcommand::Transfer {
balance, balance,
dest, dest,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment