Skip to content

Commit a995e1e

Browse files
committed
chore: subgraph update scripts now relies on a template and removes data sources not deployed
e.g. DisputeKitShutter on testnet
1 parent 44ea55e commit a995e1e

File tree

10 files changed

+657
-15
lines changed

10 files changed

+657
-15
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
specVersion: 0.0.5
2+
schema:
3+
file: ./schema.graphql
4+
features:
5+
- fullTextSearch
6+
dataSources:
7+
- kind: ethereum
8+
name: KlerosCore
9+
network: _PLACEHOLDER_
10+
source:
11+
address: "_PLACEHOLDER_"
12+
abi: KlerosCore
13+
startBlock: _PLACEHOLDER_
14+
mapping:
15+
kind: ethereum/events
16+
apiVersion: 0.0.7
17+
language: wasm/assemblyscript
18+
entities:
19+
- User
20+
- Arbitrable
21+
- TokenAndETHShift
22+
- JurorTokensPerCourt
23+
- Court
24+
- Dispute
25+
- Round
26+
- Draw
27+
- DisputeKit
28+
- Counter
29+
abis:
30+
- name: SortitionModule
31+
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleNeo.json
32+
- name: DisputeKitClassic
33+
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicNeo.json
34+
- name: KlerosCore
35+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreNeo.json
36+
eventHandlers:
37+
- event: AppealDecision(indexed uint256,indexed address)
38+
handler: handleAppealDecision
39+
- event: DisputeCreation(indexed uint256,indexed address)
40+
handler: handleDisputeCreation
41+
receipt: true
42+
- event: Draw(indexed address,indexed uint256,uint256,uint256)
43+
handler: handleDraw
44+
- event: NewPeriod(indexed uint256,uint8)
45+
handler: handleNewPeriod
46+
- event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
47+
handler: handleCourtCreated
48+
- event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4])
49+
handler: handleCourtModified
50+
- event: DisputeKitCreated(indexed uint256,indexed address)
51+
handler: handleDisputeKitCreated
52+
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
53+
handler: handleDisputeKitEnabled
54+
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
55+
handler: handleTokenAndETHShift
56+
- event: Ruling(indexed address,indexed uint256,uint256)
57+
handler: handleRuling
58+
- event: AcceptedFeeToken(indexed address,indexed bool)
59+
handler: handleAcceptedFeeToken
60+
- event: CourtJump(indexed uint256,indexed uint256,indexed uint96,uint96)
61+
handler: handleCourtJump
62+
file: ./src/KlerosCore.ts
63+
- kind: ethereum
64+
name: PolicyRegistry
65+
network: _PLACEHOLDER_
66+
source:
67+
address: "_PLACEHOLDER_"
68+
abi: PolicyRegistry
69+
startBlock: _PLACEHOLDER_
70+
mapping:
71+
kind: ethereum/events
72+
apiVersion: 0.0.7
73+
language: wasm/assemblyscript
74+
entities:
75+
- Court
76+
abis:
77+
- name: PolicyRegistry
78+
file: ../../contracts/deployments/_PLACEHOLDER_/PolicyRegistry.json
79+
eventHandlers:
80+
- event: PolicyUpdate(indexed uint256,string,string)
81+
handler: handlePolicyUpdate
82+
file: ./src/PolicyRegistry.ts
83+
- kind: ethereum
84+
name: DisputeKitClassic
85+
network: _PLACEHOLDER_
86+
source:
87+
address: "_PLACEHOLDER_"
88+
abi: DisputeKitClassic
89+
startBlock: _PLACEHOLDER_
90+
mapping:
91+
kind: ethereum/events
92+
apiVersion: 0.0.7
93+
language: wasm/assemblyscript
94+
entities:
95+
- ClassicDispute
96+
- ClassicRound
97+
- ClassicVote
98+
- ClassicContribution
99+
abis:
100+
- name: DisputeKitClassic
101+
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicNeo.json
102+
- name: KlerosCore
103+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreNeo.json
104+
eventHandlers:
105+
- event: DisputeCreation(indexed uint256,uint256,bytes)
106+
handler: handleDisputeCreation
107+
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
108+
handler: handleContributionEvent
109+
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
110+
handler: handleWithdrawal
111+
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
112+
handler: handleChoiceFunded
113+
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
114+
handler: handleVoteCast
115+
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
116+
handler: handleCommitCast
117+
file: ./src/DisputeKitClassic.ts
118+
- kind: ethereum
119+
name: DisputeKitShutter
120+
network: _PLACEHOLDER_
121+
source:
122+
address: "_PLACEHOLDER_"
123+
abi: DisputeKitShutter
124+
startBlock: _PLACEHOLDER_
125+
mapping:
126+
kind: ethereum/events
127+
apiVersion: 0.0.7
128+
language: wasm/assemblyscript
129+
entities:
130+
- ClassicDispute
131+
- ClassicRound
132+
- ClassicVote
133+
- ClassicContribution
134+
abis:
135+
- name: DisputeKitShutter
136+
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitShutter.json
137+
- name: KlerosCore
138+
# FIX: temporarily point to abi with event addition
139+
file: ./abi-migrations/KlerosCore.json
140+
eventHandlers:
141+
- event: DisputeCreation(indexed uint256,uint256,bytes)
142+
handler: handleDisputeCreation
143+
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
144+
handler: handleContributionEvent
145+
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
146+
handler: handleWithdrawal
147+
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
148+
handler: handleChoiceFunded
149+
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
150+
handler: handleVoteCast
151+
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
152+
handler: handleCommitCast
153+
file: ./src/DisputeKitClassic.ts
154+
- kind: ethereum
155+
name: EvidenceModule
156+
network: _PLACEHOLDER_
157+
source:
158+
address: "_PLACEHOLDER_"
159+
abi: EvidenceModule
160+
startBlock: _PLACEHOLDER_
161+
mapping:
162+
kind: ethereum/events
163+
apiVersion: 0.0.7
164+
language: wasm/assemblyscript
165+
entities:
166+
- ClassicEvidenceGroup
167+
- ClassicEvidence
168+
abis:
169+
- name: EvidenceModule
170+
file: ../../contracts/deployments/_PLACEHOLDER_/EvidenceModule.json
171+
eventHandlers:
172+
- event: Evidence(indexed uint256,indexed address,string)
173+
handler: handleEvidenceEvent
174+
file: ./src/EvidenceModule.ts
175+
- kind: ethereum
176+
name: SortitionModule
177+
network: _PLACEHOLDER_
178+
source:
179+
address: "_PLACEHOLDER_"
180+
abi: SortitionModule
181+
startBlock: _PLACEHOLDER_
182+
mapping:
183+
kind: ethereum/events
184+
apiVersion: 0.0.7
185+
language: wasm/assemblyscript
186+
entities:
187+
- JurorTokensPerCourt
188+
abis:
189+
- name: SortitionModule
190+
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleNeo.json
191+
eventHandlers:
192+
- event: StakeDelayedAlreadyTransferredDeposited(indexed address,uint256,uint256)
193+
handler: handleStakeDelayedAlreadyTransferredDeposited
194+
- event: StakeDelayedAlreadyTransferredWithdrawn(indexed address,indexed uint96,uint256)
195+
handler: handleStakeDelayedAlreadyTransferredWithdrawn
196+
- event: StakeDelayedNotTransferred(indexed address,uint256,uint256)
197+
handler: handleStakeDelayedNotTransferred
198+
- event: StakeLocked(indexed address,uint256,bool)
199+
handler: handleStakeLocked
200+
- event: StakeSet(indexed address,uint256,uint256,uint256)
201+
handler: handleStakeSet
202+
file: ./src/SortitionModule.ts

