Skip to content
Snippets Groups Projects
sudo.rs 299 B
Newer Older
Hugo Trentesaux's avatar
Hugo Trentesaux committed
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