Useful for: validatorsanalyticsdevelopers
The Big Picture
Stores call data for proposals.
Use Cases
- Track governance data storage
From Chain Metadata
A preimage has been noted.
Triggers
Emitted by
Preconditions
- Data provided
- Hash unique
Effects
Storage Modified
Postconditions
- Preimage stored
- Deposit held
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | hash | H256 T::Hash | hash: Cryptographic hash (32 bytes) |
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);
// Subscribe to Noted events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Preimage.Noted.get(block.hash);
for (const evt of events) {
console.log("Noted:", evt.payload);
}
});Runtime Info
- Pallet Index
- 14
- Event Index
- 0
- First Version
- v133
- Current Version
- v411