forked from l0c4t0r/visor-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
v3only.template.yaml
72 lines (72 loc) · 2.33 KB
/
v3only.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
specVersion: 0.0.2
repository: https://github.com/VisorFinance/subgraph
schema:
file: ./schema.graphql
dataSources:
{{#uniswapV3}}
- kind: ethereum/contract
name: {{name}}
network: {{network}}
source:
address: "{{factoryAddress}}"
abi: UniswapV3HypervisorFactory
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/uniswapV3/hypervisorFactory.ts
entities:
- UniswapV3HypervisorFactory
- UniswapV3Hypervisor
abis:
- name: UniswapV3HypervisorFactory
file: ./abis/UniswapV3HypervisorFactory.json
- name: UniswapV3Hypervisor
file: ./abis/UniswapV3Hypervisor.json
- name: ERC20
file: ./abis/ERC20.json
- name: ERC20NameBytes
file: ./abis/ERC20NameBytes.json
- name: ERC20SymbolBytes
file: ./abis/ERC20SymbolBytes.json
- name: UniswapV3Pool
file: ./abis/UniswapV3Pool.json
eventHandlers:
- event: HypervisorCreated(address,address,uint24,address,uint256)
handler: handleHypervisorCreated
{{/uniswapV3}}
templates:
- name: UniswapV3Hypervisor
kind: ethereum/contract
network: {{network}}
source:
abi: UniswapV3Hypervisor
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/uniswapV3/hypervisor.ts
entities:
- UniswapV3Hypervisor
- UniswapV3Deposit
- UniswapV3Rebalance
- UniswapV3Withdraw
- UniswapV3HypervisorShares
abis:
- name: UniswapV3Hypervisor
file: ./abis/UniswapV3Hypervisor.json
- name: UniswapV3Pool
file: ./abis/UniswapV3Pool.json
eventHandlers:
- event: Deposit(indexed address,indexed address,uint256,uint256,uint256)
handler: handleDeposit
- event: Withdraw(indexed address,indexed address,uint256,uint256,uint256)
handler: handleWithdraw
- event: Rebalance(int24,uint256,uint256,uint256,uint256,uint256)
handler: handleRebalance
callHandlers:
- function: setDepositMax(uint256,uint256)
handler: handleSetDepositMax
- function: setMaxTotalSupply(uint256)
handler: handleSetMaxTotalSupply