forked from valve-finance/erc20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubgraph.template.yaml
48 lines (47 loc) · 1.21 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
specVersion: 0.0.2
description: ERC-20 subgraph with all the pertinent event handlers & entities
repository: https://github.com/andreujuanc/erc20-allowances
schema:
file: ./schema.graphql
dataSources:
- name: Creator
kind: ethereum/contract
network: {{network}}
source:
address: "{{address}}"
abi: Token
startBlock: {{block}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/events.ts
entities:
- Asset
abis:
- name: Token
file: ./abis/token.json
blockHandlers:
- handler: handleBlock
templates:
- name: ERC20
kind: ethereum/contract
network: {{network}}
source:
abi: Token
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/events.ts
entities:
- User
- Asset
abis:
- name: Token
file: ./abis/token.json
eventHandlers:
- event: Approval(indexed address,indexed address,uint256)
handler: handleApproval
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer