forked from AudiusProject/audius-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
323 lines (322 loc) · 13.3 KB
/
subgraph.template.yaml
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
specVersion: 0.0.2
description: Audius
repository: https://github.com/AudiusProject/audius-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: AudiusToken
network: {{network}}
source:
address: '{{audiusToken}}'
abi: AudiusToken
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- AudiusToken
abis:
- name: AudiusToken
file: ./abis/AudiusToken.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: Approval(indexed address,indexed address,uint256)
handler: handleApproval
file: ./src/mappings/audiusToken.ts
- kind: ethereum/contract
name: ClaimsManager
network: {{network}}
source:
address: '{{claimsManager}}'
abi: ClaimsManager
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- ClaimsManager
- DelegateManager
- Staking
abis:
- name: ClaimsManager
file: ./abis/ClaimsManager.json
- name: DelegateManager
file: ./abis/DelegateManager.json
- name: Staking
file: ./abis/Staking.json
eventHandlers:
- event: RoundInitiated(indexed uint256,indexed uint256,indexed uint256)
handler: handleRoundInitiated
- event: ClaimProcessed(indexed address,indexed uint256,uint256,indexed uint256)
handler: handleClaimProcessed
- event: CommunityRewardsTransferred(indexed address,indexed uint256)
handler: handleCommunityRewardsTransferred
- event: FundingAmountUpdated(indexed uint256)
handler: handleFundingAmountUpdated
- event: FundingRoundBlockDiffUpdated(indexed uint256)
handler: handleFundingRoundBlockDiffUpdated
- event: GovernanceAddressUpdated(indexed address)
handler: handleGovernanceAddressUpdated
- event: StakingAddressUpdated(indexed address)
handler: handleStakingAddressUpdated
- event: ServiceProviderFactoryAddressUpdated(indexed address)
handler: handleServiceProviderFactoryAddressUpdated
- event: DelegateManagerAddressUpdated(indexed address)
handler: handleDelegateManagerAddressUpdated
- event: RecurringCommunityFundingAmountUpdated(indexed uint256)
handler: handleRecurringCommunityFundingAmountUpdated
- event: CommunityPoolAddressUpdated(indexed address)
handler: handleCommunityPoolAddressUpdated
file: ./src/mappings/claimsManager.ts
- kind: ethereum/contract
name: DelegateManager
network: {{network}}
source:
address: '{{delegateManager}}'
abi: DelegateManager
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- DelegateManager
- Staking
abis:
- name: DelegateManager
file: ./abis/DelegateManager.json
- name: Staking
file: ./abis/Staking.json
eventHandlers:
- event: IncreaseDelegatedStake(indexed address,indexed address,indexed uint256)
handler: handleIncreaseDelegatedStake
- event: UndelegateStakeRequested(indexed address,indexed address,indexed uint256,uint256)
handler: handleUndelegateStakeRequested
- event: UndelegateStakeRequestCancelled(indexed address,indexed address,indexed uint256)
handler: handleUndelegateStakeRequestCancelled
- event: UndelegateStakeRequestEvaluated(indexed address,indexed address,indexed uint256)
handler: handleUndelegateStakeRequestEvaluated
- event: Claim(indexed address,indexed uint256,indexed uint256)
handler: handleClaim
- event: Slash(indexed address,indexed uint256,indexed uint256)
handler: handleSlash
- event: RemoveDelegatorRequested(indexed address,indexed address,indexed uint256)
handler: handleRemoveDelegatorRequested
- event: RemoveDelegatorRequestCancelled(indexed address,indexed address)
handler: handleRemoveDelegatorRequestCancelled
- event: RemoveDelegatorRequestEvaluated(indexed address,indexed address,indexed uint256)
handler: handleRemoveDelegatorRequestEvaluated
- event: MaxDelegatorsUpdated(indexed uint256)
handler: handleMaxDelegatorsUpdated
- event: MinDelegationUpdated(indexed uint256)
handler: handleMinDelegationUpdated
- event: UndelegateLockupDurationUpdated(indexed uint256)
handler: handleUndelegateLockupDurationUpdated
- event: GovernanceAddressUpdated(indexed address)
handler: handleGovernanceAddressUpdated
- event: StakingAddressUpdated(indexed address)
handler: handleStakingAddressUpdated
- event: ServiceProviderFactoryAddressUpdated(indexed address)
handler: handleServiceProviderFactoryAddressUpdated
- event: ClaimsManagerAddressUpdated(indexed address)
handler: handleClaimsManagerAddressUpdated
- event: RemoveDelegatorLockupDurationUpdated(indexed uint256)
handler: handleRemoveDelegatorLockupDurationUpdated
- event: RemoveDelegatorEvalDurationUpdated(indexed uint256)
handler: handleRemoveDelegatorEvalDurationUpdated
file: ./src/mappings/DelegateManager.ts
- kind: ethereum/contract
name: Governance
network: {{network}}
source:
address: '{{governance}}'
abi: Governance
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- Governance
abis:
- name: Governance
file: ./abis/Governance.json
eventHandlers:
- event: ProposalSubmitted(indexed uint256,indexed address,string,string)
handler: handleProposalSubmitted
- event: ProposalVoteSubmitted(indexed uint256,indexed address,indexed uint8,uint256)
handler: handleProposalVoteSubmitted
- event: ProposalVoteUpdated(indexed uint256,indexed address,indexed uint8,uint256,uint8)
handler: handleProposalVoteUpdated
- event: ProposalOutcomeEvaluated(indexed uint256,indexed uint8,uint256,uint256,uint256)
handler: handleProposalOutcomeEvaluated
- event: ProposalTransactionExecuted(indexed uint256,indexed bool,bytes)
handler: handleProposalTransactionExecuted
- event: GuardianTransactionExecuted(indexed address,uint256,indexed string,indexed bytes,bytes)
handler: handleGuardianTransactionExecuted
- event: ProposalVetoed(indexed uint256)
handler: handleProposalVetoed
- event: RegistryAddressUpdated(indexed address)
handler: handleRegistryAddressUpdated
- event: GuardianshipTransferred(indexed address)
handler: handleGuardianshipTransferred
- event: VotingPeriodUpdated(indexed uint256)
handler: handleVotingPeriodUpdated
- event: ExecutionDelayUpdated(indexed uint256)
handler: handleExecutionDelayUpdated
- event: VotingQuorumPercentUpdated(indexed uint256)
handler: handleVotingQuorumPercentUpdated
- event: MaxInProgressProposalsUpdated(indexed uint256)
handler: handleMaxInProgressProposalsUpdated
file: ./src/mappings/governance.ts
- kind: ethereum/contract
name: Registry
network: {{network}}
source:
address: '{{registry}}'
abi: Registry
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- AudiusToken
- ClaimsManager
- DelegateManager
- Governance
- Registry
- ServiceProviderFactory
- ServiceTypeManager
- Staking
abis:
- name: AudiusToken
file: ./abis/AudiusToken.json
- name: ClaimsManager
file: ./abis/ClaimsManager.json
- name: DelegateManager
file: ./abis/DelegateManager.json
- name: Governance
file: ./abis/Governance.json
- name: Registry
file: ./abis/Registry.json
- name: ServiceProviderFactory
file: ./abis/ServiceProviderFactory.json
- name: ServiceTypeManager
file: ./abis/ServiceTypeManager.json
- name: Staking
file: ./abis/Staking.json
eventHandlers:
- event: ContractAdded(indexed bytes32,indexed address)
handler: handleContractAdded
- event: ContractRemoved(indexed bytes32,indexed address)
handler: handleContractRemoved
- event: ContractUpgraded(indexed bytes32,indexed address,indexed address)
handler: handleContractUpgraded
file: ./src/mappings/registry.ts
- kind: ethereum/contract
name: ServiceProviderFactory
network: {{network}}
source:
address: '{{serviceProviderFactory}}'
abi: ServiceProviderFactory
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- ServiceProviderFactory
abis:
- name: ServiceProviderFactory
file: ./abis/ServiceProviderFactory.json
eventHandlers:
- event: RegisteredServiceProvider(indexed uint256,indexed bytes32,indexed address,string,uint256)
handler: handleRegisteredServiceProvider
- event: DeregisteredServiceProvider(indexed uint256,indexed bytes32,indexed address,string,uint256)
handler: handleDeregisteredServiceProvider
- event: IncreasedStake(indexed address,indexed uint256,indexed uint256)
handler: handleIncreasedStake
- event: DecreaseStakeRequested(indexed address,indexed uint256,indexed uint256)
handler: handleDecreaseStakeRequested
- event: DecreaseStakeRequestCancelled(indexed address,indexed uint256,indexed uint256)
handler: handleDecreaseStakeRequestCancelled
- event: DecreaseStakeRequestEvaluated(indexed address,indexed uint256,indexed uint256)
handler: handleDecreaseStakeRequestEvaluated
- event: EndpointUpdated(indexed bytes32,indexed address,string,string,indexed uint256)
handler: handleEndpointUpdated
- event: DelegateOwnerWalletUpdated(indexed address,indexed bytes32,indexed uint256,address)
handler: handleDelegateOwnerWalletUpdated
- event: DeployerCutUpdateRequested(indexed address,indexed uint256,indexed uint256)
handler: handleDeployerCutUpdateRequested
- event: DeployerCutUpdateRequestCancelled(indexed address,indexed uint256,indexed uint256)
handler: handleDeployerCutUpdateRequestCancelled
- event: DeployerCutUpdateRequestEvaluated(indexed address,indexed uint256)
handler: handleDeployerCutUpdateRequestEvaluated
- event: DecreaseStakeLockupDurationUpdated(indexed uint256)
handler: handleDecreaseStakeLockupDurationUpdated
- event: UpdateDeployerCutLockupDurationUpdated(indexed uint256)
handler: handleUpdateDeployerCutLockupDurationUpdated
- event: GovernanceAddressUpdated(indexed address)
handler: handleGovernanceAddressUpdated
- event: StakingAddressUpdated(indexed address)
handler: handleStakingAddressUpdated
- event: ClaimsManagerAddressUpdated(indexed address)
handler: handleClaimsManagerAddressUpdated
- event: DelegateManagerAddressUpdated(indexed address)
handler: handleDelegateManagerAddressUpdated
- event: ServiceTypeManagerAddressUpdated(indexed address)
handler: handleServiceTypeManagerAddressUpdated
file: ./src/mappings/serviceProviderFactory.ts
- kind: ethereum/contract
name: ServiceTypeManager
network: {{network}}
source:
address: '{{serviceTypeManager}}'
abi: ServiceTypeManager
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- ServiceTypeManager
abis:
- name: ServiceTypeManager
file: ./abis/ServiceTypeManager.json
eventHandlers:
- event: SetServiceVersion(indexed bytes32,indexed bytes32)
handler: handleSetServiceVersion
- event: ServiceTypeAdded(indexed bytes32,indexed uint256,indexed uint256)
handler: handleServiceTypeAdded
- event: ServiceTypeRemoved(indexed bytes32)
handler: handleServiceTypeRemoved
file: ./src/mappings/serviceTypeManager.ts
- kind: ethereum/contract
name: Staking
network: {{network}}
source:
address: '{{staking}}'
abi: Staking
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- Staking
abis:
- name: Staking
file: ./abis/Staking.json
eventHandlers:
- event: Staked(indexed address,uint256,uint256)
handler: handleStaked
- event: Unstaked(indexed address,uint256,uint256)
handler: handleUnstaked
- event: Slashed(indexed address,uint256,uint256)
handler: handleSlashed
file: ./src/mappings/staking.ts