Origin
Variant 98 v393pallet_contracts::Origin
About This Type
Enum type: Origin.
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 (2)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | Root | none | |
| 1 | Signed |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 2 possible variants.
- Size
- variable (1+ bytes)
Examples
Root
0x0000 Variant index 0 = RootSigned = Signed(AccountId)
0x01<field0>01 Variant index 1 = Signedfield 0 field0: AccountIdCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Origin — variant "Root"
const value = registry.createType("Origin", "Root");
console.log("Hex:", value.toHex());Type Parameters
T = Runtime
Referenced By (1)
Type Information
- Type ID
- 98
- Kind
- Variant
- Path
- pallet_contracts::Origin
- Runtime
- v393