Forked from
clients / Rust / Ğcli-v2s
77 commits behind the upstream repository.
-
Hugo Trentesaux authoredHugo Trentesaux authored
sudo.rs 299 B
use crate::*;
/// set sudo key
pub async fn set_key(data: &Data, new_key: AccountId) -> Result<(), subxt::Error> {
submit_call_and_look_event::<
runtime::sudo::events::KeyChanged,
StaticTxPayload<runtime::sudo::calls::SetKey>,
>(data, &runtime::tx().sudo().set_key(new_key.into()))
.await
}