subgraph/core-neo/subgraph.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# THIS FILE IS AUTO-GENERATED BY update.sh FROM subgraph.template.yaml, ANY CHANGES WILL BE LOST.
12
specVersion: 0.0.5
23
schema:
34
file: ./schema.graphql
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
specVersion: 0.0.5
2+
schema:
3+
file: ./schema.graphql
4+
features:
5+
- fullTextSearch
6+
dataSources:
7+
- kind: ethereum
8+
name: KlerosCore
9+
network: _PLACEHOLDER_
10+
source:
11+
address: "_PLACEHOLDER_"
12+
abi: KlerosCore
13+
startBlock: _PLACEHOLDER_
14+
mapping:
15+
kind: ethereum/events
16+
apiVersion: 0.0.7
17+
language: wasm/assemblyscript
18+
entities:
19+
- User
20+
- Arbitrable
21+
- TokenAndETHShift
22+
- JurorTokensPerCourt
23+
- Court
24+
- Dispute
25+
- Round
26+
- Draw
27+
- DisputeKit
28+
- Counter
29+
abis:
30+
- name: SortitionModule
31+
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleUniversity.json
32+
- name: DisputeKitClassic
33+
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicUniversity.json
34+
- name: KlerosCore
35+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreUniversity.json
36+
eventHandlers:
37+
- event: AppealDecision(indexed uint256,indexed address)
38+
handler: handleAppealDecision
39+
- event: DisputeCreation(indexed uint256,indexed address)
40+
handler: handleDisputeCreation
41+
receipt: true
42+
- event: Draw(indexed address,indexed uint256,uint256,uint256)
43+
handler: handleDraw
44+
- event: NewPeriod(indexed uint256,uint8)
45+
handler: handleNewPeriod
46+
- event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
47+
handler: handleCourtCreated
48+
- event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4])
49+
handler: handleCourtModified
50+
- event: DisputeKitCreated(indexed uint256,indexed address)
51+
handler: handleDisputeKitCreated
52+
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
53+
handler: handleDisputeKitEnabled
54+
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
55+
handler: handleTokenAndETHShift
56+
- event: Ruling(indexed address,indexed uint256,uint256)
57+
handler: handleRuling
58+
- event: AcceptedFeeToken(indexed address,indexed bool)
59+
handler: handleAcceptedFeeToken
60+
- event: CourtJump(indexed uint256,indexed uint256,indexed uint96,uint96)
61+
handler: handleCourtJump
62+
file: ./src/KlerosCore.ts
63+
- kind: ethereum
64+
name: PolicyRegistry
65+
network: _PLACEHOLDER_
66+
source:
67+
address: "_PLACEHOLDER_"
68+
abi: PolicyRegistry
69+
startBlock: _PLACEHOLDER_
70+
mapping:
71+
kind: ethereum/events
72+
apiVersion: 0.0.7
73+
language: wasm/assemblyscript
74+
entities:
75+
- Court
76+
abis:
77+
- name: PolicyRegistry
78+
file: ../../contracts/deployments/_PLACEHOLDER_/PolicyRegistry.json
79+
eventHandlers:
80+
- event: PolicyUpdate(indexed uint256,string,string)
81+
handler: handlePolicyUpdate
82+
file: ./src/PolicyRegistry.ts
83+
- kind: ethereum
84+
name: DisputeKitClassic
85+
network: _PLACEHOLDER_
86+
source:
87+
address: "_PLACEHOLDER_"
88+
abi: DisputeKitClassic
89+
startBlock: _PLACEHOLDER_
90+
mapping:
91+
kind: ethereum/events
92+
apiVersion: 0.0.7
93+
language: wasm/assemblyscript
94+
entities:
95+
- ClassicDispute
96+
- ClassicRound
97+
- ClassicVote
98+
- ClassicContribution
99+
abis:
100+
- name: DisputeKitClassic
101+
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassicUniversity.json
102+
- name: KlerosCore
103+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCoreUniversity.json
104+
eventHandlers:
105+
- event: DisputeCreation(indexed uint256,uint256,bytes)
106+
handler: handleDisputeCreation
107+
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
108+
handler: handleContributionEvent
109+
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
110+
handler: handleWithdrawal
111+
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
112+
handler: handleChoiceFunded
113+
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
114+
handler: handleVoteCast
115+
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
116+
handler: handleCommitCast
117+
file: ./src/DisputeKitClassic.ts
118+
- kind: ethereum
119+
name: EvidenceModule
120+
network: _PLACEHOLDER_
121+
source:
122+
address: "_PLACEHOLDER_"
123+
abi: EvidenceModule
124+
startBlock: _PLACEHOLDER_
125+
mapping:
126+
kind: ethereum/events
127+
apiVersion: 0.0.7
128+
language: wasm/assemblyscript
129+
entities:
130+
- ClassicEvidenceGroup
131+
- ClassicEvidence
132+
abis:
133+
- name: EvidenceModule
134+
file: ../../contracts/deployments/_PLACEHOLDER_/EvidenceModule.json
135+
eventHandlers:
136+
- event: Evidence(indexed uint256,indexed address,string)
137+
handler: handleEvidenceEvent
138+
file: ./src/EvidenceModule.ts
139+
- kind: ethereum
140+
name: SortitionModule
141+
network: _PLACEHOLDER_
142+
source:
143+
address: "_PLACEHOLDER_"
144+
abi: SortitionModule
145+
startBlock: _PLACEHOLDER_
146+
mapping:
147+
kind: ethereum/events
148+
apiVersion: 0.0.7
149+
language: wasm/assemblyscript
150+
entities:
151+
- JurorTokensPerCourt
152+
abis:
153+
- name: SortitionModule
154+
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModuleUniversity.json
155+
eventHandlers:
156+
- event: StakeLocked(indexed address,uint256,bool)
157+
handler: handleStakeLocked
158+
- event: StakeSet(indexed address,uint256,uint256,uint256)
159+
handler: handleStakeSet
160+
file: ./src/SortitionModule.ts

subgraph/core-university/subgraph.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# THIS FILE IS AUTO-GENERATED BY update.sh FROM subgraph.template.yaml, ANY CHANGES WILL BE LOST.
12
specVersion: 0.0.5
23
schema:
34
file: ./schema.graphql
@@ -64,9 +65,9 @@ dataSources:
6465
name: PolicyRegistry
6566
network: arbitrum-sepolia
6667
source:
67-
address: "0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da"
68+
address: "0x31d067405184d7FaA64b0834511cBcFAF32CdC4b"
6869
abi: PolicyRegistry
69-
startBlock: 3084568
70+
startBlock: 141215158
7071
mapping:
7172
kind: ethereum/events
7273
apiVersion: 0.0.7
@@ -119,9 +120,9 @@ dataSources:
119120
name: EvidenceModule
120121
network: arbitrum-sepolia
121122
source:
122-
address: "0x57fd453FB0d16f8ca174E7386102D7170E17Be09"
123+
address: "0x990f44d19a5F46889801B31bf58e0536fBECf27C"
123124
abi: EvidenceModule
124-
startBlock: 3638735
125+
startBlock: 141215177
125126
mapping:
126127
kind: ethereum/events
127128
apiVersion: 0.0.7

0 commit comments

Comments
 (0)