Skip to content

Commit d6cc3be

Browse files
committed
fix: core subgraph migration (wip)
1 parent 1193c19 commit d6cc3be

File tree

3 files changed

+43
-67
lines changed

3 files changed

+43
-67
lines changed

subgraph/core-university/subgraph.template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ dataSources:
5353
handler: handleDisputeKitCreated
5454
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
5555
handler: handleDisputeKitEnabled
56-
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
57-
handler: handleTokenAndETHShift
56+
- event: JurorRewardPenalty(indexed address,indexed uint256,indexed uint256,uint256,uint256,int256,int256,address)
57+
handler: handleJurorRewardPenalty
5858
- event: Ruling(indexed address,indexed uint256,uint256)
5959
handler: handleRuling
6060
- event: AcceptedFeeToken(indexed address,indexed bool)
@@ -108,7 +108,7 @@ dataSources:
108108
handler: handleDisputeCreation
109109
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
110110
handler: handleContributionEvent
111-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
111+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
112112
handler: handleWithdrawal
113113
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
114114
handler: handleChoiceFunded

subgraph/core/subgraph.template.yaml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ dataSources:
3434
- name: DisputeKitClassic
3535
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassic.json
3636
- name: KlerosCore
37-
# FIX: temporarily point to the abi with event addition.
38-
file: ./abi-migrations/KlerosCore.json
37+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCore.json
3938
eventHandlers:
4039
- event: AppealDecision(indexed uint256,indexed address)
4140
handler: handleAppealDecision
@@ -48,17 +47,14 @@ dataSources:
4847
handler: handleNewPeriod
4948
- event: CourtCreated(indexed uint96,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
5049
handler: handleCourtCreated
51-
# FIX: This is support for old signature
52-
- event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
53-
handler: handleCourtCreated
5450
- event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4])
5551
handler: handleCourtModified
5652
- event: DisputeKitCreated(indexed uint256,indexed address)
5753
handler: handleDisputeKitCreated
5854
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
5955
handler: handleDisputeKitEnabled
60-
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
61-
handler: handleTokenAndETHShift
56+
- event: JurorRewardPenalty(indexed address,indexed uint256,indexed uint256,uint256,uint256,int256,int256,address)
57+
handler: handleJurorRewardPenalty
6258
- event: Ruling(indexed address,indexed uint256,uint256)
6359
handler: handleRuling
6460
- event: AcceptedFeeToken(indexed address,indexed bool)
@@ -106,14 +102,13 @@ dataSources:
106102
- name: DisputeKitClassic
107103
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassic.json
108104
- name: KlerosCore
109-
# FIX: temporarily point to abi with event addition
110-
file: ./abi-migrations/KlerosCore.json
105+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCore.json
111106
eventHandlers:
112107
- event: DisputeCreation(indexed uint256,uint256,bytes)
113108
handler: handleDisputeCreation
114109
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
115110
handler: handleContributionEvent
116-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
111+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
117112
handler: handleWithdrawal
118113
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
119114
handler: handleChoiceFunded
@@ -144,14 +139,13 @@ dataSources:
144139
- name: DisputeKitClassic # Required on Alchemy
145140
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassic.json
146141
- name: KlerosCore
147-
# FIX: temporarily point to abi with event addition
148-
file: ./abi-migrations/KlerosCore.json
142+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCore.json
149143
eventHandlers:
150144
- event: DisputeCreation(indexed uint256,uint256,bytes)
151145
handler: handleDisputeCreation
152146
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
153147
handler: handleContributionEvent
154-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
148+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
155149
handler: handleWithdrawal
156150
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
157151
handler: handleChoiceFunded
@@ -182,14 +176,13 @@ dataSources:
182176
- name: DisputeKitClassic # Required on Alchemy
183177
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassic.json
184178
- name: KlerosCore
185-
# FIX: temporarily point to abi with event addition
186-
file: ./abi-migrations/KlerosCore.json
179+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCore.json
187180
eventHandlers:
188181
- event: DisputeCreation(indexed uint256,uint256,bytes)
189182
handler: handleDisputeCreation
190183
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
191184
handler: handleContributionEvent
192-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
185+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
193186
handler: handleWithdrawal
194187
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
195188
handler: handleChoiceFunded
@@ -220,14 +213,13 @@ dataSources:
220213
- name: DisputeKitClassic # Required on Alchemy
221214
file: ../../contracts/deployments/_PLACEHOLDER_/DisputeKitClassic.json
222215
- name: KlerosCore
223-
# FIX: temporarily point to abi with event addition
224-
file: ./abi-migrations/KlerosCore.json
216+
file: ../../contracts/deployments/_PLACEHOLDER_/KlerosCore.json
225217
eventHandlers:
226218
- event: DisputeCreation(indexed uint256,uint256,bytes)
227219
handler: handleDisputeCreation
228220
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
229221
handler: handleContributionEvent
230-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
222+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
231223
handler: handleWithdrawal
232224
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
233225
handler: handleChoiceFunded
@@ -272,16 +264,12 @@ dataSources:
272264
- JurorTokensPerCourt
273265
abis:
274266
- name: SortitionModule
275-
# FIX: temporarily point to abi with event addition
276-
file: ./abi-migrations/SortitionModule.json
267+
file: ../../contracts/deployments/_PLACEHOLDER_/SortitionModule.json
277268
eventHandlers:
278269
- event: StakeDelayed(indexed address,indexed uint96,uint256)
279270
handler: handleStakeDelayed
280271
- event: StakeLocked(indexed address,uint256,bool)
281272
handler: handleStakeLocked
282273
- event: StakeSet(indexed address,uint256,uint256,uint256)
283274
handler: handleStakeSet
284-
# FIX: old stake set signature
285-
- event: StakeSet(indexed address,uint256,uint256)
286-
handler: handleStakeSet
287275
file: ./src/SortitionModule.ts

