jiqiang90 / valiator-threshold-dictionary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SubQuery Example - Validator Threshold

This subquery indexes the least staking amount required for a validator to be elected.

This is an example of using @polkadot/api in the mapping function. Proofs

  1. historical metadatas are correctly handled, registry, consts are swapped. (see maxNominatorRewardedPerValidator)
  2. Queries are restricted to the current processed block. (see validators and exposures)
  3. api.queryMulti is supported. (see activeEra, currentEra)

Get Started

1. install dependencies

yarn

2. generate types

yarn codegen

3. build

yarn build

4. run locally

yarn start:docker

About


Languages

Language:TypeScript 100.0%