-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
121 lines (109 loc) · 2.38 KB
/
schema.graphql
File metadata and controls
121 lines (109 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
enum Status {
NOT_REGISTERED
REGISTERED
}
type Cluster @entity {
id: ID!
commission: BigInt!
rewardAddress: Bytes!
clientKey: Bytes!
networkId: Bytes!
status: Status!
delegators: [String!]!
totalDelegations: [Delegation!] @derivedFrom(field: "cluster")
updatedCommission: BigInt
commissionUpdatesAt: BigInt
updatedNetwork: Bytes
networkUpdatesAt: BigInt
clusterUnregistersAt: BigInt
pendingRewards: BigInt!
historicalRewardWithdrawl: [RewardWithdrawl!]! @derivedFrom(field: "cluster")
}
type Stash @entity {
id: ID!
stashId: Bytes!
staker: Bytes!
delegatedCluster: String!
undelegationRequestedAt: BigInt
undelegatesAt: BigInt
tokensDelegated: [TokenData!]! @derivedFrom(field: "stash")
tokensDelegatedId: [Bytes!]
tokensDelegatedAmount: [BigInt!]
redelegationUpdateBlockV1: BigInt
redelegationUpdateBlock: BigInt
redelegationUpdatedClusterV1: String
redelegationUpdatedCluster: String
isActive: Boolean!
createdAt: BigInt!
isBridged: Boolean!
}
type Token @entity {
id: ID!
tokenId: Bytes!
tokenAddress: Bytes!
rewardFactor: BigInt!
enabled: Boolean!
}
type Network @entity {
id: ID!
networkId: Bytes!
rewardPerEpoch: BigInt
clusters: [String!]!
}
type TokenData @entity {
id: ID!
token: Token!
amount: BigInt!
stash: Stash!
}
type Delegation @entity {
id: ID!
token: Token!
amount: BigInt!
cluster: Cluster!
}
type Delegator @entity {
id: ID!
address: String!
totalPendingReward: BigInt!
totalDelegations: [DelegatorToken!]! @derivedFrom(field: "delegator")
pendingRewards: [DelegatorReward!]! @derivedFrom(field: "delegator")
historicalRewardWithdrawl: [RewardWithdrawl!]! @derivedFrom(field: "delegator")
totalRewardsClaimed: BigInt!
stashes: [String!]!
clusters: [ClusterCount!]!
}
type ClusterCount @entity {
id: ID!
cluster: String!
count: BigInt!
}
type DelegatorToken @entity {
id: ID!
token: Token!
amount: BigInt!
delegator: Delegator!
}
type State @entity {
id: ID!
clusters: [String!]!
activeClusterCount: BigInt!
lastUpdatedBlock: BigInt!
redelegationWaitTime: BigInt!
undelegationWaitTime: BigInt!
}
type DelegatorReward @entity {
id: ID!
amount: BigInt!
cluster: Cluster!
delegator: Delegator!
}
type RewardWithdrawl @entity {
id: ID!
amount: BigInt!
cluster: Cluster!
delegator: Delegator
timestamp: BigInt!
isAuto: Boolean!
txHash: String!
}