-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.ts
71 lines (59 loc) · 1.58 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
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
import {
TypedMap,
Entity,
Value,
ValueKind,
store,
Bytes,
BigInt,
BigDecimal
} from "@graphprotocol/graph-ts";
export class UserVest extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}
save(): void {
let id = this.get("id");
assert(id != null, "Cannot save UserVest entity without an ID");
if (id) {
assert(
id.kind == ValueKind.STRING,
`Entities of type UserVest must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
);
store.set("UserVest", id.toString(), this);
}
}
static load(id: string): UserVest | null {
return changetype<UserVest | null>(store.get("UserVest", id));
}
get id(): string {
let value = this.get("id");
return value!.toString();
}
set id(value: string) {
this.set("id", Value.fromString(value));
}
get vestingAmount(): BigInt {
let value = this.get("vestingAmount");
return value!.toBigInt();
}
set vestingAmount(value: BigInt) {
this.set("vestingAmount", Value.fromBigInt(value));
}
get vestedAmount(): BigInt {
let value = this.get("vestedAmount");
return value!.toBigInt();
}
set vestedAmount(value: BigInt) {
this.set("vestedAmount", Value.fromBigInt(value));
}
get totalVestedAmount(): BigInt {
let value = this.get("totalVestedAmount");
return value!.toBigInt();
}
set totalVestedAmount(value: BigInt) {
this.set("totalVestedAmount", Value.fromBigInt(value));
}
}