mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 05:17:58 +00:00
Rewrap all comments to 100 line width (#9490)
* reformat everything again * manual formatting * last manual fix * Fix build
This commit is contained in:
@@ -41,9 +41,9 @@
|
||||
//! ### Executing Privileged Functions
|
||||
//!
|
||||
//! The Sudo pallet itself is not intended to be used within other pallets.
|
||||
//! Instead, you can build "privileged functions" (i.e. functions that require `Root` origin) in other pallets.
|
||||
//! You can execute these privileged functions by calling `sudo` with the sudo key account.
|
||||
//! Privileged functions cannot be directly executed via an extrinsic.
|
||||
//! Instead, you can build "privileged functions" (i.e. functions that require `Root` origin) in
|
||||
//! other pallets. You can execute these privileged functions by calling `sudo` with the sudo key
|
||||
//! account. Privileged functions cannot be directly executed via an extrinsic.
|
||||
//!
|
||||
//! Learn more about privileged functions and `Root` origin in the [`Origin`] type documentation.
|
||||
//!
|
||||
@@ -52,7 +52,7 @@
|
||||
//! This is an example of a pallet that exposes a privileged function:
|
||||
//!
|
||||
//! ```
|
||||
//!
|
||||
//!
|
||||
//! #[frame_support::pallet]
|
||||
//! pub mod logger {
|
||||
//! use frame_support::pallet_prelude::*;
|
||||
@@ -181,7 +181,8 @@ pub mod pallet {
|
||||
Ok(Pays::No.into())
|
||||
}
|
||||
|
||||
/// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.
|
||||
/// Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
||||
/// key.
|
||||
///
|
||||
/// The dispatch origin for this call must be _Signed_.
|
||||
///
|
||||
|
||||
@@ -109,7 +109,8 @@ fn set_key_basics() {
|
||||
});
|
||||
|
||||
new_test_ext(1).execute_with(|| {
|
||||
// A non-root `key` will trigger a `RequireSudo` error and a non-root `key` cannot change the root `key`.
|
||||
// A non-root `key` will trigger a `RequireSudo` error and a non-root `key` cannot change
|
||||
// the root `key`.
|
||||
assert_noop!(Sudo::set_key(Origin::signed(2), 3), Error::<Test>::RequireSudo);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user