-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsubgraph.yaml
More file actions
197 lines (192 loc) · 6.38 KB
/
subgraph.yaml
File metadata and controls
197 lines (192 loc) · 6.38 KB
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
# 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: Core
kind: ethereum/contract
source:
abi: IexecInterfaceToken
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Category
- Protocol
- 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/artifacts/contracts/IexecInterfaceNative.sol/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
file: ./src/Modules/index.ts
# =============================== App registry ================================
- name: AppRegistry
kind: ethereum/contract
source:
abi: AppRegistry
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
source:
abi: DatasetRegistry
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
source:
abi: WorkerpoolRegistry
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
templates:
# ============================ Workerpool template ============================
- name: Workerpool
kind: ethereum/contract
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
# ================================ Bulk templates ================================
- kind: file/ipfs
name: Bulk
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Bulk
abis:
- name: IexecInterfaceToken
file: node_modules/@iexec/poco/artifacts/contracts/IexecInterfaceNative.sol/IexecInterfaceNative.json
handler: handleBulk
file: ./src/Modules/Bulk.ts
- kind: file/ipfs
name: BulkSlice
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- BulkSlice
- DatasetOrder
abis:
- name: IexecInterfaceToken
file: node_modules/@iexec/poco/artifacts/contracts/IexecInterfaceNative.sol/IexecInterfaceNative.json
handler: handleBulkSlice
file: ./src/Modules/Bulk.ts