Events

Storage Plain v101 → current

Events deposited during current block execution.

Explore chain
Queried by: developersanalyticswallets

The Big Picture

Every event from every pallet lands here. The canonical record of what happened.

Use Cases

  • Index events
  • Build notifications
  • Analyze block activity

From Chain Metadata

Events deposited for the current block. NOTE: The item is unbound and should therefore never be read on chain. It could otherwise inflate the PoV size of a block. Events have a large in-memory size. Box the events to not go out-of-memory just in case someone still reads them from within the runtime.

Purpose & Usage

Purpose

Collect all events from all pallets in the block.

Common Query Patterns

  • Query all events for a block

Notes

  • Very large - never read on-chain, only via RPC

Stored Value

value (Vec<EventRecord>)

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

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v101
Current Version
v393