AdminUtils::Error

Variant 508 v393

pallet_admin_utils::pallet::Error

The `Error` enum of this pallet.

About This Type

Error enum for the Error pallet.

Contains all error types that the Error pallet can return when a call fails.

Variants (11)

IndexNameFieldsDocs
0SubnetDoesNotExistnoneThe subnet does not exist, check the netuid parameter
1MaxValidatorsLargerThanMaxUIdsnoneThe maximum number of subnet validators must be less than the maximum number of allowed UIDs in the subnet.
2MaxAllowedUIdsLessThanCurrentUIdsnoneThe maximum number of subnet validators must be more than the current number of UIDs already in the subnet.
3BondsMovingAverageMaxReachednoneThe maximum value for bonds moving average is reached
4NegativeSigmoidSteepnessnoneOnly root can set negative sigmoid steepness values
5ValueNotInBoundsnoneValue not in allowed bounds.
6MinAllowedUidsGreaterThanCurrentUidsnoneThe minimum allowed UIDs must be less than the current number of UIDs in the subnet.
7MinAllowedUidsGreaterThanMaxAllowedUidsnoneThe minimum allowed UIDs must be less than the maximum allowed UIDs.
8MaxAllowedUidsLessThanMinAllowedUidsnoneThe maximum allowed UIDs must be greater than the minimum allowed UIDs.
9MaxAllowedUidsGreaterThanDefaultMaxAllowedUidsnoneThe maximum allowed UIDs must be less than the default maximum allowed UIDs.
10InvalidValuenoneBad parameter value

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 11 possible variants.
Size
variable (1+ bytes)

Examples

SubnetDoesNotExist
0x00
00 Variant index 0 = SubnetDoesNotExist
MaxValidatorsLargerThanMaxUIds
0x01
01 Variant index 1 = MaxValidatorsLargerThanMaxUIds
MaxAllowedUIdsLessThanCurrentUIds
0x02
02 Variant index 2 = MaxAllowedUIdsLessThanCurrentUIds

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode AdminUtils::Error — variant "SubnetDoesNotExist"
const value = registry.createType("AdminUtils::Error", "SubnetDoesNotExist");
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
508
Kind
Variant
Path
pallet_admin_utils::pallet::Error
Runtime
v393