ExtrinsicCount

Storage Plain v101 → current

Total extrinsics count for the current block .

Explore chain
Queried by: developersanalytics

The Big Picture

Available during block execution. Cleared after block is finalized.

Use Cases

  • Monitor block fullness
  • Calculate extrinsic indices

From Chain Metadata

Total extrinsics count for the current block.

Purpose & Usage

Purpose

Track how many transactions are in the current block.

Common Query Patterns

  • Single value query during block execution

Stored Value

value (u32)

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

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v101
Current Version
v393