-
Notifications
You must be signed in to change notification settings - Fork 2
/
subgraph.yaml
66 lines (65 loc) · 2.15 KB
/
subgraph.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
specVersion: 0.0.3
description: Culturestake subgraph
repository: https://github.com/lazaruslabs/culturestake
schema:
file: ./schema.graphql
dataSources:
- name: Culturestake
kind: ethereum/contract
network: ${SUBGRAPH_NETWORK}
source:
address: "${CULTURESTAKE_ADDRESS}"
abi: Culturestake
mapping:
kind: ethereum/events
apiVersion: 0.0.3
language: wasm/assemblyscript
file: ./src/culturestake.ts
entities:
- Festival
- Question
- VotingBooth
abis:
- name: Culturestake
file: ./node_modules/culturestake-contracts/build/contracts/Culturestake.json
eventHandlers:
- event: InitQuestion(indexed bytes32,indexed bytes32,indexed address)
handler: handleInitQuestion
- event: InitFestival(indexed bytes32,uint256,uint256)
handler: handleInitFestival
- event: InitVotingBooth(indexed bytes32,indexed address)
handler: handleInitVotingBooth
- event: DeactivateQuestion(indexed bytes32)
handler: handleDeactivateQuestion
- event: DeactivateFestival(indexed bytes32)
handler: handleDeactivateFestival
- event: DeactivateVotingBooth(indexed address)
handler: handleDeactivateVotingBooth
- event: AddedOwner(address)
handler: handleAddedOwner
- event: RemovedOwner(address)
handler: handleRemovedOwner
templates:
- name: Question
kind: ethereum/contract
network: ${SUBGRAPH_NETWORK}
source:
abi: Question
mapping:
kind: ethereum/events
apiVersion: 0.0.1
language: wasm/assemblyscript
file: ./src/question.ts
entities:
- Answer
- Vote
abis:
- name: Question
file: ./node_modules/culturestake-contracts/build/contracts/Question.json
eventHandlers:
- event: InitAnswer(bytes32,indexed bytes32)
handler: handleInitAnswer
- event: DeactivateAnswer(bytes32,indexed bytes32)
handler: handleDeactivateAnswer
- event: Vote(bytes32,indexed bytes32,uint256,uint256,uint256,address,uint256)
handler: handleVote