RateLimitKey

Variant 434 v393

pallet_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)

IndexNameFieldsDocs
0SetSNOwnerHotkey
1OwnerHyperparamUpdate
2NetworkLastRegisterednone
3LastTxBlock
4LastTxBlockChildKeyTake
5LastTxBlockDelegateTake
6AddStakeBurn

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 = SetSNOwnerHotkey
field 0 field0: u16
OwnerHyperparamUpdate = OwnerHyperparamUpdate(u16, Hyperparameter)
0x01<field0><field1>
01 Variant index 1 = OwnerHyperparamUpdate
field 0 field0: u16
field 1 field1: Hyperparameter
NetworkLastRegistered
0x02
02 Variant index 2 = NetworkLastRegistered

Code 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