subgraph/core/subgraph.yaml

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ dataSources:
1111
name: KlerosCore
1212
network: arbitrum-sepolia
1313
source:
14-
address: "0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9"
14+
address: "0x9EfCaeF787d0b53d7a24fdeAB067A4BAFCDb892F"
1515
abi: KlerosCore
16-
startBlock: 175286093
16+
startBlock: 212135308
1717
mapping:
1818
kind: ethereum/events
1919
apiVersion: 0.0.7
@@ -35,8 +35,7 @@ dataSources:
3535
- name: DisputeKitClassic
3636
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
3737
- name: KlerosCore
38-
# FIX: temporarily point to the abi with event addition.
39-
file: ./abi-migrations/KlerosCore.json
38+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
4039
eventHandlers:
4140
- event: AppealDecision(indexed uint256,indexed address)
4241
handler: handleAppealDecision
@@ -49,17 +48,14 @@ dataSources:
4948
handler: handleNewPeriod
5049
- event: CourtCreated(indexed uint96,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
5150
handler: handleCourtCreated
52-
# FIX: This is support for old signature
53-
- event: CourtCreated(indexed uint256,indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4],uint256[])
54-
handler: handleCourtCreated
5551
- event: CourtModified(indexed uint96,bool,uint256,uint256,uint256,uint256,uint256[4])
5652
handler: handleCourtModified
5753
- event: DisputeKitCreated(indexed uint256,indexed address)
5854
handler: handleDisputeKitCreated
5955
- event: DisputeKitEnabled(indexed uint96,indexed uint256,indexed bool)
6056
handler: handleDisputeKitEnabled
61-
- event: TokenAndETHShift(indexed address,indexed uint256,indexed uint256,uint256,int256,int256,address)
62-
handler: handleTokenAndETHShift
57+
- event: JurorRewardPenalty(indexed address,indexed uint256,indexed uint256,uint256,uint256,int256,int256,address)
58+
handler: handleJurorRewardPenalty
6359
- event: Ruling(indexed address,indexed uint256,uint256)
6460
handler: handleRuling
6561
- event: AcceptedFeeToken(indexed address,indexed bool)
@@ -71,9 +67,9 @@ dataSources:
7167
name: PolicyRegistry
7268
network: arbitrum-sepolia
7369
source:
74-
address: "0xd8681dBF525ecBda2F799BFddB96840065075e8A"
70+
address: "0x6445F57d2Bd2AD5BC23bC899731f7D5184d6e893"
7571
abi: PolicyRegistry
76-
startBlock: 175286057
72+
startBlock: 212135252
7773
mapping:
7874
kind: ethereum/events
7975
apiVersion: 0.0.7
@@ -91,9 +87,9 @@ dataSources:
9187
name: DisputeKitClassic
9288
network: arbitrum-sepolia
9389
source:
94-
address: "0xeEEbbbff8f377dCFc7d4F7876C531db0d22720e1"
90+
address: "0xc77c0dFCf6845544dd45734100d385be3D649B02"
9591
abi: DisputeKitClassic
96-
startBlock: 175286074
92+
startBlock: 212135284
9793
mapping:
9894
kind: ethereum/events
9995
apiVersion: 0.0.7
@@ -107,14 +103,13 @@ dataSources:
107103
- name: DisputeKitClassic
108104
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
109105
- name: KlerosCore
110-
# FIX: temporarily point to abi with event addition
111-
file: ./abi-migrations/KlerosCore.json
106+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
112107
eventHandlers:
113108
- event: DisputeCreation(indexed uint256,uint256,bytes)
114109
handler: handleDisputeCreation
115110
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
116111
handler: handleContributionEvent
117-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
112+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
118113
handler: handleWithdrawal
119114
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
120115
handler: handleChoiceFunded
@@ -127,9 +122,9 @@ dataSources:
127122
name: DisputeKitShutter
128123
network: arbitrum-sepolia
129124
source:
130-
address: "0xfE0a958bc744Bb9E224E1822625B53134ac5CB69"
125+
address: "0xD143b4FcdCf5699983fF9Ad7e38DE80Aa7Eb9Ce7"
131126
abi: DisputeKitShutter
132-
startBlock: 175286126
127+
startBlock: 212135352
133128
mapping:
134129
kind: ethereum/events
135130
apiVersion: 0.0.7
@@ -145,14 +140,13 @@ dataSources:
145140
- name: DisputeKitClassic # Required on Alchemy
146141
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
147142
- name: KlerosCore
148-
# FIX: temporarily point to abi with event addition
149-
file: ./abi-migrations/KlerosCore.json
143+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
150144
eventHandlers:
151145
- event: DisputeCreation(indexed uint256,uint256,bytes)
152146
handler: handleDisputeCreation
153147
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
154148
handler: handleContributionEvent
155-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
149+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
156150
handler: handleWithdrawal
157151
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
158152
handler: handleChoiceFunded
@@ -165,9 +159,9 @@ dataSources:
165159
name: DisputeKitGated
166160
network: arbitrum-sepolia
167161
source:
168-
address: "0x677dA30B4b27D129354DdA1e219Bcc86802132d1"
162+
address: "0x648943Cf73b7fa053942Af576C8327fcEfD314d8"
169163
abi: DisputeKitGated
170-
startBlock: 175286139
164+
startBlock: 212135369
171165
mapping:
172166
kind: ethereum/events
173167
apiVersion: 0.0.7
@@ -183,14 +177,13 @@ dataSources:
183177
- name: DisputeKitClassic # Required on Alchemy
184178
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
185179
- name: KlerosCore
186-
# FIX: temporarily point to abi with event addition
187-
file: ./abi-migrations/KlerosCore.json
180+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
188181
eventHandlers:
189182
- event: DisputeCreation(indexed uint256,uint256,bytes)
190183
handler: handleDisputeCreation
191184
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
192185
handler: handleContributionEvent
193-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
186+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
194187
handler: handleWithdrawal
195188
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
196189
handler: handleChoiceFunded
@@ -203,9 +196,9 @@ dataSources:
203196
name: DisputeKitGatedShutter
204197
network: arbitrum-sepolia
205198
source:
206-
address: "0xd86b84eb36Cd48f3f384b4490F255b494385F429"
199+
address: "0x476EE17A32363aec1D32DB49ab701E70Ec56a8e6"
207200
abi: DisputeKitGatedShutter
208-
startBlock: 175286153
201+
startBlock: 212135387
209202
mapping:
210203
kind: ethereum/events
211204
apiVersion: 0.0.7
@@ -221,14 +214,13 @@ dataSources:
221214
- name: DisputeKitClassic # Required on Alchemy
222215
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
223216
- name: KlerosCore
224-
# FIX: temporarily point to abi with event addition
225-
file: ./abi-migrations/KlerosCore.json
217+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
226218
eventHandlers:
227219
- event: DisputeCreation(indexed uint256,uint256,bytes)
228220
handler: handleDisputeCreation
229221
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
230222
handler: handleContributionEvent
231-
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
223+
- event: Withdrawal(indexed uint256,uint256,indexed address,uint256)
232224
handler: handleWithdrawal
233225
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
234226
handler: handleChoiceFunded
@@ -241,9 +233,9 @@ dataSources:
241233
name: EvidenceModule
242234
network: arbitrum-sepolia
243235
source:
244-
address: "0xA1F72e0445fc395A393247F5B8c958Ec9b7C0B49"
236+
address: "0x8AAF07ac05E81c92C6FD369aaEdE159E9893508d"
245237
abi: EvidenceModule
246-
startBlock: 175286065
238+
startBlock: 212135261
247239
mapping:
248240
kind: ethereum/events
249241
apiVersion: 0.0.7
@@ -262,9 +254,9 @@ dataSources:
262254
name: SortitionModule
263255
network: arbitrum-sepolia
264256
source:
265-
address: "0x6F24A90fBBeabB2B4343Bb9c1eD8ee6AcAa50663"
257+
address: "0x37760BF7fC6027836E50a4D553A313f112188406"
266258
abi: SortitionModule
267-
startBlock: 175286083
259+
startBlock: 212135296
268260
mapping:
269261
kind: ethereum/events
270262
apiVersion: 0.0.7
@@ -273,16 +265,12 @@ dataSources:
273265
- JurorTokensPerCourt
274266
abis:
275267
- name: SortitionModule
276-
# FIX: temporarily point to abi with event addition
277-
file: ./abi-migrations/SortitionModule.json
268+
file: ../../contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json
278269
eventHandlers:
279270
- event: StakeDelayed(indexed address,indexed uint96,uint256)
280271
handler: handleStakeDelayed
281272
- event: StakeLocked(indexed address,uint256,bool)
282273
handler: handleStakeLocked
283274
- event: StakeSet(indexed address,uint256,uint256,uint256)
284275
handler: handleStakeSet
285-
# FIX: old stake set signature
286-
- event: StakeSet(indexed address,uint256,uint256)
287-
handler: handleStakeSet
288276
file: ./src/SortitionModule.ts

0 commit comments

Comments
 (0)