Sudo::Call
Variant 163 v393pallet_sudo::pallet::Call
Contains a variant per dispatchable extrinsic that this pallet has.
About This Type
Call enum for the Call pallet.
Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.
Variants (5)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | sudo | call: RuntimeCall | Authenticates the sudo key and dispatches a function call with `Root` origin. |
| 1 | sudo_unchecked_weight | call: RuntimeCall weight: Weight | Authenticates the sudo key and dispatches a function call with `Root` origin. This function does not check the weight of the call, and instead allows the Sudo user to specify the weight of the call. The dispatch origin for this call must be _Signed_. |
| 2 | set_key | new: MultiAddress | Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. |
| 3 | sudo_as | who: MultiAddress call: RuntimeCall | Authenticates the sudo key and dispatches a function call with `Signed` origin from a given account. The dispatch origin for this call must be _Signed_. |
| 4 | remove_key | none | Permanently removes the sudo key. **This cannot be un-done.** |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 5 possible variants.
- Size
- variable (1+ bytes)
Examples
sudo = sudo(call)
0x00<field0>00 Variant index 0 = sudofield 0 call: RuntimeCallsudo_unchecked_weight = sudo_unchecked_weight(call, weight)
0x01<field0><field1>01 Variant index 1 = sudo_unchecked_weightfield 0 call: RuntimeCallfield 1 weight: Weightset_key = set_key(new)
0x02<field0>02 Variant index 2 = set_keyfield 0 new: MultiAddressCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Sudo::Call — variant "sudo"
const value = registry.createType("Sudo::Call", { sudo: { call: 0 } });
console.log("Hex:", value.toHex());Type Parameters
T
Referenced By (23)
#123 RuntimeCall via System#123 RuntimeCall via Timestamp#123 RuntimeCall via Grandpa#123 RuntimeCall via Balances#123 RuntimeCall via SubtensorModule#123 RuntimeCall via Utility#123 RuntimeCall via Sudo#123 RuntimeCall via Multisig#123 RuntimeCall via Preimage#123 RuntimeCall via Scheduler#123 RuntimeCall via Proxy#123 RuntimeCall via Registry#123 RuntimeCall via Commitments#123 RuntimeCall via AdminUtils#123 RuntimeCall via SafeMode#123 RuntimeCall via Ethereum#123 RuntimeCall via EVM#123 RuntimeCall via BaseFee#123 RuntimeCall via Drand#123 RuntimeCall via Crowdloan
and 3 more...
Also See
Type Information
- Type ID
- 163
- Kind
- Variant
- Path
- pallet_sudo::pallet::Call
- Runtime
- v393