This event was removed in v326

This event is no longer emitted in the current runtime. Existed from v123 to v326. Shown here for historical reference.

Voted

Event Removed v123 → v326 (removed) #1

A Triumvirate member has voted.

Useful for: validatorsanalytics

The Big Picture

Each vote is decisive.

Use Cases

  • Track voting

From Chain Metadata

A motion (given hash) has been voted on by given account, leaving a tally (yes votes and no votes given respectively as `MemberCount`).

Triggers

Emitted by

Preconditions

  • Origin is member

Effects

Postconditions

  • Vote recorded

Event Data

#NameTypeDescription
0
account
AccountId Account account address (hex -> SS58)
1
proposal_hash
H256 proposal_hash (H256)
2
voted
bool voted (bool)
3
yes
u32 yes (u32)
4
no
u32 no (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 });

// Subscribe to Voted events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("Triumvirate") &&
      event.method === "Voted"
    )
    .forEach(({ event }) => {
      console.log("Voted:", event.data.toHuman());
    });
});

Runtime Info

Pallet Index
8
Event Index
1
First Version
v123
Removed In
v326