RateLimitKey
Variant 434 v393pallet_subtensor::RateLimitKey
About This Type
Enum type: RateLimitKey.
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 (7)
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 7 possible variants.
- Size
- variable (1+ bytes)
Examples
SetSNOwnerHotkey = SetSNOwnerHotkey(u16)
0x00<field0>00 Variant index 0 = SetSNOwnerHotkeyfield 0 field0: u16OwnerHyperparamUpdate = OwnerHyperparamUpdate(u16, Hyperparameter)
0x01<field0><field1>01 Variant index 1 = OwnerHyperparamUpdatefield 0 field0: u16field 1 field1: HyperparameterNetworkLastRegistered
0x0202 Variant index 2 = NetworkLastRegisteredCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode RateLimitKey — variant "SetSNOwnerHotkey"
const value = registry.createType("RateLimitKey", { SetSNOwnerHotkey: { value: 1 } });
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
Type Information
- Type ID
- 434
- Kind
- Variant
- Path
- pallet_subtensor::RateLimitKey
- Runtime
- v393