-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
91 lines (89 loc) · 2.38 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
specVersion: 0.0.2
description: mesh finance subgraph
repository: https://github.com/mesh-finance/mesh_finance_subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: FundFactory_1
network: {{network}}
source:
address: "{{fund_factory_address_1}}"
abi: FundFactory_1
startBlock: {{start_block_1}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- Fund
abis:
- name: FundFactory_1
file: ./abis/FundFactory_1.json
- name: Fund
file: ./abis/Fund.json
- name: ERC20
file: ./abis/ERC20Detailed.json
eventHandlers:
- event: NewFund(address)
handler: handleNewFund
file: ./mappings/FundFactory.ts
- kind: ethereum/contract
name: FundFactory
network: {{network}}
source:
address: "{{fund_factory_address_2}}"
abi: FundFactory
startBlock: {{start_block_2}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- Fund
abis:
- name: FundFactory
file: ./abis/FundFactory.json
- name: Fund
file: ./abis/Fund.json
- name: ERC20
file: ./abis/ERC20Detailed.json
eventHandlers:
- event: NewFund(indexed address)
handler: handleNewFund
file: ./mappings/FundFactory.ts
templates:
- kind: ethereum/contract
name: Fund
network: {{network}}
source:
abi: Fund
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
entities:
- Fund
- FundUpdate
- Deposit
- Withdraw
- HardWork
- Transaction
- Transfer
- AccountFundPosition
- AccountFundPositionUpdate
abis:
- name: Fund
file: ./abis/Fund.json
- name: ERC20
file: ./abis/ERC20Detailed.json
eventHandlers:
- event: Deposit(indexed address,uint256)
handler: handleDeposit
- event: Withdraw(indexed address,uint256,uint256)
handler: handleWithdrawal
- event: HardWorkDone(uint256,uint256)
handler: handleHardWork
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
file: ./mappings/Fund.ts