Sudo::Call
Variant 250 v411pallet_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)
#249 RuntimeCall via System#249 RuntimeCall via Timestamp#249 RuntimeCall via Grandpa#249 RuntimeCall via Balances#249 RuntimeCall via SubtensorModule#249 RuntimeCall via Utility#249 RuntimeCall via Sudo#249 RuntimeCall via Multisig#249 RuntimeCall via Preimage#249 RuntimeCall via Scheduler#249 RuntimeCall via Proxy#249 RuntimeCall via Registry#249 RuntimeCall via Commitments#249 RuntimeCall via AdminUtils#249 RuntimeCall via SafeMode#249 RuntimeCall via Ethereum#249 RuntimeCall via EVM#249 RuntimeCall via BaseFee#249 RuntimeCall via Drand#249 RuntimeCall via Crowdloan
and 3 more...
Also See
Type Information
- Type ID
- 250
- Kind
- Variant
- Path
- pallet_sudo::pallet::Call
- Runtime
- v411