-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
112 lines (109 loc) · 4.18 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
specVersion: 0.0.6
description: Subgraph for voucher smart contract
schema:
file: ./schema.graphql
dataSources:
- name: VoucherHub
kind: ethereum/contract
#NETWORK_NAME#
source:
#VOUCHER_HUB_ADDRESS#
abi: VoucherHub
#VOUCHER_HUB_START_BLOCK#
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Account
- Voucher
- VoucherType
- VoucherCreation
- VoucherTopUp
- App
- Dataset
- Workerpool
abis:
- name: VoucherHub
file: node_modules/@iexec/voucher-contracts/artifacts/contracts/VoucherHub.sol/VoucherHub.json
- name: PoCo
file: node_modules/@iexec/poco/build/contracts/IexecInterfaceNative.json
- name: AppRegistry
file: node_modules/@iexec/poco/build/contracts/AppRegistry.json
- name: DatasetRegistry
file: node_modules/@iexec/poco/build/contracts/DatasetRegistry.json
- name: WorkerpoolRegistry
file: node_modules/@iexec/poco/build/contracts/WorkerpoolRegistry.json
- name: App
file: node_modules/@iexec/poco/build/contracts/AppInterface.json
- name: Dataset
file: node_modules/@iexec/poco/build/contracts/DatasetInterface.json
- name: Workerpool
file: node_modules/@iexec/poco/build/contracts/WorkerpoolInterface.json
eventHandlers:
- event: EligibleAssetAdded(indexed uint256,address)
handler: handleEligibleAssetAdded
- event: EligibleAssetRemoved(indexed uint256,address)
handler: handleEligibleAssetRemoved
- event: VoucherCreated(indexed address,address,uint256,uint256,uint256)
handler: handleVoucherCreated
- event: VoucherDebited(indexed address,uint256)
handler: handleVoucherDebited
- event: VoucherDrained(indexed address,uint256)
handler: handleVoucherDrained
- event: VoucherRefunded(indexed address,uint256)
handler: handleVoucherRefunded
- event: VoucherToppedUp(indexed address,uint256,uint256)
handler: handleVoucherToppedUp
- event: VoucherTypeCreated(indexed uint256,string,uint256)
handler: handleVoucherTypeCreated
- event: VoucherTypeDescriptionUpdated(indexed uint256,string)
handler: handleVoucherTypeDescriptionUpdated
- event: VoucherTypeDurationUpdated(indexed uint256,uint256)
handler: handleVoucherTypeDurationUpdated
file: ./src/voucherHub.ts
templates:
- kind: ethereum
name: Voucher
#NETWORK_NAME#
source:
abi: Voucher
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Account
- Voucher
- VoucherType
- Deal
- App
- Dataset
- Workerpool
abis:
- name: Voucher
file: node_modules/@iexec/voucher-contracts/artifacts/contracts/beacon/Voucher.sol/Voucher.json
- name: VoucherHub
file: node_modules/@iexec/voucher-contracts/artifacts/contracts/VoucherHub.sol/VoucherHub.json
- name: PoCo
file: node_modules/@iexec/poco/build/contracts/IexecInterfaceNative.json
- name: AppRegistry
file: node_modules/@iexec/poco/build/contracts/AppRegistry.json
- name: DatasetRegistry
file: node_modules/@iexec/poco/build/contracts/DatasetRegistry.json
- name: WorkerpoolRegistry
file: node_modules/@iexec/poco/build/contracts/WorkerpoolRegistry.json
- name: App
file: node_modules/@iexec/poco/build/contracts/AppInterface.json
- name: Dataset
file: node_modules/@iexec/poco/build/contracts/DatasetInterface.json
- name: Workerpool
file: node_modules/@iexec/poco/build/contracts/WorkerpoolInterface.json
eventHandlers:
- event: AccountAuthorized(indexed address)
handler: handleAccountAuthorized
- event: AccountUnauthorized(indexed address)
handler: handleAccountUnauthorized
- event: OrdersMatchedWithVoucher(bytes32)
handler: handleOrdersMatchedWithVoucher
file: ./src/voucher.ts