ParentHash

Storage Plain v101 → current

Hash of the previous block .

Explore chain
Queried by: validatorsdevelopers

The Big Picture

Part of block header. Links each block to its parent.

Use Cases

  • Verify block lineage

From Chain Metadata

Hash of the previous block.

Purpose & Usage

Purpose

Link to parent block in chain.

Common Query Patterns

  • Single value query

Stored Value

value (H256)

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 ParentHash storage (no keys - plain value)
const result = await api.query
  [stringCamelCase("System")]
  [stringCamelCase("ParentHash")]();
console.log("ParentHash:", result.toHuman());

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v101
Current Version
v393