AutoParentDelegationEnabled

Storage Map v401 → current New

--- MAP ( hotkey ) --> parent_delegation_enabled

Explore chain

From Chain Metadata

MAP ( hotkey ) --> parent_delegation_enabled When `true`, this root validator allows auto parent delegation. Defaults to `true`; validators can opt out at any time by calling `set_auto_parent_delegation_enabled(false)`.

Purpose & Usage

Common Query Patterns

  • Query by key
  • Iterate all entries

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)

Stored Value

value (bool)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query AutoParentDelegationEnabled storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("AutoParentDelegationEnabled")](
  key1
);

console.log("AutoParentDelegationEnabled:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v401
Current Version
v401