-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
63 lines (57 loc) · 1.23 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
type Transaction @entity {
"Transaction hash"
id: ID!
"Block number"
block: BigInt!
timestamp: BigInt!
}
type StakingContract @entity {
"Staking contract address"
id: ID!
"Creation transaction"
transaction: Transaction!
}
interface Action @entity {
"Equals to: <Grant ID>-<Transaction Hash>"
id: ID!
"Raw keep amount"
amount: BigInt!
grant: Grant!
transaction: Transaction!
}
type Stake implements Action @entity {
"Equals to: <Grant ID>-<Transaction Hash>"
id: ID!
"Raw keep amount"
amount: BigInt!
grant: Grant!
transaction: Transaction!
}
type Withdrawal implements Action @entity {
"Equals to: <Grant ID>-<Transaction Hash>"
id: ID!
"Raw keep amount"
amount: BigInt!
grant: Grant!
transaction: Transaction!
}
enum GrantStatus {
Active
Revoked
}
type Grant @entity {
"DB id (On-chain token grant id)"
id: ID!
"On-chain token grant id"
grant_id: BigInt!
"Stakes associated with grant"
stakes: [Stake!] @derivedFrom(field: "grant")
"Withdrawals associated with grant"
withdrawals: [Withdrawal!] @derivedFrom(field: "grant")
"Token grant status (Active/Revoked)"
status: GrantStatus!
"Operator address"
operator: Bytes
"Creation transaction"
transaction: Transaction!
}