mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-04-22 12:28:02 +00:00
Add multi-staking entities, APY calculation, Asset Hub indexer support
- Add StakingApy, ActiveStaker, Reward entities to schema.graphql - Add APY calculation engine in NewEra.ts (inflation curve + validator commission) - Add saveMultiStakingReward to Rewards.ts and PoolRewards.ts - Add handleAssetTransfer for assets.Transferred events - Add constants.ts with genesis hashes and inflation params - Add docker-compose.prod.yml for production deployment (relay + assethub nodes) - Add deploy-vps.yml GitHub Actions workflow for auto-deploy on push
This commit is contained in:
+29
-2
@@ -17,7 +17,7 @@ type AssetTransfer @jsonField {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
type Reward @jsonField {
|
||||
type RewardInfo @jsonField {
|
||||
eventIdx: Int!
|
||||
amount: String!
|
||||
isReward: Boolean!
|
||||
@@ -97,7 +97,7 @@ type HistoryElement @entity {
|
||||
extrinsicHash: String
|
||||
timestamp: BigInt! @index
|
||||
address: String! @index
|
||||
reward: Reward
|
||||
reward: RewardInfo
|
||||
poolReward: PoolReward
|
||||
extrinsic: Extrinsic
|
||||
transfer: Transfer
|
||||
@@ -123,3 +123,30 @@ type ErrorEvent @entity {
|
||||
id: ID!
|
||||
description: String!
|
||||
}
|
||||
|
||||
# ===== Multi-staking API entities (used by PezWallet dashboard) =====
|
||||
|
||||
type StakingApy @entity {
|
||||
id: ID!
|
||||
networkId: String! @index
|
||||
stakingType: String! @index
|
||||
maxAPY: Float!
|
||||
}
|
||||
|
||||
type ActiveStaker @entity {
|
||||
id: ID!
|
||||
networkId: String! @index
|
||||
stakingType: String! @index
|
||||
address: String! @index
|
||||
}
|
||||
|
||||
type Reward @entity {
|
||||
id: ID!
|
||||
networkId: String! @index
|
||||
stakingType: String! @index
|
||||
address: String! @index
|
||||
type: RewardType! @index
|
||||
amount: BigInt!
|
||||
timestamp: BigInt!
|
||||
blockNumber: Int! @index
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user