-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
63 lines (63 loc) · 1.94 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
specVersion: 0.0.5
schema:
file: ./schema.graphql
dataSources:
- name: RealTokenYam
kind: ethereum
network: {{network}}
source:
abi: RealTokenYam
address: "{{RealTokenYamAddress}}"
startBlock: {{RealTokenYamStartBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping/index.ts
entities:
- Account
- AccountMonth
- Token
- TokenDay
- TokenMonth
- OfferPrice
- Transaction
- Offer
abis:
- name: RealTokenYam
file: ./abis/RealTokenYam.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: OfferAccepted(indexed uint256,indexed address,indexed address,address,address,uint256,uint256)
handler: offerAcceptedHandler
- event: OfferCreated(indexed address,indexed address,address,address,indexed uint256,uint256,uint256)
handler: offerCreatedHandler
- event: OfferDeleted(indexed uint256)
handler: offerDeletedHandler
- event: OfferUpdated(indexed uint256,uint256,indexed uint256,uint256,indexed uint256)
handler: offerUpdatedHandler
- event: TokenWhitelistWithTypeToggled(indexed address[],indexed uint8[])
handler: tokenWhitelistWithTypeToggledHandler
templates:
- name: WhitelistedToken
kind: ethereum
network: {{network}}
source:
abi: ERC20
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mapping/index.ts
entities:
- AccountBalance
- AccountAllowance
abis:
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: transferHandler
- event: Approval(indexed address,indexed address,uint256)
handler: approvalHandler