-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
372 lines (371 loc) · 14.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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
specVersion: 0.0.6
description: Mimic Finance V3
repository: https://github.com/mimic-fi/v3-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Registry
network: {{network}}
source:
address: '{{registryAddress}}'
abi: Registry
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Registry
abis:
- name: Registry
file: ./node_modules/@mimic-fi/v3-registry/artifacts/contracts/interfaces/IRegistry.sol/IRegistry.json
eventHandlers:
- event: Registered(indexed address,string,bool)
handler: handleRegistered
- event: Deprecated(indexed address)
handler: handleDeprecated
file: ./src/Registry.ts
- kind: ethereum/contract
name: Deployer
network: {{network}}
source:
address: '{{deployerAddress}}'
abi: Deployer
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Deployer
abis:
- name: Deployer
file: ./node_modules/@mimic-fi/v3-deployer/artifacts/contracts/interfaces/IDeployer.sol/IDeployer.json
- name: Authorizer
file: ./node_modules/@mimic-fi/v3-authorizer/artifacts/contracts/interfaces/IAuthorizer.sol/IAuthorizer.json
- name: PriceOracle
file: ./node_modules/@mimic-fi/v3-price-oracle/artifacts/contracts/interfaces/IPriceOracle.sol/IPriceOracle.json
- name: SmartVault
file: ./node_modules/@mimic-fi/v3-smart-vault/artifacts/contracts/interfaces/ISmartVault.sol/ISmartVault.json
- name: Task
file: ./node_modules/@mimic-fi/v3-tasks/artifacts/contracts/interfaces/ITask.sol/ITask.json
eventHandlers:
- event: AuthorizerDeployed(string,string,address,address)
handler: handleAuthorizerDeployed
- event: PriceOracleDeployed(string,string,address,address)
handler: handlePriceOracleDeployed
- event: SmartVaultDeployed(string,string,address,address)
handler: handleSmartVaultDeployed
- event: TaskDeployed(string,string,address,address)
handler: handleTaskDeployed
file: ./src/Deployer.ts
- kind: ethereum/contract
name: Relayer_1
network: {{network}}
source:
address: '{{relayer1Address}}'
abi: Relayer
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Relayer
abis:
- name: Relayer
file: ./node_modules/@mimic-fi/v3-relayer/artifacts/contracts/interfaces/IRelayer.sol/IRelayer.json
- name: Task
file: ./node_modules/@mimic-fi/v3-tasks/artifacts/contracts/interfaces/ITask.sol/ITask.json
- name: ERC20
file: ./abis/IERC20.json
- name: AggregatorV3Interface
file: ./node_modules/@chainlink/contracts/abi/v0.8/AggregatorV3Interface.json
eventHandlers:
- event: Deposited(indexed address,uint256)
handler: handleDeposited
- event: GasPaid(indexed address,uint256,uint256)
handler: handleGasPaid
- event: QuotaPaid(indexed address,uint256)
handler: handleQuotaPaid
- event: SmartVaultCollectorSet(indexed address,indexed address)
handler: handleSmartVaultCollectorSet
- event: SmartVaultMaxQuotaSet(indexed address,uint256)
handler: handleSmartVaultMaxQuotaSet
- event: TaskExecuted(indexed address,indexed address,bytes,bool,bytes,uint256,uint256)
handler: handleTaskExecuted
- event: Withdrawn(indexed address,uint256)
handler: handleWithdrawn
- event: DefaultCollectorSet(indexed address)
handler: handleDefaultDefaultCollectorSet
- event: ExecutorSet(indexed address,bool)
handler: handleExecutorSet
file: ./src/Relayer.ts
- kind: ethereum/contract
name: Relayer_2
network: {{network}}
source:
address: '{{relayer2Address}}'
abi: Relayer
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Relayer
abis:
- name: Relayer
file: ./node_modules/@mimic-fi/v3-relayer/artifacts/contracts/interfaces/IRelayer.sol/IRelayer.json
- name: Task
file: ./node_modules/@mimic-fi/v3-tasks/artifacts/contracts/interfaces/ITask.sol/ITask.json
- name: ERC20
file: ./abis/IERC20.json
- name: AggregatorV3Interface
file: ./node_modules/@chainlink/contracts/abi/v0.8/AggregatorV3Interface.json
eventHandlers:
- event: Deposited(indexed address,uint256)
handler: handleDeposited
- event: GasPaid(indexed address,uint256,uint256)
handler: handleGasPaid
- event: QuotaPaid(indexed address,uint256)
handler: handleQuotaPaid
- event: SmartVaultCollectorSet(indexed address,indexed address)
handler: handleSmartVaultCollectorSet
- event: SmartVaultMaxQuotaSet(indexed address,uint256)
handler: handleSmartVaultMaxQuotaSet
- event: TaskExecuted(indexed address,indexed address,bytes,bool,bytes,uint256,uint256)
handler: handleTaskExecuted
- event: Withdrawn(indexed address,uint256)
handler: handleWithdrawn
- event: DefaultCollectorSet(indexed address)
handler: handleDefaultDefaultCollectorSet
- event: ExecutorSet(indexed address,bool)
handler: handleExecutorSet
file: ./src/Relayer.ts
- kind: ethereum/contract
name: Relayer_3
network: {{network}}
source:
address: '{{relayer3Address}}'
abi: Relayer
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Relayer
abis:
- name: Relayer
file: ./node_modules/@mimic-fi/v3-relayer/artifacts/contracts/interfaces/IRelayer.sol/IRelayer.json
- name: Task
file: ./node_modules/@mimic-fi/v3-tasks/artifacts/contracts/interfaces/ITask.sol/ITask.json
- name: ERC20
file: ./abis/IERC20.json
- name: AggregatorV3Interface
file: ./node_modules/@chainlink/contracts/abi/v0.8/AggregatorV3Interface.json
eventHandlers:
- event: Deposited(indexed address,uint256)
handler: handleDeposited
- event: GasPaid(indexed address,uint256,uint256)
handler: handleGasPaid
- event: QuotaPaid(indexed address,uint256)
handler: handleQuotaPaid
- event: SmartVaultCollectorSet(indexed address,indexed address)
handler: handleSmartVaultCollectorSet
- event: SmartVaultMaxQuotaSet(indexed address,uint256)
handler: handleSmartVaultMaxQuotaSet
- event: TaskExecuted(indexed address,indexed address,bytes,bool,bytes,uint256,uint256)
handler: handleTaskExecuted
- event: Withdrawn(indexed address,uint256)
handler: handleWithdrawn
- event: DefaultCollectorSet(indexed address)
handler: handleDefaultDefaultCollectorSet
- event: ExecutorSet(indexed address,bool)
handler: handleExecutorSet
file: ./src/Relayer.ts
- kind: ethereum/contract
name: FeeController
network: {{network}}
source:
address: '{{feeControllerAddress}}'
abi: FeeController
startBlock: {{blockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- FeeController
abis:
- name: FeeController
file: ./node_modules/@mimic-fi/v3-fee-controller/artifacts/contracts/interfaces/IFeeController.sol/IFeeController.json
eventHandlers:
- event: DefaultFeeCollectorSet(indexed address)
handler: handleDefaultFeeCollectorSet
- event: FeeCollectorSet(indexed address,indexed address)
handler: handleFeeCollectorSet
- event: FeePercentageSet(indexed address,uint256)
handler: handleFeePercentageSet
- event: MaxFeePercentageSet(indexed address,uint256)
handler: handleMaxFeePercentageSet
file: ./src/FeeController.ts
templates:
- kind: ethereum/contract
name: Authorizer
network: {{network}}
source:
abi: Authorizer
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Authorizer
abis:
- name: Authorizer
file: ./node_modules/@mimic-fi/v3-authorizer/artifacts/contracts/interfaces/IAuthorizer.sol/IAuthorizer.json
eventHandlers:
- event: Authorized(indexed address,indexed address,indexed bytes4,(uint8,uint248)[])
handler: handleAuthorized
- event: Unauthorized(indexed address,indexed address,indexed bytes4)
handler: handleUnauthorized
file: ./src/Authorizer.ts
- kind: ethereum/contract
name: PriceOracle
network: {{network}}
source:
abi: PriceOracle
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- PriceOracle
abis:
- name: PriceOracle
file: ./node_modules/@mimic-fi/v3-price-oracle/artifacts/contracts/interfaces/IPriceOracle.sol/IPriceOracle.json
- name: ERC20
file: ./abis/IERC20.json
- name: AggregatorV3Interface
file: ./node_modules/@chainlink/contracts/abi/v0.8/AggregatorV3Interface.json
eventHandlers:
- event: SignerSet(indexed address,bool)
handler: handleSignerSet
receipt: true
- event: FeedSet(indexed address,indexed address,address)
handler: handleFeedSet
receipt: true
file: ./src/PriceOracle.ts
- kind: ethereum/contract
name: SmartVault
network: {{network}}
source:
abi: SmartVault
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- SmartVault
abis:
- name: SmartVault
file: ./node_modules/@mimic-fi/v3-smart-vault/artifacts/contracts/interfaces/ISmartVault.sol/ISmartVault.json
- name: ERC20
file: ./abis/IERC20.json
- name: AggregatorV3Interface
file: ./node_modules/@chainlink/contracts/abi/v0.8/AggregatorV3Interface.json
eventHandlers:
- event: Paused()
handler: handlePaused
- event: Unpaused()
handler: handleUnpaused
- event: PriceOracleSet(indexed address)
handler: handlePriceOracleSet
- event: BalanceConnectorUpdated(indexed bytes32,indexed address,uint256,bool)
handler: handleBalanceConnectorUpdated
- event: Executed(indexed address,bytes,bytes)
handler: handleExecuted
- event: Called(indexed address,bytes,uint256,bytes)
handler: handleCalled
- event: Wrapped(uint256)
handler: handleWrapped
- event: Unwrapped(uint256)
handler: handleUnwrapped
- event: Collected(indexed address,indexed address,uint256)
handler: handleCollected
- event: Withdrawn(indexed address,indexed address,uint256,uint256)
handler: handleWithdrawn
file: ./src/SmartVault.ts
- kind: ethereum/contract
name: Task
network: {{network}}
source:
abi: Task
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Task
abis:
- name: Task
file: ./abis/IAllTasks.json
- name: ERC20
file: ./abis/IERC20.json
eventHandlers:
- event: Paused()
handler: handlePaused
- event: Unpaused()
handler: handleUnpaused
- event: BalanceConnectorsSet(indexed bytes32,indexed bytes32)
handler: handleBalanceConnectorsSet
- event: TokensAcceptanceListSet(indexed address,bool)
handler: handleTokensAcceptanceListSet
- event: TokensAcceptanceTypeSet(uint8)
handler: handleTokensAcceptanceTypeSet
- event: GasLimitsSet(uint256,uint256,uint256,uint256)
handler: handleGasLimitsSet
- event: GasPriceLimitSet(uint256)
handler: handleGasPriceLimitSet
- event: PriorityFeeLimitSet(uint256)
handler: handlePriorityFeeLimitSet
- event: TxCostLimitPctSet(uint256)
handler: handleTxCostLimitPctSet
- event: TxCostLimitSet(uint256)
handler: handleTxCostLimitSet
- event: TimeLockSet(uint8,uint256,uint256,uint256)
handler: handleTimeLockSet
- event: TimeLockAllowedAtSet(uint256)
handler: handleTimeLockAllowedAtSet
- event: ConnectorSet(indexed address)
handler: handleConnectorSet
- event: RecipientSet(indexed address)
handler: handleRecipientSet
- event: DefaultTokenThresholdSet(address,uint256,uint256)
handler: handleDefaultTokenThresholdSet
- event: CustomTokenThresholdSet(indexed address,address,uint256,uint256)
handler: handleCustomTokenThresholdSet
- event: DefaultVolumeLimitSet(indexed address,uint256,uint256)
handler: handleDefaultVolumeLimitSet
- event: CustomVolumeLimitSet(indexed address,indexed address,uint256,uint256)
handler: handleCustomVolumeLimitSet
- event: DefaultTokenOutSet(indexed address)
handler: handleDefaultTokenOutSet
- event: CustomTokenOutSet(indexed address,address)
handler: handleCustomTokenOutSet
- event: DefaultMaxSlippageSet(uint256)
handler: handleDefaultMaxSlippageSet
- event: CustomMaxSlippageSet(indexed address,uint256)
handler: handleCustomMaxSlippageSet
- event: DefaultDestinationChainSet(indexed uint256)
handler: handleDefaultDestinationChainSet
- event: CustomDestinationChainSet(indexed address,indexed uint256)
handler: handleCustomDestinationChainSet
- event: DefaultMaxFeeSet(indexed address,uint256)
handler: handleDefaultMaxFeeSet
- event: CustomMaxFeeSet(indexed address,indexed address,uint256)
handler: defaultCustomMaxFeeSet
file: ./src/Task.ts