-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.template.yaml
101 lines (101 loc) · 3.4 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
specVersion: 0.0.7
description: DEX223 is a decentralized protocol for automated token exchange on Ethereum support tokens ERC20 and ERC223.
repository: https://github.com/kostya12362/dex223-subgraph
schema:
file: ./schema.graphql
features:
- nonFatalErrors
- grafting
dataSources:
- kind: ethereum/contract
name: {{ v1.contracts.factory.name }}
network: {{ network }}
source:
address: '{{ v1.contracts.factory.address }}'
abi: factory
startBlock: {{ v1.contracts.factory.startBlock }}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/factory.ts
entities:
- Pool
- Token
abis:
- name: factory
file: ./abis/factory.json
- name: ERC20andERC223
file: ./abis/ERC20andERC223.json
- name: ERC20andERC223SymbolBytes
file: ./abis/ERC20andERC223SymbolBytes.json
- name: ERC20andERC223NameBytes
file: ./abis/ERC20andERC223NameBytes.json
- name: Pool
file: ./abis/pool.json
- name: TokenConverter
file: ./abis/TokenConverter.json
eventHandlers:
- event: PoolCreated(indexed address,indexed address,address,address,indexed uint24,int24,address)
handler: handlePoolCreated
- kind: ethereum/contract
name: TokenConverter
network: {{ network }}
source:
address: '{{ v1.contracts.tokenConverter.address }}'
abi: TokenConverter
startBlock: {{ v1.contracts.tokenConverter.startBlock }}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/token-converter.ts
entities:
- Token
- TokenConvertible
abis:
- name: TokenConverter
file: ./abis/TokenConverter.json
- name: ERC20andERC223
file: ./abis/ERC20andERC223.json
eventHandlers:
- event: ERC20WrapperCreated(indexed address,indexed address)
handler: handleERC20WrapperCreated
- event: ERC223WrapperCreated(indexed address,indexed address)
handler: handleERC223WrapperCreated
templates:
- kind: ethereum/contract
name: Pool
network: {{ network }}
source:
abi: Pool
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/pool/index.ts
entities:
- Pool
- Token
abis:
- name: Pool
file: ./abis/pool.json
- name: Factory
file: ./abis/factory.json
- name: ERC20andERC223
file: ./abis/ERC20andERC223.json
- name: TokenConverter
file: ./abis/TokenConverter.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
- event: Flash(indexed address,indexed address,uint256,uint256,uint256,uint256)
handler: handleFlash
- event: Collect(indexed address,address,indexed int24,indexed int24,uint128,uint128)
handler: handleCollect