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
Vec<EventRecord> Vec
value (Vec<EventRecord>)
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 Events storage (no keys - plain value)
const result = await api.query.System.Events.getValue();
console.log("Events:", result);Version History
v101 block 1 Added
v149 block 3,014,339 Internal re-bind
v151 block 3,157,274 Internal re-bind Current
Runtime Info
- Pallet
- System
- Storage Kind
- Plain
- First Version
- v101
- Current Version
- v411