Files
pezkuwi-subquery/pezkuwi-governance.yaml
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

63 lines
1.8 KiB
YAML

specVersion: 1.0.0
name: subquery-pezkuwi-governance
version: 1.0.0
runner:
node:
name: "@subql/node"
version: ">=4.6.6"
query:
name: "@subql/query"
version: "*"
description: Pezkuwi Governance SubQuery - OpenGov referenda, votes, delegations for PezWallet
repository: https://github.com/pezkuwichain/pezkuwi-subquery
schema:
file: ./schema.graphql
network:
chainId: "0x1aa94987791a5544e9667ec249d2cef1b8fdd6083c85b93fc37892d54a1156ca"
endpoint:
- wss://rpc.pezkuwichain.io
- wss://mainnet.pezkuwichain.io
chaintypes:
file: ./chainTypes/pezkuwi.json
dataSources:
- name: governance
kind: substrate/Runtime
startBlock: 57100
mapping:
file: ./dist/index.js
handlers:
# Referendum lifecycle
- handler: handleReferendumSubmitted
kind: substrate/EventHandler
filter:
module: referenda
method: Submitted
# Direct vote on referendum
- handler: handleVoteCall
kind: substrate/CallHandler
filter:
module: convictionVoting
method: vote
success: true
# Remove vote from referendum
- handler: handleRemoveVoteCall
kind: substrate/CallHandler
filter:
module: convictionVoting
method: removeVote
success: true
# Delegate voting power
- handler: handleDelegateCall
kind: substrate/CallHandler
filter:
module: convictionVoting
method: delegate
success: true
# Remove delegation
- handler: handleUndelegateCall
kind: substrate/CallHandler
filter:
module: convictionVoting
method: undelegate
success: true