forked from 1Hive/honeyfarm-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.template.yaml
58 lines (58 loc) · 1.59 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
specVersion: 0.0.2
description: HoneyFarm
repository: https://github.com/pxbee/tulip-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: HoneyFarm
network: {{ NETWORK }}
source:
address: '{{ HONEY_FARM_ADDRESS }}'
abi: HoneyFarm
startBlock: {{ START_BLOCK }}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- HoneyFarm
- User
- Pool
- Deposit
abis:
- name: HoneyFarm
file: ./abis/HoneyFarm.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: PoolAdded(indexed address,uint256)
handler: poolAddedEvent
- event: PoolUpdated(indexed address,uint256)
handler: poolUpdatedEvent
- event: PoolRemoved(indexed address)
handler: poolRemovedEvent
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: transferEvent
- event: RewardsWithdraw(indexed uint256,uint256)
handler: withdrawRewardsEvent
file: src/honeyfarm.ts
templates:
- kind: ethereum/contract
name: HsfTokenTemplate
network: xdai
source:
abi: ERC20
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- HsfToken
abis:
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: transferRewardsEvent
file: ./src/honeyfarm.ts