HasMigrationRun

Storage Map v391 → v411 Changed in v411

Per-migration boolean flag tracking which MevShield runtime migrations have completed.

Explore chain
Queried by: developers

The Big Picture

Substrate-convention idempotency tracking for runtime migrations. Indexers do not normally need this unless they care about migration timing.

From Chain Metadata

Stores whether some migration has been run.

Purpose & Usage

Purpose

Idempotency marker so storage-format migrations only run once.

Common Query Patterns

  • Query by migration identifier to check if a migration has applied

Query Keys

#NameTypeDescription
1
migrationName
raw: key1
Vec<u8> Vec Vec<T>key1 (Vec<u8>)

Stored Value

value (bool)

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 HasMigrationRun storage
const key1 = Binary.fromOpaque(new Uint8Array(0));

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

Version History

v391 block 7,782,857 Added
v394–v400 · runtime versions skipped on chain (never deployed)
v401 block 8,036,576 Internal re-bind
v403–v410 · runtime versions skipped on chain (never deployed)
v411 block 8,283,784 Internal re-bind Current

Runtime Info

View Source
Pallet
MevShield
Storage Kind
Map
First Version
v391
Current Version
v411