forked from dhedge/dhedge-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dhedge.graphql
207 lines (183 loc) · 4.22 KB
/
dhedge.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
type DaoAddressSet @entity {
id: ID!
dao: Bytes! # address
}
type DaoFeeSet @entity {
id: ID!
numerator: BigInt! # uint256
denominator: BigInt! # uint256
}
type ExitFeeCooldownSet @entity {
id: ID!
cooldown: BigInt! # uint256
}
type ExitFeeSet @entity {
id: ID!
numerator: BigInt! # uint256
denominator: BigInt! # uint256
}
type FundCreated @entity {
id: ID!
fundAddress: Bytes! # address
isPoolPrivate: Boolean! # bool
fundName: String! # string
managerName: String! # string
manager: Bytes! # address
time: BigInt! # uint256
managerFeeNumerator: BigInt! # uint256
managerFeeDenominator: BigInt! # uint256
}
type MaximumSupportedAssetCountSet @entity {
id: ID!
count: BigInt! # uint256
}
type OwnershipTransferred @entity {
id: ID!
previousOwner: Bytes! # address
newOwner: Bytes! # address
}
type ProxyCreated @entity {
id: ID!
proxy: Bytes! # address
}
type Approval @entity {
id: ID!
owner: Bytes! # address
spender: Bytes! # address
value: BigInt! # uint256
}
type AssetAdded @entity {
id: ID!
fundAddress: Bytes! # address
manager: Bytes! # address
assetKey: Bytes! # bytes32
}
type AssetRemoved @entity {
id: ID!
fundAddress: Bytes! # address
manager: Bytes! # address
assetKey: Bytes! # address
}
type Deposit @entity {
id: ID!
fundAddress: Bytes! # address
investor: Bytes! # address
valueDeposited: BigInt! # uint256
fundTokensReceived: BigInt! # uint256
totalInvestorFundTokens: BigInt! # uint256
fundValue: BigInt! # uint256
totalSupply: BigInt! # uint256
time: BigInt! # uint256
manager: Bytes! # address
blockNumber: Int!
pool: Pool!
}
type Exchange @entity {
id: ID!
fundAddress: Bytes! # address
manager: Bytes! # address
sourceKey: Bytes! # bytes32
sourceAmount: BigInt! # uint256
destinationKey: Bytes! # bytes32
destinationAmount: BigInt! # uint256
time: BigInt! # uint256
totalSupply: BigInt! # uint256
fundValue: BigInt! # uint256
blockNumber: Int!
pool: Pool!
}
type ManagerFeeMinted @entity {
id: ID!
pool: Bytes! # address
manager: Bytes! # address
available: BigInt! # uint256
daoFee: BigInt! # uint256
managerFee: BigInt! # uint256
tokenPriceAtLastFeeMint: BigInt! # uint256
blockNumber: Int!
}
type ManagerFeeSet @entity {
id: ID!
fundAddress: Bytes! # address
manager: Bytes! # address
numerator: BigInt! # uint256
denominator: BigInt! # uint256
}
type ManagerUpdated @entity {
id: ID!
newManager: Bytes! # address
newManagerName: String! # string
}
type PoolPrivacyUpdated @entity {
id: ID!
isPoolPrivate: Boolean! # bool
}
type Transfer @entity {
id: ID!
from: Bytes! # address
to: Bytes! # address
value: BigInt! # uint256
}
type Withdrawal @entity {
id: ID!
fundAddress: Bytes! # address
investor: Bytes! # address
valueWithdrawn: BigInt! # uint256
fundTokensWithdrawn: BigInt! # uint256
totalInvestorFundTokens: BigInt! # uint256
fundValue: BigInt! # uint256
totalSupply: BigInt! # uint256
time: BigInt! # uint256
manager: Bytes! # address
pool: Pool!
}
type Pool @entity {
id: ID!
fundAddress: Bytes! # address
name: String! # string
manager: Bytes! # address
managerName: String! # string`
totalSupply: BigInt! # uint256
fundValue: BigInt! # uint256
tokenPrice: BigInt! # uint256
exchanges: [Exchange!]! @derivedFrom(field: "pool")
deposits: [Deposit!]! @derivedFrom(field: "pool")
withdrawals: [Withdrawal!]! @derivedFrom(field: "pool")
isPrivatePool: Boolean! # bool
}
# RatesUpdated tracks this event from the ExchangeRates.sol contract
type RatesUpdated @entity {
id: ID!
from: Bytes! # address
currencyKeys: [Bytes!]! # bytes4[]
newRates: [BigInt!]! # uint256[]
gasPrice: BigInt!
block: BigInt!
timestamp: BigInt!
}
# An individual RateUpdate - split out of RatesUpdated event
type RateUpdate @entity {
id: ID!
currencyKey: Bytes!
synth: String!
rate: BigInt!
block: BigInt!
timestamp: BigInt!
}
# A chainlink Answer
type AggregatorAnswer @entity {
id: ID!
currencyKey: Bytes!
synth: String!
aggregator: Bytes!
rate: BigInt!
roundId: BigInt!
block: BigInt!
timestamp: BigInt!
}
type LatestRate @entity {
" Name of synth. E.g. sUSD "
id: ID!
" Synth USD rate with 18 decimals "
rate: BigInt!
}