-
Notifications
You must be signed in to change notification settings - Fork 0
/
subgraph.template.yaml
85 lines (82 loc) · 2.24 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
specVersion: 0.0.4
schema:
file: ./schema.graphql
dataSources:
{{#ERC721}}
- name: {{name}}
kind: ethereum
network: {{network}}
source:
abi: ERC721
address: '{{address}}'
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Nft
- Account
abis:
- name: ERC721
file: ./abis/ERC721.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
file: ./src/erc-721/index.ts
{{/ERC721}}
{{#ERC1155}}
- name: {{name}}
kind: ethereum
network: {{network}}
source:
abi: ERC1155
address: '{{address}}'
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Nft
- Account
abis:
- name: ERC1155
file: ./abis/ERC1155.json
eventHandlers:
- event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
handler: handleTransferSingle
- event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[])
handler: handleTransferBatch
file: ./src/erc-1155/index.ts
{{/ERC1155}}
- name: ERC7432
kind: ethereum
network: {{network}}
source:
abi: ERC7432
{{#isSelfHosted}}
startBlock: 1
{{/isSelfHosted}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
entities:
- Nft
- Account
- RoleAssignment
- RoleApproval
abis:
- name: ERC7432
file: ./abis/ERC7432.json
- name: ERC721
file: ./abis/ERC721.json
eventHandlers:
- event: RoleGranted(indexed bytes32,indexed address,indexed uint256,address,address,uint64,bool,bytes)
handler: handleRoleGranted
- event: RoleRevoked(indexed bytes32,indexed address,indexed uint256,address,address)
handler: handleRoleRevoked
- event: RoleApprovalForAll(indexed address,indexed address,bool)
handler: handleRoleApprovalForAll
file: ./src/erc-7432/index.ts