forked from curvefi/curve-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.yaml
218 lines (209 loc) · 6.95 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
specVersion: 0.0.2
repository: https://github.com/curvefi/curve-subgraph
schema:
file: ./schema.graphql
templates:
# Main pool contract
- name: Pool
kind: ethereum/contract
network: mainnet
source:
abi: StableSwap
mapping: &pool_mapping
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/pool.ts
entities: [ ]
abis:
- name: StableSwap
file: ./abis/StableSwap.abi
- name: Registry
file: ./abis/Registry.abi
eventHandlers:
- event: AddLiquidity(indexed address,uint256[2],uint256[2],uint256,uint256)
handler: handleAddLiquidity
- event: NewAdmin(indexed address)
handler: handleNewAdmin
- event: NewParameters(uint256,uint256,uint256)
handler: handleNewParameters
- event: NewFee(uint256,uint256)
handler: handleNewFee
- event: RampA(uint256,uint256,uint256,uint256)
handler: handleRampA
- event: StopRampA(uint256,uint256)
handler: handleStopRampA
- event: RemoveLiquidity(indexed address,uint256[2],uint256[2],uint256)
handler: handleRemoveLiquidity
- event: RemoveLiquidityImbalance(indexed address,uint256[2],uint256[2],uint256,uint256)
handler: handleRemoveLiquidityImbalance
- event: RemoveLiquidityOne(indexed address,uint256,uint256)
handler: handleRemoveLiquidityOne
- event: TokenExchange(indexed address,int128,uint256,int128,uint256)
handler: handleTokenExchange
- event: TokenExchangeUnderlying(indexed address,int128,uint256,int128,uint256)
handler: handleTokenExchangeUnderlying
# Measures the amount of liquidity provided by each user
- name: LiquidityGauge
kind: ethereum/contract
network: mainnet
source:
abi: LiquidityGauge
mapping: &liquidity_gauge_mapping
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/dao/gauge.ts
entities: [ ]
abis:
- name: LiquidityGauge
file: ./abis/LiquidityGauge.abi
eventHandlers:
- event: Deposit(indexed address,uint256)
handler: handleDeposit
- event: UpdateLiquidityLimit(address,uint256,uint256,uint256,uint256)
handler: handleUpdateLiquidityLimit
- event: Withdraw(indexed address,uint256)
handler: handleWithdraw
# Custom version of Aragon Voting App
- name: Voting
kind: ethereum/contract
network: mainnet
source:
abi: Voting
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/dao/voting.ts
entities: [ ]
abis:
- name: Voting
file: ./abis/Voting.abi
eventHandlers:
- event: MinimumBalanceSet(uint256)
handler: handleMinimumBalanceSet
- event: MinimumTimeSet(uint256)
handler: handleMinimumTimeSet
- event: ChangeMinQuorum(uint64)
handler: handleChangeMinQuorum
- event: ChangeSupportRequired(uint64)
handler: handleChangeSupportRequired
- event: StartVote(indexed uint256,indexed address,string,uint256,uint256,uint256,uint256)
handler: handleStartVote
- event: CastVote(indexed uint256,indexed address,bool,uint256)
handler: handleCastVote
- event: ExecuteVote(indexed uint256)
handler: handleExecuteVote
dataSources:
# Address provider for registry contracts
- name: AddressProvider
kind: ethereum/contract
network: mainnet
source:
abi: AddressProvider
address: '0x0000000022d53366457f9d5e68ec105046fc4383'
startBlock: 11153725
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/address-provider.ts
abis:
- name: AddressProvider
file: ./abis/AddressProvider.abi
entities:
- Contract
- ContractVersion
- SystemState
eventHandlers:
- event: AddressModified(indexed uint256,address,uint256)
handler: handleAddressModified
- event: NewAddressIdentifier(indexed uint256,address,string)
handler: handleNewAddressIdentifier
# Main registry contract used to locate pools and query information about them as well as registered coins
- name: MainRegistry
kind: ethereum/contract
network: mainnet
source:
abi: Registry
address: '0x90e00ace148ca3b23ac1bc8c240c2a7dd9c2d7f5'
startBlock: 12195750
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/registry.ts
entities: [ ]
abis:
- name: ERC20
file: ./abis/ERC20.abi
- name: PoolInfo
file: ./abis/PoolInfo.abi
- name: Registry
file: ./abis/Registry.abi
- name: StableSwap
file: ./abis/StableSwap.abi
eventHandlers:
- event: PoolAdded(indexed address,bytes)
handler: handlePoolAdded
- event: PoolRemoved(indexed address)
handler: handlePoolRemoved
# Controls liquidity gauges and the issuance of CRV through the liquidity gauges
- name: GaugeController
kind: ethereum/contract
network: mainnet
source:
abi: GaugeController
address: '0x2f50d538606fa9edd2b11e2446beb18c9d5846bb'
startBlock: 10647875
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/dao/gauge-controller.ts
abis:
- name: GaugeController
file: ./abis/GaugeController.abi
- name: LiquidityGauge
file: ./abis/LiquidityGauge.abi
- name: ERC20
file: ./abis/ERC20.abi
entities:
- Gauge
- GaugeType
- GaugeWeight
- GaugeWeightVote
- SystemState
eventHandlers:
- event: AddType(string,int128)
handler: handleAddType
- event: NewGauge(address,int128,uint256)
handler: handleNewGauge
- event: NewGaugeWeight(address,uint256,uint256,uint256)
handler: handleNewGaugeWeight
- event: NewTypeWeight(int128,uint256,uint256,uint256)
handler: handleNewTypeWeight
- event: VoteForGauge(uint256,address,address,uint256)
handler: handleVoteForGauge
# Aragon DAO instance (dao.curvefi.eth)
- name: DAO
kind: ethereum/contract
network: mainnet
source:
abi: Kernel
address: '0xad06868167bc5ac5cfcbef2cafa82bc76961d72d'
startBlock: 10647740
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/dao/kernel.ts
abis:
- name: Kernel
file: ./abis/Kernel.abi
entities:
- Proposal
eventHandlers:
- event: NewAppProxy(address,bool,bytes32)
handler: handleNewProxyApp