RawOrigin
Variant 161 v393frame_support::dispatch::RawOrigin
About This Type
Enum type: RawOrigin.
A tagged union where the first byte selects which variant is active, followed by that variant's data.
Encoding: 1-byte variant index followed by the selected variant's field data.
Variants (4)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | Root | none | |
| 1 | Signed | ||
| 2 | None | none | |
| 3 | Authorized | none |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 4 possible variants.
- Size
- variable (1+ bytes)
Examples
Root
0x0000 Variant index 0 = RootSigned = Signed(AccountId)
0x01<field0>01 Variant index 1 = Signedfield 0 field0: AccountIdNone
0x0202 Variant index 2 = NoneCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode RawOrigin — variant "Root"
const value = registry.createType("RawOrigin", "Root");
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Referenced By (2)
Type Information
- Type ID
- 161
- Kind
- Variant
- Path
- frame_support::dispatch::RawOrigin
- Runtime
- v393