-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschema.graphql
186 lines (169 loc) · 3.1 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
enum ProposalType {
MINT
BURN
CALL
VPERIOD
GPERIOD
QUORUM
SUPERMAJORITY
TYPE
PAUSE
EXTENSION
ESCAPE
DOCS
}
enum VoteType {
SIMPLE_MAJORITY
SIMPLE_MAJORITY_QUORUM_REQUIRED
SUPERMAJORITY
SUPERMAJORITY_QUORUM_REQUIRED
}
enum SaleType {
PUBLIC
LIMITED
}
type Kali @entity {
id: ID!
swapRate: Int
}
type DAO @entity {
id: ID!
address: Bytes!
birth: BigInt!
founder: Bytes!
token: Token! @derivedFrom(field: "dao")
docs: String!
votingPeriod: BigInt!
gracePeriod: BigInt!
members: [Member!]! @derivedFrom(field: "dao")
proposals: [Proposal!] @derivedFrom(field: "dao")
extensions: [Bytes!]
quorum: BigInt!
supermajority: BigInt!
crowdsale: Crowdsale @derivedFrom(field: "dao")
redemption: Redemption @derivedFrom(field: "dao")
tribute: Tribute @derivedFrom(field: "dao")
}
type Token @entity {
id: ID!
dao: DAO!
name: String
symbol: String
totalSupply: BigInt
paused: Boolean
}
type Member @entity {
id: ID!
address: Bytes!
dao: DAO!
shares: BigInt!
delegate: Delegate
proposals: [Proposal!]
spender: Bytes
approval: Boolean
amountApproved: BigInt
}
type Delegate @entity {
id: ID!
dao: DAO!
balance: BigInt
delegatee: [Member!] @derivedFrom(field: "delegate")
}
type Proposal @entity {
id: ID!
dao: DAO!
serial: BigInt!
transactionHash: Bytes!
creationTime: BigInt!
votingStarts: BigInt!
proposer: Bytes!
proposalType: ProposalType
accounts: [Bytes!]
amounts: [BigInt!]
payloads: [Bytes!]
description: String!
sponsor: Bytes
sponsored: Boolean
cancelled: Boolean
escaped: Boolean
status: Boolean
votes: [Vote!] @derivedFrom(field: "proposal")
isTribute: Boolean
tribute: TributeProposal
}
type Vote @entity {
id: ID!
dao: DAO!
proposal: Proposal!
voter: Bytes
vote: Boolean
weight: BigInt
}
type Crowdsale @entity {
id: ID!
dao: DAO!
version: Int!
active: Boolean!
listId: BigInt
list: AccessList
purchaseTokenAddress: Bytes
purchaseTokenName: String
purchaseTokenSymbol: String
purchaseTokenDecimals: Int
purchaseMultiplier: BigInt
purchaseLimit: BigInt
saleEnds: BigInt
details: String
purchase: [Purchase!] @derivedFrom(field: "crowdsale")
amountPurchased: BigInt!
personalLimit: BigInt
type: SaleType
}
type Purchase @entity {
id: ID!
crowdsale: Crowdsale!
purchaser: Bytes!
purchased: BigInt!
}
type AccessList @entity {
id: ID!
creator: Bytes
listed: [User!] @derivedFrom(field: "list")
merkleRoot: Bytes
uri: String
}
type User @entity {
id: ID!
list: AccessList
address: Bytes
approved: Boolean
}
type Redemption @entity {
id: ID!
dao: DAO!
active: Boolean!
starts: BigInt!
redeemables: [Bytes!]
quit: [Quit!] @derivedFrom(field: "redemption")
}
type Quit @entity {
id: ID!
redemption: Redemption!
member: Member!
amount: BigInt!
}
type Tribute @entity {
id: ID!
dao: DAO!
active: Boolean!
proposal: [TributeProposal!] @derivedFrom(field: "tribute")
}
type TributeProposal @entity {
id: ID!
tribute: Tribute
proposer: Bytes!
asset: Bytes!
isNFT: Boolean!
value: BigInt!
status: String
}