forked from Uniswap/v3-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsubgraph.yaml
129 lines (129 loc) · 4.52 KB
/
subgraph.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
specVersion: 1.2.0
description: Uniswap is a decentralized protocol for automated token exchange on Ethereum.
graft:
base: QmXDAaE7sT2bVe4prmZgdSXi34EGRjpULTnF9bKi3qrwFB
block: 20427608
repository: https://github.com/Uniswap/uniswap-v3-subgraph
schema:
file: ./schema.graphql
features:
- nonFatalErrors
- grafting
dataSources:
- kind: ethereum/contract
name: Factory
network: mainnet
source:
address: '0x1F98431c8aD98523631AE4a59f267346ea31F984'
abi: Factory
startBlock: 12369621
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: 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
- kind: ethereum/contract
name: NonfungiblePositionManager
network: mainnet
source:
address: '0xC36442b4a4522E871399CD717aBDD847Ab11FE88'
abi: NonfungiblePositionManager
startBlock: 12369651
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/position-manager.ts
entities:
- Pool
- Token
abis:
- name: NonfungiblePositionManager
file: ./abis/NonfungiblePositionManager.json
- name: Pool
file: ./abis/pool.json
- name: Factory
file: ./abis/factory.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: IncreaseLiquidity(indexed uint256,uint128,uint256,uint256)
handler: handleIncreaseLiquidity
calls:
positions: NonfungiblePositionManager[event.address].positions(event.params.tokenId)
- event: DecreaseLiquidity(indexed uint256,uint128,uint256,uint256)
handler: handleDecreaseLiquidity
calls:
positions: NonfungiblePositionManager[event.address].positions(event.params.tokenId)
- event: Collect(indexed uint256,address,uint256,uint256)
handler: handleCollect
calls:
positions: NonfungiblePositionManager[event.address].positions(event.params.tokenId)
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
calls:
positions: NonfungiblePositionManager[event.address].positions(event.params.tokenId)
templates:
- kind: ethereum/contract
name: Pool
network: mainnet
source:
abi: Pool
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/core.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
calls:
feeGrowthGlobal0X128: Pool[event.address].feeGrowthGlobal0X128()
feeGrowthGlobal1X128: Pool[event.address].feeGrowthGlobal1X128()
- event: Mint(address,indexed address,indexed int24,indexed int24,uint128,uint256,uint256)
handler: handleMint
receipt: true
calls:
poolTickLower: Pool[event.address].ticks(event.params.tickLower)
poolTickUpper: Pool[event.address].ticks(event.params.tickUpper)
- event: Burn(indexed address,indexed int24,indexed int24,uint128,uint256,uint256)
handler: handleBurn
receipt: true
calls:
poolTickLower: Pool[event.address].ticks(event.params.tickLower)
poolTickUpper: Pool[event.address].ticks(event.params.tickUpper)
- event: Flash(indexed address,indexed address,uint256,uint256,uint256,uint256)
handler: handleFlash
receipt: true
calls:
feeGrowthGlobal0X128: Pool[event.address].feeGrowthGlobal0X128()
feeGrowthGlobal1X128: Pool[event.address].feeGrowthGlobal1X128()