Lookup

Storage Map v133 → v411 Changed in v411

Lookup from a name to the block number and index of the task.

Explore chain
Queried by: developersanalytics

The Big Picture

Index from task names to their location in the Agenda. Essential for cancel_named and related operations.

Use Cases

  • Find named tasks
  • Check if a name is in use
  • Manage named schedules

From Chain Metadata

Lookup from a name to the block number and index of the task. For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 identities.

Purpose & Usage

Purpose

Enables named task management - find tasks by name instead of (block, index).

Common Query Patterns

  • Query by 32-byte name/id to find task location

Query Keys

#NameTypeDescription
1
taskName
raw: key1
[u8; 32] [32] Named task identifier (32-byte array). Used by scheduling APIs that schedule by name rather than by raw (block, index) coordinates.

Stored Value

  • .0
    scheduled_block — Block number at which the named task is scheduled to execute. Standard pallet_scheduler.
  • .1
    agenda_index — Index of the task within the Agenda for that scheduled_block. The full task lookup is `Agenda[scheduled_block][agenda_index]`. Standard pallet_scheduler.

Relationships

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Query Lookup storage
const key1 = "0x0000000000000000000000000000000000000000000000000000000000000000";

const result = await api.query.Scheduler.Lookup.getValue(key1);
console.log("Lookup:", result);

Version History

v133 block 1,404,224 Added
v149 block 3,014,339 Internal re-bind
v151 block 3,157,274 Internal re-bind
v166–v194 · runtime versions skipped on chain (never deployed)
v195 block 3,791,350 Internal re-bind
v203–v204 · runtime versions skipped on chain (never deployed)
v205 block 4,209,446 Internal re-bind
v213–v215 · runtime versions skipped on chain (never deployed)
v216 block 4,510,996 Internal re-bind
v259–v260 · runtime versions skipped on chain (never deployed)
v261 block 5,328,895 Internal re-bind
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind
v307–v314 · runtime versions skipped on chain (never deployed)
v315 block 6,414,634 Internal re-bind
v327–v333 · runtime versions skipped on chain (never deployed)
v334 block 6,811,690 Internal re-bind
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind
v403–v410 · runtime versions skipped on chain (never deployed)
v411 block 8,283,784 Internal re-bind Current

Runtime Info

Pallet
Scheduler
Storage Kind
Map
First Version
v133
Current Version
v411