-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.graphql
74 lines (68 loc) · 2.22 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
type Timelock @entity {
id: ID!
platform: Platform!
currentAdmin: String # Optional
spells: [Spell]! @derivedFrom(field: "timelock")
}
type Platform @entity {
id: ID!
currentAdmin: String # Optional
usesAdmin: Boolean!
usesTimelock: Boolean!
spells: [Spell]! @derivedFrom(field: "platform")
targets: [Target]! @derivedFrom(field: "platform")
timelocks: [Timelock]! @derivedFrom(field: "platform")
}
type Spell @entity {
id: ID! # Uses various unique representations (do not use tx hash; it will not be the same across lifecycle events)
description: String # Optional
eta: BigInt! # Set to 0 if not applicable
createdAtTimestamp: BigInt!
createdAtTransaction: String!
expiresAtTimestamp: BigInt! # Set to 0 if not applicable
value: BigInt!
functionName: String! # Human-readable function name
signature: String! # Function signature (keccak hash)
data: String! # Prepend with 0x
target: Target!
timelock: Timelock!
platform: Platform!
isCancelled: Boolean!
isExecuted: Boolean!
cancelledAtTimestamp: BigInt # Optional
cancelledAtTransaction: String # Optional
executedAtTimestamp: BigInt # Optional
executedAtTransaction: String # Optional
}
type Target @entity {
id: ID!
name: String!
platform: Platform!
params: [Param]! @derivedFrom(field: "target")
spells: [Spell]! @derivedFrom(field: "target")
}
type Param @entity {
id: ID!
description: String! # Human-readable description
currentValue: String! # String representation of the value
platform: Platform! # Affected platform
target: Target! # Affected contract
history: [ParamHistory]! @derivedFrom(field:"param")
proposals: [ParamProposal]! @derivedFrom(field:"param")
}
type ParamHistory @entity {
id: ID!
param: Param!
oldValue: String!
newValue: String!
changedInSpell: Spell! # Spell that changed the Param when it was executed
timestamp: BigInt! # Time of spell execution
}
type ParamProposal @entity {
id: ID!
param: Param!
proposedValue: String!
proposedInSpell: Spell!
timestamp: BigInt! # Time of spell creation
eta: BigInt! # Eta of spell
}