mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-06-19 22:41:07 +00:00
67a246a760
Both governance and AH indexers were crashing at pruned blocks (RPC nodes only retain last ~256 blocks of state). Bumping startBlock to near-tip allows clean indexing forward from current state. - governance: 57100 → 1228500 (relay tip - ~200) - AH: 582592 → 1029200 (AH tip - ~200) Loss: governance 57100-1228500 (mostly empty, pre-governance-activity); AH 582592-1029200 (~410k blocks of staking/transfer data — postgres state will be dropped, accept loss). Long-term fix: provision Asset Hub archive node so reindexing from genesis is possible without recurring pruning issues.
63 lines
1.8 KiB
YAML
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: 1228500
|
|
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
|