-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
189 lines (189 loc) · 5.69 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
specVersion: 0.0.3
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ConfigurationManager
network: {{network}}
source:
address: '{{manager}}'
abi: ConfigurationManager
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Manager
abis:
- name: ERC20
file: ./abis/ERC20.json
- name: ConfigurationManager
file: ./abis/ConfigurationManager.json
- name: OptionFactory
file: ./abis/OptionFactory.json
- name: PodOption
file: ./abis/PodOption.json
- name: OptionAMMFactory
file: ./abis/OptionAMMFactory.json
- name: OptionAMMPool
file: ./abis/OptionAMMPool.json
- name: OptionHelper
file: ./abis/OptionHelper.json
- name: FeePool
file: ./abis/FeePool.json
eventHandlers:
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleManagerOwnershipTransferred
- event: ParameterSet(bytes32,uint256)
handler: handleManagerParameterSet
- event: ModuleSet(indexed bytes32,indexed address)
handler: handleManagerModuleSet
file: ./src/mappings/index.ts
templates:
- kind: ethereum/contract
name: OptionFactory
network: {{network}}
source:
abi: OptionFactory
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- OptionFactory
abis:
- name: ERC20
file: ./abis/ERC20.json
- name: OptionAMMPool
file: ./abis/OptionAMMPool.json
- name: OptionFactory
file: ./abis/OptionFactory.json
- name: PodOption
file: ./abis/PodOption.json
eventHandlers:
- event: OptionCreated(indexed address,address,uint8,uint8,address,address,uint256,uint256,uint256)
handler: handleOptionCreated
file: ./src/mappings/index.ts
- kind: ethereum/contract
name: OptionHelper
network: {{network}}
source:
abi: OptionHelper
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- OptionHelper
abis:
- name: OptionHelper
file: ./abis/OptionHelper.json
- name: ERC20
file: ./abis/ERC20.json
- name: OptionAMMPool
file: ./abis/OptionAMMPool.json
eventHandlers:
- event: OptionsBought(indexed address,indexed address,uint256,address,uint256)
handler: handleBuy
- event: OptionsSold(indexed address,indexed address,uint256,address,uint256)
handler: handleResell
- event: OptionsMintedAndSold(indexed address,indexed address,uint256,address,uint256)
handler: handleSell
file: ./src/mappings/index.ts
- kind: ethereum/contract
name: OptionAMMFactory
network: {{network}}
source:
abi: OptionAMMFactory
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- PoolFactory
abis:
- name: OptionAMMFactory
file: ./abis/OptionAMMFactory.json
- name: ERC20
file: ./abis/ERC20.json
- name: OptionAMMPool
file: ./abis/OptionAMMPool.json
eventHandlers:
- event: PoolCreated(indexed address,address,address)
handler: handlePoolCreated
file: ./src/mappings/index.ts
- kind: ethereum/contract
name: PodOption
network: {{network}}
source:
abi: PodOption
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Option
abis:
- name: PodOption
file: ./abis/PodOption.json
- name: ERC20
file: ./abis/ERC20.json
- name: OptionAMMPool
file: ./abis/OptionAMMPool.json
eventHandlers:
- event: Exercise(indexed address,uint256)
handler: handleExercise
- event: Mint(indexed address,uint256)
handler: handleMint
- event: Unmint(indexed address,uint256,uint256,uint256)
handler: handleUnmint
- event: Withdraw(indexed address,uint256,uint256)
handler: handleWithdraw
- event: Transfer(indexed address,indexed address,uint256)
handler: handleOptionTransfer
file: ./src/mappings/index.ts
- kind: ethereum/contract
name: OptionAMMPool
network: {{network}}
source:
abi: OptionAMMPool
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Pool
abis:
- name: ERC20
file: ./abis/ERC20.json
- name: OptionAMMPool
file: ./abis/OptionAMMPool.json
eventHandlers:
- event: AddLiquidity(indexed address,indexed address,uint256,uint256)
handler: handleAddLiquidity
- event: RemoveLiquidity(indexed address,uint256,uint256)
handler: handleRemoveLiquidity
- event: TradeInfo(uint256,uint256)
handler: handleSpotPrice
file: ./src/mappings/index.ts
- kind: ethereum/contract
name: FeePool
network: {{network}}
source:
abi: FeePool
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- FeePool
abis:
- name: ERC20
file: ./abis/ERC20.json
- name: FeePool
file: ./abis/FeePool.json
eventHandlers:
- event: FeeWithdrawn(address,address,uint256,uint256)
handler: handleFeeWithdrawn
file: ./src/mappings/index.ts