-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsubgraph.template.yaml
34 lines (34 loc) · 1.18 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
specVersion: 0.0.2
description: NoteStream is the Ethereum protocol for private real-time finance
repository: https://github.com/TomAFrech/NoteStream/packages/subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: NoteStream
network: {{networkName}}
source:
abi: NoteStream
address: '{{contracts.NoteStream.address}}'
startBlock: {{contracts.NoteStream.startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.3
abis:
- name: NoteStream
file: ./abis/NoteStream.json
entities:
- Cancellation
- Stream
- Transaction
- Withdrawal
- ZkAsset
eventHandlers:
- event: CreateStream(indexed uint256,indexed address,indexed address,address,bytes32,uint256,uint256)
handler: handleCreateStream
- event: WithdrawFromStream(indexed uint256,indexed address,indexed address,bytes32,uint256)
handler: handleWithdrawFromStream
- event: CancelStream(indexed uint256,indexed address,indexed address,uint256)
handler: handleCancelStream
file: ./src/mappings/noteStream.ts
language: wasm/assemblyscript