-
Notifications
You must be signed in to change notification settings - Fork 1
/
subgraph.template.yaml
78 lines (78 loc) · 2.64 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
specVersion: 1.0.0
indexerHints:
prune: auto
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: SwapERC20Contract
network: "{{network}}"
source:
address: "{{swap_erc20_address}}"
abi: SwapERC20Contract
startBlock: {{swap_erc20_start_block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- SwapERC20
abis:
- name: SwapERC20Contract
file: ./abis/SwapERC20.json
- name: _ERC20
file: ./src/messari/abis/Prices/ERC20.json
- name: CurvePool
file: ./src/messari/abis/Prices/Curve/Pool.json
- name: CurveRegistry
file: ./src/messari/abis/Prices/Curve/Registry.json
- name: CalculationsCurve
file: ./src/messari/abis/Prices/Calculations/Curve.json
- name: YearnLensContract
file: ./src/messari/abis/Prices/YearnLens.json
- name: AaveOracleContract
file: ./src/messari/abis/Prices/AaveOracle.json
- name: CalculationsSushiSwap
file: ./src/messari/abis/Prices/Calculations/SushiSwap.json
- name: ChainLinkContract
file: ./src/messari/abis/Prices/ChainLink.json
- name: UniswapRouter
file: ./src/messari/abis/Prices/Uniswap/Router.json
- name: UniswapFactory
file: ./src/messari/abis/Prices/Uniswap/Factory.json
- name: UniswapPair
file: ./src/messari/abis/Prices/Uniswap/Pair.json
eventHandlers:
- event: SwapERC20(indexed uint256,indexed address)
handler: handleSwapERC20
file: ./src/swaps.ts
- kind: ethereum
name: RegistryContract
network: "{{network}}"
source:
address: "{{registry_address}}"
abi: RegistryContract
startBlock: {{registry_start_block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Registry
abis:
- name: RegistryContract
file: ./abis/Registry.json
eventHandlers:
- event: SetServerURL(indexed address,string)
handler: handleSetServerURL
- event: AddProtocols(indexed address,bytes4[])
handler: handleAddProtocols
- event: RemoveProtocols(indexed address,bytes4[])
handler: handleRemoveProtocols
- event: AddTokens(indexed address,address[])
handler: handleAddTokens
- event: RemoveTokens(indexed address,address[])
handler: handleRemoveTokens
- event: UnsetServer(indexed address,string,bytes4[],address[])
handler: handleUnsetServer
file: ./src/registry.ts