forked from YourJustice-Live/Noosphere
-
Notifications
You must be signed in to change notification settings - Fork 1
/
subgraph.yaml
173 lines (173 loc) · 5.24 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
specVersion: 0.0.4
schema:
file: ./schema.graphql
features:
- ipfsOnEthereumContracts
dataSources:
# Hub contract
- kind: ethereum
name: Hub
network: mumbai
source:
address: "0xC46971d2a76DeC2DB76554c12eF07A0B2A407451"
abi: Hub
startBlock: 27137673
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- JurisdictionEntity
abis:
- name: Hub
file: ./abis/Hub.json
- name: Jurisdiction
file: ./abis/Jurisdiction.json
eventHandlers:
- event: ContractCreated(string,address)
handler: handleContractCreated
file: ./src/mappings/hubMappings.ts
# Avatar NFT contract
- kind: ethereum
name: AvatarNFT
network: mumbai
source:
address: "0x29fEA694c32B51Ea283F7952f066Da3e12f33375"
abi: AvatarNFT
startBlock: 27137686
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Transfer
- URI
abis:
- name: AvatarNFT
file: ./abis/AvatarNFT.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
- event: SoulType(indexed uint256,string)
handler: handleSoulType
- event: URI(string,indexed uint256)
handler: handleURI
file: ./src/mappings/avatarNftMappings.ts
# Action repository (history) contract
- kind: ethereum
name: ActionRepo
network: mumbai
source:
address: "0x695b590Dc9455299f349BCC4252650237D586512"
abi: ActionRepo
startBlock: 27137725
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- ActionEntity
abis:
- name: ActionRepo
file: ./abis/ActionRepo.json
eventHandlers:
- event: ActionAdded(indexed uint256,indexed bytes32,string,string,string,string)
handler: handleActionAdded
- event: ActionURI(indexed bytes32,string)
handler: handleActionURI
file: ./src/mappings/actionRepoMappings.ts
# Rule repository contract
- kind: ethereum
name: RuleRepo
network: mumbai
source:
address: "0xCd8F2a69Ca83e9866298F3f5919a89e82522BEdB"
abi: RuleRepo
startBlock: 27137620
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- JurisdictionRuleEntity
- JurisdictionRuleEffectEntity
abis:
- name: RuleRepo
file: ./abis/RuleRepo.json
eventHandlers:
- event: Rule(indexed address,indexed uint256,bytes32,string,string,bool)
handler: handleRule
- event: RuleEffect(indexed address,indexed uint256,bool,uint8,string)
handler: handleRuleEffect
- event: Confirmation(indexed address,indexed uint256,string,bool,uint256)
handler: handleConfirmation
- event: RuleDisabled(indexed address,uint256,bool)
handler: handleRuleDisabled
file: ./src/mappings/ruleRepoMappings.ts
templates:
# Jurisdiction contract template
- kind: ethereum
name: Jurisdiction
network: mumbai
source:
abi: Jurisdiction
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- CaseEntity
- JurisdictionEntity
- AvatarNftEntity
- AvatarNftReputationEntity
abis:
- name: Jurisdiction
file: ./abis/Jurisdiction.json
- name: Case
file: ./abis/Case.json
eventHandlers:
- event: ContractURI(string)
handler: handleContractUri
- event: TransferByToken(indexed address,indexed uint256,indexed uint256,uint256,uint256)
handler: handleTransferByToken
- event: ReactionCreated(indexed uint256,address)
handler: handleReactionCreated
- event: OpinionChange(uint256,indexed address,indexed uint256,string,bool,uint256)
handler: handleOpinionChange
file: ./src/mappings/jurisdictionMappings.ts
# Case contract template
- kind: ethereum
name: Case
network: mumbai
source:
abi: Case
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- CaseEntity
- CaseEventEntity
- CasePostEntity
- CaseNominateEntity
abis:
- name: Case
file: ./abis/Case.json
eventHandlers:
- event: TransferByToken(indexed address,indexed uint256,indexed uint256,uint256,uint256)
handler: handleTransferByToken
- event: RuleAdded(address,uint256)
handler: handleRuleAdded
- event: Post(indexed address,uint256,string,string)
handler: handlePost
- event: Stage(uint8)
handler: handleStage
- event: Verdict(string,address)
handler: handleVerdict
- event: Cancelled(string,address)
handler: handleCancelled
- event: RuleConfirmed(uint256)
handler: handleRuleConfirmed
- event: Nominate(address,indexed uint256,string)
handler: handleNominate
file: ./src/mappings/caseMappings.ts