Files
pezkuwi-subquery/pezkuwi-assethub.yaml
T
pezkuwichain dcbd38fb5f fix: set startBlock to current chain height
RPC nodes run in pruned mode (~256 blocks state history).
Setting startBlock to recent blocks ensures all required
state is available. Old blocks have no significant user
transactions to index.
2026-02-19 02:33:47 +03:00

88 lines
2.7 KiB
YAML

specVersion: 1.0.0
name: subquery-pezkuwi-assethub
version: 1.0.0
runner:
node:
name: "@subql/node"
version: ">=4.6.6"
query:
name: "@subql/query"
version: "*"
description: Pezkuwi Asset Hub SubQuery - Indexes NominationPools, transfers, swaps
repository: https://github.com/pezkuwichain/pezkuwi-subquery
schema:
file: ./schema.graphql
network:
chainId: "0xe7c15092dcbe3f320260ddbbc685bfceed9125a3b3d8436db2766201dec3b949"
endpoint:
- wss://asset-hub-rpc.pezkuwichain.io
dataSources:
- name: main
kind: substrate/Runtime
startBlock: 56400
mapping:
file: ./dist/index.js
handlers:
# Block handler: initialize active pool stakers from chain state
- handler: handleBlock
kind: substrate/BlockHandler
# Signed extrinsics for history
- handler: handleHistoryElement
kind: substrate/CallHandler
filter:
isSigned: true
# Nomination Pools rewards
- handler: handlePoolReward
kind: substrate/EventHandler
filter:
module: nominationPools
method: PaidOut
# Pool member bonded (track active stakers)
- handler: handlePoolBonded
kind: substrate/EventHandler
filter:
module: nominationPools
method: Bonded
# Pool member unbonded (cleanup active stakers)
- handler: handlePoolUnbonded
kind: substrate/EventHandler
filter:
module: nominationPools
method: Unbonded
# Pool bonded slash
- handler: handlePoolBondedSlash
kind: substrate/EventHandler
filter:
module: nominationPools
method: PoolSlashed
# Pool unbonding slash
- handler: handlePoolUnbondingSlash
kind: substrate/EventHandler
filter:
module: nominationPools
method: UnbondingPoolSlashed
# Era changes on AH (staking pallet lives here) - old format
- handler: handleAHNewEra
kind: substrate/EventHandler
filter:
module: staking
method: StakingElection
# Era changes on AH - new format (Polkadot 2.0)
- handler: handleAHStakersElected
kind: substrate/EventHandler
filter:
module: staking
method: StakersElected
# Native transfers
- handler: handleTransfer
kind: substrate/EventHandler
filter:
module: balances
method: Transfer
# Asset transfers
- handler: handleAssetTransfer
kind: substrate/EventHandler
filter:
module: assets
method: Transferred