-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.ts
466 lines (382 loc) · 11 KB
/
schema.ts
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
import {
TypedMap,
Entity,
Value,
ValueKind,
store,
Address,
Bytes,
BigInt,
BigDecimal
} from "@graphprotocol/graph-ts";
export class RocketPoolProtocol extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
save(): void {
let id = this.get("id");
assert(id !== null, "Cannot save RocketPoolProtocol entity without an ID");
assert(
id.kind == ValueKind.STRING,
"Cannot save RocketPoolProtocol entity with non-string ID. " +
'Considering using .toHex() to convert the "id" to a string.'
);
store.set("RocketPoolProtocol", id.toString(), this);
}
static load(id: string): RocketPoolProtocol | null {
return store.get("RocketPoolProtocol", id) as RocketPoolProtocol | null;
}
get id(): string {
let value = this.get("id");
return value.toString();
}
set id(value: string) {
this.set("id", Value.fromString(value));
}
get stakers(): Array<string | null> {
let value = this.get("stakers");
return value.toStringArray();
}
set stakers(value: Array<string | null>) {
this.set("stakers", Value.fromStringArray(value));
}
get lastNetworkStakerBalanceCheckPoint(): string | null {
let value = this.get("lastNetworkStakerBalanceCheckPoint");
if (value === null || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toString();
}
}
set lastNetworkStakerBalanceCheckPoint(value: string | null) {
if (value === null) {
this.unset("lastNetworkStakerBalanceCheckPoint");
} else {
this.set(
"lastNetworkStakerBalanceCheckPoint",
Value.fromString(value as string)
);
}
}
}
export class Staker extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
save(): void {
let id = this.get("id");
assert(id !== null, "Cannot save Staker entity without an ID");
assert(
id.kind == ValueKind.STRING,
"Cannot save Staker entity with non-string ID. " +
'Considering using .toHex() to convert the "id" to a string.'
);
store.set("Staker", id.toString(), this);
}
static load(id: string): Staker | null {
return store.get("Staker", id) as Staker | null;
}
get id(): string {
let value = this.get("id");
return value.toString();
}
set id(value: string) {
this.set("id", Value.fromString(value));
}
get activeRETHBalance(): BigInt {
let value = this.get("activeRETHBalance");
return value.toBigInt();
}
set activeRETHBalance(value: BigInt) {
this.set("activeRETHBalance", Value.fromBigInt(value));
}
get totalETHRewards(): BigInt {
let value = this.get("totalETHRewards");
return value.toBigInt();
}
set totalETHRewards(value: BigInt) {
this.set("totalETHRewards", Value.fromBigInt(value));
}
get lastBalanceCheckpoint(): string | null {
let value = this.get("lastBalanceCheckpoint");
if (value === null || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toString();
}
}
set lastBalanceCheckpoint(value: string | null) {
if (value === null) {
this.unset("lastBalanceCheckpoint");
} else {
this.set("lastBalanceCheckpoint", Value.fromString(value as string));
}
}
get block(): BigInt {
let value = this.get("block");
return value.toBigInt();
}
set block(value: BigInt) {
this.set("block", Value.fromBigInt(value));
}
get blockTime(): BigInt {
let value = this.get("blockTime");
return value.toBigInt();
}
set blockTime(value: BigInt) {
this.set("blockTime", Value.fromBigInt(value));
}
}
export class RocketETHTransaction extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
save(): void {
let id = this.get("id");
assert(
id !== null,
"Cannot save RocketETHTransaction entity without an ID"
);
assert(
id.kind == ValueKind.STRING,
"Cannot save RocketETHTransaction entity with non-string ID. " +
'Considering using .toHex() to convert the "id" to a string.'
);
store.set("RocketETHTransaction", id.toString(), this);
}
static load(id: string): RocketETHTransaction | null {
return store.get("RocketETHTransaction", id) as RocketETHTransaction | null;
}
get id(): string {
let value = this.get("id");
return value.toString();
}
set id(value: string) {
this.set("id", Value.fromString(value));
}
get from(): string {
let value = this.get("from");
return value.toString();
}
set from(value: string) {
this.set("from", Value.fromString(value));
}
get amount(): BigInt {
let value = this.get("amount");
return value.toBigInt();
}
set amount(value: BigInt) {
this.set("amount", Value.fromBigInt(value));
}
get to(): string {
let value = this.get("to");
return value.toString();
}
set to(value: string) {
this.set("to", Value.fromString(value));
}
get block(): BigInt {
let value = this.get("block");
return value.toBigInt();
}
set block(value: BigInt) {
this.set("block", Value.fromBigInt(value));
}
get blockTime(): BigInt {
let value = this.get("blockTime");
return value.toBigInt();
}
set blockTime(value: BigInt) {
this.set("blockTime", Value.fromBigInt(value));
}
get transactionHash(): Bytes {
let value = this.get("transactionHash");
return value.toBytes();
}
set transactionHash(value: Bytes) {
this.set("transactionHash", Value.fromBytes(value));
}
}
export class NetworkStakerBalanceCheckpoint extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
save(): void {
let id = this.get("id");
assert(
id !== null,
"Cannot save NetworkStakerBalanceCheckpoint entity without an ID"
);
assert(
id.kind == ValueKind.STRING,
"Cannot save NetworkStakerBalanceCheckpoint entity with non-string ID. " +
'Considering using .toHex() to convert the "id" to a string.'
);
store.set("NetworkStakerBalanceCheckpoint", id.toString(), this);
}
static load(id: string): NetworkStakerBalanceCheckpoint | null {
return store.get(
"NetworkStakerBalanceCheckpoint",
id
) as NetworkStakerBalanceCheckpoint | null;
}
get id(): string {
let value = this.get("id");
return value.toString();
}
set id(value: string) {
this.set("id", Value.fromString(value));
}
get stakerEthActivelyStakingTotal(): BigInt {
let value = this.get("stakerEthActivelyStakingTotal");
return value.toBigInt();
}
set stakerEthActivelyStakingTotal(value: BigInt) {
this.set("stakerEthActivelyStakingTotal", Value.fromBigInt(value));
}
get stakerEthWaitingInDepositPoolTotal(): BigInt {
let value = this.get("stakerEthWaitingInDepositPoolTotal");
return value.toBigInt();
}
set stakerEthWaitingInDepositPoolTotal(value: BigInt) {
this.set("stakerEthWaitingInDepositPoolTotal", Value.fromBigInt(value));
}
get stakerEthInRocketEthContractTotal(): BigInt {
let value = this.get("stakerEthInRocketEthContractTotal");
return value.toBigInt();
}
set stakerEthInRocketEthContractTotal(value: BigInt) {
this.set("stakerEthInRocketEthContractTotal", Value.fromBigInt(value));
}
get stakerEthInPendingOrExitedMinipoolsTotal(): BigInt {
let value = this.get("stakerEthInPendingOrExitedMinipoolsTotal");
return value.toBigInt();
}
set stakerEthInPendingOrExitedMinipoolsTotal(value: BigInt) {
this.set(
"stakerEthInPendingOrExitedMinipoolsTotal",
Value.fromBigInt(value)
);
}
get stakerEthProtocolTotal(): BigInt {
let value = this.get("stakerEthProtocolTotal");
return value.toBigInt();
}
set stakerEthProtocolTotal(value: BigInt) {
this.set("stakerEthProtocolTotal", Value.fromBigInt(value));
}
get rEthCirculating(): BigInt {
let value = this.get("rEthCirculating");
return value.toBigInt();
}
set rEthCirculating(value: BigInt) {
this.set("rEthCirculating", Value.fromBigInt(value));
}
get rEthExchangeRate(): BigInt {
let value = this.get("rEthExchangeRate");
return value.toBigInt();
}
set rEthExchangeRate(value: BigInt) {
this.set("rEthExchangeRate", Value.fromBigInt(value));
}
get block(): BigInt {
let value = this.get("block");
return value.toBigInt();
}
set block(value: BigInt) {
this.set("block", Value.fromBigInt(value));
}
get blockTime(): BigInt {
let value = this.get("blockTime");
return value.toBigInt();
}
set blockTime(value: BigInt) {
this.set("blockTime", Value.fromBigInt(value));
}
}
export class StakerBalanceCheckpoint extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
save(): void {
let id = this.get("id");
assert(
id !== null,
"Cannot save StakerBalanceCheckpoint entity without an ID"
);
assert(
id.kind == ValueKind.STRING,
"Cannot save StakerBalanceCheckpoint entity with non-string ID. " +
'Considering using .toHex() to convert the "id" to a string.'
);
store.set("StakerBalanceCheckpoint", id.toString(), this);
}
static load(id: string): StakerBalanceCheckpoint | null {
return store.get(
"StakerBalanceCheckpoint",
id
) as StakerBalanceCheckpoint | null;
}
get id(): string {
let value = this.get("id");
return value.toString();
}
set id(value: string) {
this.set("id", Value.fromString(value));
}
get staker(): string {
let value = this.get("staker");
return value.toString();
}
set staker(value: string) {
this.set("staker", Value.fromString(value));
}
get networkStakerBalanceCheckpoint(): string {
let value = this.get("networkStakerBalanceCheckpoint");
return value.toString();
}
set networkStakerBalanceCheckpoint(value: string) {
this.set("networkStakerBalanceCheckpoint", Value.fromString(value));
}
get ethBalance(): BigInt {
let value = this.get("ethBalance");
return value.toBigInt();
}
set ethBalance(value: BigInt) {
this.set("ethBalance", Value.fromBigInt(value));
}
get rEthBalance(): BigInt {
let value = this.get("rEthBalance");
return value.toBigInt();
}
set rEthBalance(value: BigInt) {
this.set("rEthBalance", Value.fromBigInt(value));
}
get ethRewardsSincePreviousCheckpoint(): BigInt {
let value = this.get("ethRewardsSincePreviousCheckpoint");
return value.toBigInt();
}
set ethRewardsSincePreviousCheckpoint(value: BigInt) {
this.set("ethRewardsSincePreviousCheckpoint", Value.fromBigInt(value));
}
get block(): BigInt {
let value = this.get("block");
return value.toBigInt();
}
set block(value: BigInt) {
this.set("block", Value.fromBigInt(value));
}
get blockTime(): BigInt {
let value = this.get("blockTime");
return value.toBigInt();
}
set blockTime(value: BigInt) {
this.set("blockTime", Value.fromBigInt(value));
}
}