mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-04-21 23:37:56 +00:00
718fea7cad0bc7b08a804c17096e0c782a0247f0
processAccount() was comparing direct staking against cache BEFORE checking pool data. This caused a flip-flop: when cache=121K and direct=100K, the bot submitted 100K (missing pool). Next scan it detected the difference and submitted 121K. Every 5 minutes, forever. Worse, when direct staking went to 0, the bot submitted 0 which caused the pallet to delete StakingStartBlock — permanently removing the user from tracking and zeroing their trust score. Fix: collect ALL staking data (direct + pool) first, combine into a single total, then compare against cache. Also adds queryFailed flag to prevent downgrading stake when pool RPC query fails.
Pezkuwi SubQuery
SubQuery indexer for Pezkuwi blockchain - provides staking rewards, NominationPools, transfers and era validator data for PezWallet.
Projects
- pezkuwi.yaml - Pezkuwi Relay Chain staking indexer
- pezkuwi-assethub.yaml - Pezkuwi Asset Hub NominationPools and transfers indexer
Features
- Staking rewards (Reward/Rewarded events)
- Nomination Pool rewards (PaidOut events)
- Slashing events (Slash/Slashed, PoolSlashed, UnbondingPoolSlashed)
- Native transfers (balances.Transfer)
- Asset transfers (assets.Transferred) - Asset Hub only
- Era validator information (StakersElected/StakingElection)
- Full transaction history (signed extrinsics)
Get Started
Install dependencies
yarn install
Build
yarn build
Local Development
sh local-runner.sh pezkuwi.yaml
Deploy to SubQuery Network
./node_modules/.bin/subql publish -f pezkuwi.yaml
./node_modules/.bin/subql publish -f pezkuwi-assethub.yaml
Endpoints
- Pezkuwi Relay: wss://rpc.pezkuwichain.io
- Pezkuwi Asset Hub: wss://asset-hub-rpc.pezkuwichain.io
License
Apache 2.0 - Based on Nova SubQuery implementation
Description
Languages
TypeScript
55.4%
JavaScript
23.6%
Python
16.4%
Shell
4.2%
Dockerfile
0.4%