-
Notifications
You must be signed in to change notification settings - Fork 4
/
schema.graphql
229 lines (181 loc) · 4.33 KB
/
schema.graphql
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
enum TransactionType {
mint
burn
}
type Transaction @entity {
id: ID!
timestamp: BigInt
asset: String!
type: TransactionType!
amount: BigInt!
feeRate: BigInt!
integrator: Bytes
transactionTo: Bytes
burnRecipient: Bytes
destination: Bytes
}
type Asset @entity {
id: ID!
gatewayAddress: String!
tokenAddress: String!
symbol: String!
decimals: BigInt!
priceInEth: BigDecimal!
priceInUsd: BigDecimal!
}
type ValueWithAsset @entity {
id: ID!
symbol: String!
asset: Asset
value: BigInt!
}
type AssetAmount @entity {
id: ID!
symbol: String!
asset: Asset
amount: BigInt!
amountInEth: BigDecimal!
amountInUsd: BigDecimal!
}
type Darknode @entity {
id: ID!
operator: Bytes!
bond: BigInt!
publicKey: Bytes!
registeredAt: BigInt!
deregisteredAt: BigInt!
lastClaimedEpoch: BigInt
previousLastClaimedEpoch: BigInt
balances: [AssetAmount!]!
# DEPRECATED
balanceBTC: BigInt!
balanceZEC: BigInt!
balanceBCH: BigInt!
}
type Epoch @entity {
id: ID!
epochhash: BigInt!
timestamp: BigInt!
blockNumber: BigInt!
nextEpochBlockNumber: BigInt!
minimumBond: BigInt!
minimumEpochInterval: BigInt!
numberOfDarknodes: BigInt!
numberOfDarknodesLastEpoch: BigInt!
rewardShares: [AssetAmount!]!
cumulativeRewardShares: [AssetAmount!]!
# DEPRECATED
rewardShareBTC: BigInt!
rewardShareZEC: BigInt!
rewardShareBCH: BigInt!
totalRewardShareBTC: BigInt!
totalRewardShareZEC: BigInt!
totalRewardShareBCH: BigInt!
}
"""
The RenVM entity contains all the information about the current state of RenVM's
on-chain information.
"""
type RenVM @entity {
id: ID! # fixed to '1'
"""
The most recent Ethereum block in which RenVM had activity.
"""
activeBlock: BigInt!
activeTimestamp: BigInt!
previousActiveBlock: BigInt!
previousActiveTimestamp: BigInt!
numberOfDarknodes: BigInt!
numberOfDarknodesLastEpoch: BigInt!
numberOfDarknodesNextEpoch: BigInt!
pendingRegistrations: BigInt!
pendingDeregistrations: BigInt!
minimumBond: BigInt!
# Epochs
minimumEpochInterval: BigInt!
currentEpoch: Epoch
previousEpoch: Epoch
deregistrationInterval: BigInt!
# Fees
btcMintFee: Int!
btcBurnFee: Int!
zecMintFee: Int!
zecBurnFee: Int!
bchMintFee: Int!
bchBurnFee: Int!
mintFee: [ValueWithAsset!]!
burnFee: [ValueWithAsset!]!
# Cycles
currentCycle: BigInt!
previousCycle: BigInt!
currentCyclePayoutPercent: BigInt!
cycleStartTime: BigInt!
txCount: [ValueWithAsset!]!
locked: [AssetAmount!]!
volume: [AssetAmount!]!
fees: [AssetAmount!]!
cycleRewards: [AssetAmount!]!
# DEPRECATED
totalTxCountBTC: BigInt!
totalLockedBTC: BigInt!
totalVolumeBTC: BigInt!
totalTxCountZEC: BigInt!
totalLockedZEC: BigInt!
totalVolumeZEC: BigInt!
totalTxCountBCH: BigInt!
totalLockedBCH: BigInt!
totalVolumeBCH: BigInt!
}
# Data accumulated and condensed into day stats
type Integrator @entity {
id: ID!
date: Int!
contractAddress: Bytes!
txCount: [ValueWithAsset!]!
locked: [AssetAmount!]!
volume: [AssetAmount!]!
fees: [AssetAmount!]!
# Track totals so that entities can be sorted by them.
txCountTotal: BigInt!
volumeTotalUSD: BigDecimal!
feesTotalUSD: BigDecimal!
# DEPRECATED
txCountBTC: BigInt!
lockedBTC: BigInt!
volumeBTC: BigInt!
txCountZEC: BigInt!
lockedZEC: BigInt!
volumeZEC: BigInt!
txCountBCH: BigInt!
lockedBCH: BigInt!
volumeBCH: BigInt!
}
type IntegratorContract @entity {
id: ID!
date: Int!
contractAddress: Bytes!
txCount: [ValueWithAsset!]!
locked: [AssetAmount!]!
volume: [AssetAmount!]!
fees: [AssetAmount!]!
# DEPRECATED
txCountBTC: BigInt!
lockedBTC: BigInt!
volumeBTC: BigInt!
txCountZEC: BigInt!
lockedZEC: BigInt!
volumeZEC: BigInt!
txCountBCH: BigInt!
lockedBCH: BigInt!
volumeBCH: BigInt!
}
type EndUser @entity {
id: ID!
firstSeen: BigInt!
address: Bytes!
txCount: [ValueWithAsset!]!
volume: [AssetAmount!]!
# Track totals so that entities can be sorted by them.
txCountTotal: BigInt!
volumeTotalUSD: BigDecimal!
}