-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsubgraph.yaml.mustache
133 lines (133 loc) · 3.99 KB
/
subgraph.yaml.mustache
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
specVersion: 0.0.2
description: Cowswap subgraph
repository: https://github.com/cowprotocol/subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: GPV2Settlement
network: {{ network }}
source:
address: "0x9008D19f58AAbD9eD0D60971565AA8510560ab41"
abi: GPV2Settlement
{{#startBlock}}
startBlock: {{ startBlock }}
{{/startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Trade
- Token
- Order
- User
abis:
- name: GPV2Settlement
file: ./abis/GPV2Settlement.json
- name: ERC20
file: ./abis/ERC20.json
- name: UniswapV2Factory
file: ./abis/UniswapV2Factory.json
- name: UniswapV2Pair
file: ./abis/UniswapV2Pair.json
eventHandlers:
- event: Interaction(indexed address,uint256,bytes4)
handler: handleInteraction
- event: OrderInvalidated(indexed address,bytes)
handler: handleOrderInvalidated
- event: PreSignature(indexed address,bytes,bool)
handler: handlePreSignature
- event: Settlement(indexed address)
handler: handleSettlement
- event: Trade(indexed address,address,address,uint256,uint256,uint256,bytes)
handler: handleTrade
receipt: true
file: ./src/mapping.ts
- kind: ethereum
name: GPv2AllowListAuthentication
network: {{ network }}
source:
address: "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"
abi: GPv2AllowListAuthentication
{{#startBlock}}
startBlock: {{ startBlock }}
{{/startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Entity
abis:
- name: GPv2AllowListAuthentication
file: ./abis/GPv2AllowListAuthentication.json
eventHandlers:
- event: SolverAdded(address)
handler: handleSolverAdded
- event: SolverRemoved(address)
handler: handleSolverRemoved
file: ./src/allowListAuthentication.ts
{{#uniV3Factory}}
- kind: ethereum/contract
name: Factory
network: {{ network }}
source:
address: "{{ uniV3Factory }}"
abi: Factory
{{#uniV3StartBlock}}
startBlock: {{ uniV3StartBlock }}
{{/uniV3StartBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/uniswapMappings/uniswapPoolFactory.ts
entities:
- Pool
- Token
abis:
- name: Factory
file: ./abis/factory.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20SymbolBytes
file: ./abis/ERC20SymbolBytes.json
- name: ERC20NameBytes
file: ./abis/ERC20NameBytes.json
- name: Pool
file: ./abis/pool.json
eventHandlers:
- event: PoolCreated(indexed address,indexed address,indexed uint24,int24,address)
handler: handlePoolCreated
templates:
- kind: ethereum/contract
name: Pool
network: {{ network }}
source:
abi: Pool
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/uniswapMappings/uniswapPools.ts
entities:
- Pool
- Token
abis:
- name: Pool
file: ./abis/pool.json
- name: Factory
file: ./abis/factory.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: Initialize(uint160,int24)
handler: handleInitialize
- event: Swap(indexed address,indexed address,int256,int256,uint160,uint128,int24)
handler: handleSwap
- event: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256)
handler: handleMint
- event: Burn(indexed address,indexed int24,indexed int24,uint128,uint256,uint256)
handler: handleBurn
{{/uniV3Factory}}