generated from rajdeep7Singh/squid-substrate-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
259 lines (236 loc) · 4.32 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
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
enum ProposalType {
DemocracyProposal
TechCommitteeProposal
TreasuryProposal
Referendum
CouncilMotion
Bounty
Tip
ChildBounty
ReferendumV2
FellowshipReferendum
}
enum ProposalStatus {
Noted
Proposed
Tabled
Started
Passed
NotPassed
Cancelled
Executed
Used
Invalid
Missing
Reaped
Approved
Disapproved
Closed
Awarded
Added
Rejected
Retracted
Slashed
Active
Extended
Claimed
Unrequested
Requested
Submitted
Killed
Cleared
Deciding
ConfirmStarted
ConfirmAborted
Confirmed
DecisionDepositPlaced
TimedOut
Opened
}
type Preimage @entity {
id: ID!
proposer: String
hash: String! @index
deposit: BigInt
length: Int
proposedCall: ProposedCall
section: String
method: String
status: ProposalStatus!
createdAtBlock: Int! @index
createdAt: DateTime! @index
updatedAtBlock: Int
updatedAt: DateTime
}
type MotionThreshold {
value: Int!
}
enum ReferendumThresholdType {
SuperMajorityApprove
SuperMajorityAgainst
SimpleMajority
}
type ReferendumThreshold {
type: ReferendumThresholdType!
}
union Threshold = MotionThreshold | ReferendumThreshold
type Proposal @entity {
id: ID!
type: ProposalType! @index
hash: String @index
index: Int @index
proposer: String
deposit: BigInt
threshold: Threshold
end: Int
delay: Int
curator: String
payee: String
reward: BigInt
fee: BigInt
bond: BigInt
curatorDeposit: BigInt
description: String
parentBountyIndex: Int
proposalArguments: ProposedCall
proposalArgumentHash: String
voting: [Vote!] @derivedFrom(field: "proposal")
convictionVoting: [ConvictionVote!] @derivedFrom(field: "proposal")
preimage: Preimage
status: ProposalStatus!
statusHistory: [StatusHistory!] @derivedFrom(field: "proposal")
trackNumber: Int
origin: String
enactmentAtBlock: Int
enactmentAfterBlock: Int
submittedAtBlock: Int
submissionDeposit: SubmissionDeposit
decisionDeposit: DecisionDeposit
deciding: Deciding
tally: Tally
executeAtBlockNumber: Int
executedAt: DateTime
group: ProposalGroup
createdAtBlock: Int! @index
createdAt: DateTime! @index
endedAtBlock: Int
endedAt: DateTime
updatedAtBlock: Int @index
updatedAt: DateTime @index
}
type Tally {
ayes: BigInt
nays: BigInt
support: BigInt
bareAyes: BigInt
}
type DecisionDeposit {
who: String
amount: BigInt
}
type SubmissionDeposit {
who: String
amount: BigInt
}
type Deciding {
since: Int
confirming: Int
}
type StatusHistory @entity {
id: ID!
proposal: Proposal!
status: ProposalStatus!
block: Int!
timestamp: DateTime!
}
type ProposedCall {
section: String!
method: String!
args: JSON
description: String!
}
enum VoteDecision {
yes
no
abstain
split
splitAbstain
}
type StandardVoteBalance {
value: BigInt
}
type SplitVoteBalance {
aye: BigInt
nay: BigInt
abstain: BigInt
}
union VoteBalance = StandardVoteBalance | SplitVoteBalance
enum VoteType {
Referendum
Motion
ReferendumV2
Fellowship
DemocracyProposal
}
type Vote @entity {
id: ID!
voter: String
proposalId: ID!
proposal: Proposal!
blockNumber: Int! @index
timestamp: DateTime! @index
decision: VoteDecision
balance: VoteBalance
lockPeriod: Int
type: VoteType
}
type Tippers @entity {
id: ID!
hash: String! @index
tipper: String
value: BigInt
proposal: Proposal!
createdAtBlock: Int! @index
createdAt: DateTime! @index
}
type ProposalGroup @entity {
id: ID!
treasuryIndex: Int @index
bountyIndex: Int @index
tipHash: String @index
councilMotionIndex: Int @index
democracyProposalIndex: Int @index
referendumIndex: Int @index
techCommitteeProposalIndex: Int @index
referendumV2Index: Int @index
proposals: [Proposal] @derivedFrom(field: "group")
}
type ConvictionVote @entity {
id: ID!
voter: String
proposalId: ID!
proposalIndex: Int! @index
proposal: Proposal!
createdAtBlock: Int! @index
removedAtBlock: Int @index
createdAt: DateTime! @index
removedAt: DateTime @index
decision: VoteDecision!
balance: VoteBalance!
lockPeriod: Int
delegatedTo: String
isDelegated: Boolean
type: VoteType!
}
type VotingDelegation @entity {
id: ID!
from: String! @index
to: String! @index
balance: BigInt
lockPeriod: Int!
track: Int
createdAt: DateTime!
createdAtBlock: Int! @index
endedAt: DateTime
endedAtBlock: Int
}