LastRuntimeUpgrade
Storage Plain v101 → currentInformation about the last runtime upgrade.
Explore chainQueried by: validatorsdevelopersanalytics
The Big Picture
Records when and what the last runtime upgrade was.
Use Cases
- Check current runtime version
- Verify upgrade history
From Chain Metadata
Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
Purpose & Usage
Purpose
Track spec version and name of current runtime.
Common Query Patterns
- Single value query
Stored Value
value (LastRuntimeUpgradeInfo)
Default Value
None (absent keys return no value)
Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.
Relationships
Related Events
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 LastRuntimeUpgrade storage (no keys - plain value)
const result = await api.query.System.LastRuntimeUpgrade.getValue();
console.log("LastRuntimeUpgrade:", result);Runtime Info
- Pallet
- System
- Storage Kind
- Plain
- First Version
- v101
- Current Version
- v472