-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsubgraph.template.yaml
116 lines (116 loc) · 3.87 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
specVersion: 0.0.4
description: FPMM Subgraph
repository: https://github.com/TokenUnion/polymarket-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: ConditionalTokens
network: {{ networkName }}
source:
address: '{{contracts.ConditionalTokens.address}}'
abi: ConditionalTokens
startBlock: {{ contracts.ConditionalTokens.startBlock }}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Condition
- FixedProductMarketMaker
abis:
- name: ConditionalTokens
file: ../abis/ConditionalTokens.json
- name: ERC20Detailed
file: ../abis/ERC20Detailed.json
eventHandlers:
- event: ConditionPreparation(indexed bytes32,indexed address,indexed bytes32,uint256)
handler: handleConditionPreparation
file: ./src/ConditionalTokensMapping.ts
- kind: ethereum/contract
name: FixedProductMarketMakerFactory
network: {{ networkName }}
source:
address: '{{contracts.FixedProductMarketMakerFactory.address}}'
abi: FixedProductMarketMakerFactory
startBlock: {{ contracts.FixedProductMarketMakerFactory.startBlock }}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- FixedProductMarketMaker
abis:
- name: FixedProductMarketMakerFactory
file: ../abis/FixedProductMarketMakerFactory.json
- name: ConditionalTokens
file: ../abis/ConditionalTokens.json
- name: ERC20Detailed
file: ../abis/ERC20Detailed.json
eventHandlers:
- event: FixedProductMarketMakerCreation(indexed address,address,indexed address,indexed address,bytes32[],uint256)
handler: handleFixedProductMarketMakerCreation
file: ./src/FixedProductMarketMakerFactoryMapping.ts
templates:
- name: FixedProductMarketMaker
kind: ethereum/contract
network: {{ networkName }}
source:
abi: FixedProductMarketMaker
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- FixedProductMarketMaker
- FpmmFundingAddition
- FpmmFundingRemoval
- FpmmPoolMembership
- FpmmTransaction
abis:
- name: FixedProductMarketMaker
file: ../abis/FixedProductMarketMaker.json
- name: ConditionalTokens
file: ../abis/ConditionalTokens.json
- name: ERC20Detailed
file: ../abis/ERC20Detailed.json
eventHandlers:
- event: FPMMFundingAdded(indexed address,uint256[],uint256)
handler: handleFundingAdded
- event: FPMMFundingRemoved(indexed address,uint256[],uint256,uint256)
handler: handleFundingRemoved
- event: FPMMBuy(indexed address,uint256,uint256,indexed uint256,uint256)
handler: handleBuy
- event: FPMMSell(indexed address,uint256,uint256,indexed uint256,uint256)
handler: handleSell
- event: Transfer(indexed address,indexed address,uint256)
handler: handlePoolShareTransfer
file: ./src/FixedProductMarketMakerMapping.ts
- name: ConditionalTokens
kind: ethereum/contract
network: {{ networkName }}
source:
abi: ConditionalTokens
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities: []
abis:
- name: ConditionalTokens
file: ../abis/ConditionalTokens.json
file: ./src/empty.ts
- name: ERC20Detailed
kind: ethereum/contract
network: {{ networkName }}
source:
abi: ERC20Detailed
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities: []
abis:
- name: ERC20Detailed
file: ../abis/ERC20Detailed.json
file: ./src/empty.ts