-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsubgraph.template.yaml
73 lines (72 loc) · 1.82 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
specVersion: 0.0.2
description: Lemma's basis trading stablecoin subgraph
repository: https://github.com/lemma-finance/basis-trading-stablecoin-subgraph
schema:
file: ./schema.graphql
# {{#tokens}}
# * {{.}}
# {{/tokens}}
dataSources:
{{#tokens}}
- kind: ethereum/contract
name: Token{{ . }}
network: {{network}}
source:
address: "{{ . }}"
abi: Token
startBlock: 23745115
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- User
- Token
- Vault
- HourlyUserTrack
- DailyUserTrack
- DailyVolume
- HourlyVolume
- MonthlyVolume
- DailyAPY
- WeeklyAPY
- MonthlyAPY
abis:
- name: Token
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
file: ./src/token.ts
{{/tokens}}
{{#vaults}}
- kind: ethereum/contract
name: Vault{{ . }}
network: {{network}}
source:
address: "{{ . }}"
abi: Vault
startBlock: 23745115
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Vault
- HourlyUserTrack
- DailyUserTrack
- DailyVolume
- HourlyVolume
- MonthlyVolume
abis:
- name: Vault
file: ./abis/ERC4626.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: Deposit(indexed address,indexed address,uint256,uint256)
handler: handleDeposit
- event: Withdraw(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleWithdraw
file: ./src/vault.ts
{{/vaults}}