-
Notifications
You must be signed in to change notification settings - Fork 4
/
subgraph.template.yaml
210 lines (204 loc) · 6.94 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
# SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
# SPDX-License-Identifier: Apache-2.0
specVersion: 0.0.4
description: iExecPoCoV5
repository: https://github.com/iExecBlockchainComputing/PoCo-subgraph
schema:
file: ./schema.graphql
dataSources:
- name: ERC1538
kind: ethereum/contract
#NETWORK_NAME#
source:
#ERC1538_ADDRESS#
abi: ERC1538
#START_BLOCK#
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- ERC1538Module
- ERC1538Function
- ERC1538FunctionUpdateEvent
- ERC1538CommitMessageEvent
abis:
- name: ERC1538
file: node_modules/@iexec/solidity/build/contracts/IERC1538.json
eventHandlers:
- event: CommitMessage(string)
handler: handleCommitMessage
- event: FunctionUpdate(indexed bytes4,indexed address,indexed address,string)
handler: handleFunctionUpdate
file: ./src/ERC1538/ERC1538.ts
- name: Core
kind: ethereum/contract
#NETWORK_NAME#
source:
#IEXECE_INTERFACE_TOKEN_CORE_ADDRESS#
abi: IexecInterfaceToken
#START_BLOCK#
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Category
- Account
- AppOrder
- DatasetOrder
- WorkerpoolOrder
- RequesterOrder
- Deal
- SchedulerNotice
- Task
- Contribution
- TaskInitialize
- TaskContribute
- TaskConsensus
- TaskReveal
- TaskReopen
- TaskFinalize
- TaskClaimed
- AccurateContribution
- FaultyContribution
- Transfer
- Reward
- Seize
- Lock
- Unlock
abis:
- name: IexecInterfaceToken
file: node_modules/@iexec/poco/build/contracts/IexecInterfaceNative.json
eventHandlers:
- event: CreateCategory(uint256,string,string,uint256)
handler: handleCreateCategory
- event: OrdersMatched(bytes32,bytes32,bytes32,bytes32,bytes32,uint256)
handler: handleOrdersMatched
- event: SchedulerNotice(indexed address,bytes32)
handler: handleSchedulerNotice
- event: TaskInitialize(indexed bytes32,indexed address)
handler: handleTaskInitialize
- event: TaskContribute(indexed bytes32,indexed address,bytes32)
handler: handleTaskContribute
- event: TaskConsensus(indexed bytes32,bytes32)
handler: handleTaskConsensus
- event: TaskReveal(indexed bytes32,indexed address,bytes32)
handler: handleTaskReveal
- event: TaskReopen(indexed bytes32)
handler: handleTaskReopen
- event: TaskFinalize(indexed bytes32,bytes)
handler: handleTaskFinalize
- event: TaskClaimed(indexed bytes32)
handler: handleTaskClaimed
- event: AccurateContribution(indexed address,indexed bytes32)
handler: handleAccurateContribution
- event: FaultyContribution(indexed address,indexed bytes32)
handler: handleFaultyContribution
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: Reward(address,uint256,bytes32)
handler: handleReward
- event: Seize(address,uint256,bytes32)
handler: handleSeize
- event: Lock(address,uint256)
handler: handleLock
- event: Unlock(address,uint256)
handler: handleUnlock
callHandlers:
- function: matchOrders((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,uint256,uint256,address,address,address,bytes32,bytes),(address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes))
handler: handleMatchOrders
file: ./src/Modules/index.ts
# =============================== App registry ================================
- name: AppRegistry
kind: ethereum/contract
#NETWORK_NAME#
source:
#APP_REGISTRY_ADDRESS#
abi: AppRegistry
#START_BLOCK#
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- App
- AppTransfer
abis:
- name: App
file: node_modules/@iexec/poco/build/contracts/App.json
- name: AppRegistry
file: node_modules/@iexec/poco/build/contracts/AppRegistry.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferApp
file: ./src/Registries/index.ts
# ============================= Dataset registry ==============================
- name: DatasetRegistry
kind: ethereum/contract
#NETWORK_NAME#
source:
#DATATSET_REGISTRY_ADDRESS#
abi: DatasetRegistry
#START_BLOCK#
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Dataset
- DatasetTransfer
abis:
- name: Dataset
file: node_modules/@iexec/poco/build/contracts/Dataset.json
- name: DatasetRegistry
file: node_modules/@iexec/poco/build/contracts/DatasetRegistry.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferDataset
file: ./src/Registries/index.ts
# ============================ Workerpool registry ============================
- name: WorkerpoolRegistry
kind: ethereum/contract
#NETWORK_NAME#
source:
#WORKERPOOL_REGISTRY_ADDRESS#
abi: WorkerpoolRegistry
#START_BLOCK#
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Workerpool
- WorkerpoolTransfer
abis:
- name: Workerpool
file: node_modules/@iexec/poco/build/contracts/Workerpool.json
- name: WorkerpoolRegistry
file: node_modules/@iexec/poco/build/contracts/WorkerpoolRegistry.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransferWorkerpool
file: ./src/Registries/index.ts
# ============================ Workerpool template ============================
templates:
- name: Workerpool
kind: ethereum/contract
#NETWORK_NAME#
source:
abi: Workerpool
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Workerpool
- PolicyChange
abis:
- name: Workerpool
file: node_modules/@iexec/poco/build/contracts/Workerpool.json
eventHandlers:
- event: PolicyUpdate(uint256,uint256,uint256,uint256)
handler: handlePolicyUpdate
file: ./src/Registries/index.ts