-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
173 lines (160 loc) · 3.55 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
type Governor @entity {
id: ID!
proposalCount: Int!
quorumVotes: BigInt!
proposalThreshold: BigInt!
votingDelay: Int!
proposalMaxOperations: Int!
votingPeriod: Int!
breakGlassGuardian: Bytes!
timelock: Bytes!
}
type MultiGovernor @entity {
id: ID!
proposalCount: Int!
quorumVotes: BigInt!
proposalThreshold: BigInt!
votingPeriod: Int!
breakGlassGuardian: Bytes!
pauseGuardian: Bytes!
}
type VoteCollector @entity {
# {vote collector address}-{chain id}
id: ID!
proposalCount: Int!
}
type CrossChainProposal @entity {
# {vote collector address}-{proposal id}
id: ID!
voteCollector: VoteCollector!
proposalID: BigInt!
proposalIDOffset: BigInt!
startTimestamp: BigInt!
endTimestamp: BigInt!
voteCollectionEndTimestamp: BigInt!
startBlock: BigInt!
forVotes: BigInt!
againstVotes: BigInt!
abstainVotes: BigInt!
totalVotes: BigInt!
broadcastTimestamp: BigInt!
}
type CrossChainVoteTotal @entity {
# {source chain}-{proposal id}
id: ID!
proposal: Proposal!
blockNumber: BigInt!
sourceChain: BigInt!
forVotes: BigInt!
againstVotes: BigInt!
abstainVotes: BigInt!
broadcastTimestamp: BigInt!
}
type Proposal @entity {
# proposal id
id: ID!
# add this because we want to support range query by proposal id, and the `id` field doesn't support this as it is String
proposalID: Int!
proposer: Proposer!
targets: [Bytes!]!
values: [BigInt!]!
signatures: [String!]!
calldatas: [Bytes!]!
startTimestamp: BigInt!
endTimestamp: BigInt!
startBlock: BigInt!
canceled: Boolean!
executed: Boolean!
forVotes: BigInt!
againstVotes: BigInt!
abstainVotes: BigInt!
totalVotes: BigInt!
remoteForVotes: BigInt!
remoteAgainstVotes: BigInt!
remoteAbstainVotes: BigInt!
remoteTotalVotes: BigInt!
description: String!
stateChanges: [ProposalStateChange!]! @derivedFrom(field: "proposal")
}
enum ProposalState {
CREATED
CANCELED
EXECUTED
QUEUED
}
type ProposalStateChange @entity {
# {txn hash}-{log index}
id: ID!
proposal: Proposal!
txnHash: Bytes!
blockNumber: BigInt!
newState: ProposalState!
queueEta: BigInt # only set this field when newState == QUEUED
messages: [Message!]! @derivedFrom(field: "proposalStateChange")
}
type Vote @entity {
# {txn hash}-{log index}
id: ID!
txnHash: Bytes!
blockNumber: BigInt!
timestamp: BigInt!
voter: Voter!
proposal: Proposal!
voteValue: Int!
votes: BigInt!
}
type Proposer @entity {
id: ID!
proposals: [Proposal!]! @derivedFrom(field: "proposer")
}
type Voter @entity {
id: ID!
votes: [Vote!]! @derivedFrom(field: "voter")
}
type Message @entity {
# txn hash
id: ID!
proposalStateChange: ProposalStateChange
sender: Bytes
sequence: BigInt
nonce: Int
payload: Bytes
consistencyLevel: Int
timestamp: BigInt
}
"""
Account is an ETH address that has interacted with the xWELL token
"""
type Account @entity {
"User ETH address"
id: ID!
"WELL Delegate"
delegatedTo: Account
"WELL Voting Power"
votingPower: BigInt!
"WELL Balance"
WELLBalance: BigInt!
"xWELL Delegate"
xdelegatedTo: Account
"xWELL Voting Power"
xvotingPower: BigInt!
"xWELL Balance"
xWELLBalance: BigInt!
"WWELL Balance"
WWELLBalance: BigInt!
"Total Deposits"
totalDeposits: BigInt!
"Total Withdrawals"
totalWithdrawals: BigInt!
}
"""
A daily snapshot of the circulating supply of WELL, MFAM, or xWELL
"""
type CirculatingSupplyDailySnapshot @entity {
" {token address}-{epoch days} "
id: ID!
"Current circulating supply"
circulatingSupply: BigInt!
"Captured at timestamp"
captureTimestamp: BigInt!
}