Skip to content

feat: subgraph support for shutter disputekit in devnet #1966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 68 additions & 21 deletions subgraph/core/src/DisputeKitClassic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
CommitCast,
} from "../generated/DisputeKitClassic/DisputeKitClassic";
import { KlerosCore } from "../generated/KlerosCore/KlerosCore";
import { ClassicDispute, ClassicJustification, ClassicRound, ClassicVote, Dispute } from "../generated/schema";
import { ClassicDispute, ClassicJustification, ClassicRound, ClassicVote, Dispute, Round } from "../generated/schema";
import { ensureClassicContributionFromEvent } from "./entities/ClassicContribution";
import { createClassicDisputeFromEvent } from "./entities/ClassicDispute";
import {
Expand All @@ -19,23 +19,36 @@ import {
updateCountsAndGetCurrentRuling,
} from "./entities/ClassicRound";
import { ensureClassicVote } from "./entities/ClassicVote";
import { ONE, ZERO } from "./utils";

export const DISPUTEKIT_ID = "1";
import { ONE, extractDisputeKitIDFromExtraData } from "./utils";

export function handleDisputeCreation(event: DisputeCreation): void {
const disputeID = event.params._coreDisputeID.toString();
createClassicDisputeFromEvent(event);
const numberOfChoices = event.params._numberOfChoices;
createClassicRound(disputeID, numberOfChoices, ZERO);
const disputeKitID = extractDisputeKitIDFromExtraData(event.params._extraData);

const disputeKitClassic = DisputeKitClassic.bind(event.address);
const klerosCore = KlerosCore.bind(disputeKitClassic.core());
const totalRounds = klerosCore.getNumberOfRounds(event.params._coreDisputeID);
const newRoundIndex = totalRounds.minus(ONE);

createClassicDisputeFromEvent(event, disputeKitID, newRoundIndex);
createClassicRound(disputeID, event.params._numberOfChoices, newRoundIndex, disputeKitID);
}
Comment on lines +26 to 35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add a null / empty check for disputeKitID before composing entity IDs

extractDisputeKitIDFromExtraData() can legitimately fail (e.g. malformed or zero-length extraData) and return an empty string.
Using that value immediately creates IDs such as "null-123" which later break .load() look-ups and triggers hard-to-trace “entity not found” errors.

-  const disputeKitID = extractDisputeKitIDFromExtraData(event.params._extraData);
+  const disputeKitID = extractDisputeKitIDFromExtraData(event.params._extraData);
+  if (!disputeKitID) {
+    // Guard against malformed events – nothing to index
+    return;
+  }

This defensive guard is especially important now that the same code path indexes multiple kits.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const disputeKitID = extractDisputeKitIDFromExtraData(event.params._extraData);
const disputeKitClassic = DisputeKitClassic.bind(event.address);
const klerosCore = KlerosCore.bind(disputeKitClassic.core());
const totalRounds = klerosCore.getNumberOfRounds(event.params._coreDisputeID);
const newRoundIndex = totalRounds.minus(ONE);
createClassicDisputeFromEvent(event, disputeKitID, newRoundIndex);
createClassicRound(disputeID, event.params._numberOfChoices, newRoundIndex, disputeKitID);
}
const disputeKitID = extractDisputeKitIDFromExtraData(event.params._extraData);
if (!disputeKitID) {
// Guard against malformed events – nothing to index
return;
}
const disputeKitClassic = DisputeKitClassic.bind(event.address);
const klerosCore = KlerosCore.bind(disputeKitClassic.core());
const totalRounds = klerosCore.getNumberOfRounds(event.params._coreDisputeID);
const newRoundIndex = totalRounds.minus(ONE);
createClassicDisputeFromEvent(event, disputeKitID, newRoundIndex);
createClassicRound(disputeID, event.params._numberOfChoices, newRoundIndex, disputeKitID);
}


export function handleCommitCast(event: CommitCast): void {
const coreDisputeID = event.params._coreDisputeID;
const coreDispute = Dispute.load(coreDisputeID.toString());
const classicDisputeID = `${DISPUTEKIT_ID}-${coreDisputeID}`;
const coreDisputeID = event.params._coreDisputeID.toString();
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;

const coreCurrentRound = Round.load(coreDispute.currentRound);
if (!coreCurrentRound) return;

const disputeKitID = coreCurrentRound.disputeKit;

const classicDisputeID = `${disputeKitID}-${coreDisputeID}`;

const classicDispute = ClassicDispute.load(classicDisputeID);
if (!classicDispute || !coreDispute) return;
if (!classicDispute) return;

const currentLocalRoundID = classicDispute.id + "-" + classicDispute.currentLocalRoundIndex.toString();
const voteIDs = event.params._voteIDs;
for (let i = 0; i < voteIDs.length; i++) {
Expand All @@ -55,9 +68,18 @@ export function handleVoteCast(event: VoteCast): void {
const juror = event.params._juror.toHexString();
const coreDisputeID = event.params._coreDisputeID.toString();
const coreDispute = Dispute.load(coreDisputeID);
const classicDisputeID = `${DISPUTEKIT_ID}-${coreDisputeID}`;
if (!coreDispute) return;

const coreCurrentRound = Round.load(coreDispute.currentRound);
if (!coreCurrentRound) return;

const disputeKitID = coreCurrentRound.disputeKit;

const classicDisputeID = `${disputeKitID}-${coreDisputeID}`;

const classicDispute = ClassicDispute.load(classicDisputeID);
if (!classicDispute || !coreDispute) return;
if (!classicDispute) return;

const choice = event.params._choice;
const currentLocalRoundID = classicDispute.id + "-" + classicDispute.currentLocalRoundIndex.toString();
const voteIDs = event.params._voteIDs;
Expand All @@ -70,6 +92,7 @@ export function handleVoteCast(event: VoteCast): void {
justification.transactionHash = event.transaction.hash.toHexString();
justification.timestamp = event.block.timestamp;
justification.save();

const currentRulingInfo = updateCountsAndGetCurrentRuling(
currentLocalRoundID,
choice,
Expand All @@ -78,6 +101,7 @@ export function handleVoteCast(event: VoteCast): void {
coreDispute.currentRuling = currentRulingInfo.ruling;
coreDispute.tied = currentRulingInfo.tied;
coreDispute.save();

let classicVote: ClassicVote;
for (let i = 0; i < voteIDs.length; i++) {
classicVote = ensureClassicVote(currentLocalRoundID, juror, voteIDs[i], coreDispute);
Expand All @@ -97,7 +121,16 @@ export function handleChoiceFunded(event: ChoiceFunded): void {
const coreDisputeID = event.params._coreDisputeID.toString();
const coreRoundIndex = event.params._coreRoundID.toString();
const choice = event.params._choice;
const roundID = `${DISPUTEKIT_ID}-${coreDisputeID}-${coreRoundIndex}`;

const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;

const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;

const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;
Comment on lines +125 to +133
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Early exit when disputeKitID missing

Same defensive check as earlier – without it, roundID may start with "null-".

  const disputeKitID = coreRound.disputeKit;
-  
+  if (!disputeKitID) return;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;
const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;
const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;
const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;
if (!disputeKitID) return;
const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;


const localRound = ClassicRound.load(roundID);
if (!localRound) return;
Expand All @@ -123,13 +156,18 @@ export function handleChoiceFunded(event: ChoiceFunded): void {

localRound.feeRewards = localRound.feeRewards.minus(appealCost);

const localDispute = ClassicDispute.load(`${DISPUTEKIT_ID}-${coreDisputeID}`);
const newDisputeKitID = roundInfo.disputeKitID;

const localDispute = ClassicDispute.load(`${disputeKitID}-${coreDisputeID}`);
if (!localDispute) return;
const newRoundIndex = localDispute.currentLocalRoundIndex.plus(ONE);
const numberOfChoices = localDispute.numberOfChoices;
localDispute.currentLocalRoundIndex = newRoundIndex;
localDispute.save();
createClassicRound(coreDisputeID, numberOfChoices, newRoundIndex);

if (BigInt.fromString(disputeKitID) === newDisputeKitID) {
const newRoundIndex = localDispute.currentLocalRoundIndex.plus(ONE);
const numberOfChoices = localDispute.numberOfChoices;
localDispute.currentLocalRoundIndex = newRoundIndex;
localDispute.save();
createClassicRound(coreDisputeID, numberOfChoices, newRoundIndex, disputeKitID);
}
Comment on lines +160 to +170
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect BigInt comparison – use .equals() instead of ===

BigInt is a reference type in AssemblyScript; === compares object identity, not numeric value, and will always return false for two distinct instances representing the same number.

-    if (BigInt.fromString(disputeKitID) === newDisputeKitID) {
+    if (BigInt.fromString(disputeKitID).equals(newDisputeKitID)) {

Without this fix, the new round will never be created after an appeal when the dispute kit stays the same, breaking the appeal flow.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const localDispute = ClassicDispute.load(`${disputeKitID}-${coreDisputeID}`);
if (!localDispute) return;
const newRoundIndex = localDispute.currentLocalRoundIndex.plus(ONE);
const numberOfChoices = localDispute.numberOfChoices;
localDispute.currentLocalRoundIndex = newRoundIndex;
localDispute.save();
createClassicRound(coreDisputeID, numberOfChoices, newRoundIndex);
if (BigInt.fromString(disputeKitID) === newDisputeKitID) {
const newRoundIndex = localDispute.currentLocalRoundIndex.plus(ONE);
const numberOfChoices = localDispute.numberOfChoices;
localDispute.currentLocalRoundIndex = newRoundIndex;
localDispute.save();
createClassicRound(coreDisputeID, numberOfChoices, newRoundIndex, disputeKitID);
}
const localDispute = ClassicDispute.load(`${disputeKitID}-${coreDisputeID}`);
if (!localDispute) return;
if (BigInt.fromString(disputeKitID).equals(newDisputeKitID)) {
const newRoundIndex = localDispute.currentLocalRoundIndex.plus(ONE);
const numberOfChoices = localDispute.numberOfChoices;
localDispute.currentLocalRoundIndex = newRoundIndex;
localDispute.save();
createClassicRound(coreDisputeID, numberOfChoices, newRoundIndex, disputeKitID);
}

}

localRound.save();
Expand All @@ -144,7 +182,16 @@ export function handleWithdrawal(event: Withdrawal): void {
// check if all appeal fees have been withdrawn
const coreDisputeID = event.params._coreDisputeID.toString();
const coreRoundIndex = event.params._coreRoundID.toString();
const roundID = `${DISPUTEKIT_ID}-${coreDisputeID}-${coreRoundIndex}`;

const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;

const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;

const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;
Comment on lines +186 to +194
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Defensive check for disputeKitID

Replicating the guard here avoids malformed IDs during withdrawals.

  const disputeKitID = coreRound.disputeKit;
-  
+  if (!disputeKitID) return;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;
const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;
const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;
const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;
if (!disputeKitID) return;
const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;


Comment on lines +186 to 195
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Missing defensive check in handleWithdrawal

coreRound.disputeKit can be empty for legacy rounds or if an earlier handler failed to set it.
Add the same guard used elsewhere to avoid "null-" IDs and the subsequent failed ClassicRound.load.

const localRound = ClassicRound.load(roundID);
if (!localRound) return;
Expand Down
2 changes: 1 addition & 1 deletion subgraph/core/src/KlerosCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function handleNewPeriod(event: NewPeriod): void {
updateTotalLeaderboardJurors(ONE, event.block.timestamp);
}

// Since this is a ClassicVote entity, this will only work for the Classic DisputeKit (which has ID "1").
// Since this is a ClassicVote entity, this will only work for the ClassicDisputeKit and ShutterDisputeKit.
const vote = ClassicVote.load(`${round.disputeKit}-${draw.id}`);

if (!vote) {
Expand Down
16 changes: 13 additions & 3 deletions subgraph/core/src/entities/ClassicContribution.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import { ClassicContribution } from "../../generated/schema";
import { ClassicContribution, Dispute, DisputeKit, Round } from "../../generated/schema";
import { Contribution as ContributionEvent, Withdrawal } from "../../generated/DisputeKitClassic/DisputeKitClassic";
import { DISPUTEKIT_ID } from "../DisputeKitClassic";
import { ensureUser } from "./User";

export function ensureClassicContributionFromEvent<T>(event: T): ClassicContribution | null {
if (!(event instanceof ContributionEvent) && !(event instanceof Withdrawal)) return null;
const coreDisputeID = event.params._coreDisputeID.toString();
const coreRoundIndex = event.params._coreRoundID.toString();
const roundID = `${DISPUTEKIT_ID}-${coreDisputeID}-${coreRoundIndex}`;

const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return null;

const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return null;

const disputeKitID = coreRound.disputeKit;

const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;

Comment on lines +10 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Guard against a missing disputeKit reference

coreRound.disputeKit is assumed to be present and non-empty. If the Round entity was created before the refactor (or gets corrupted), this will evaluate to null and the constructed roundID becomes "null-<coreDisputeID>-<coreRoundIndex>", causing silent data fragmentation.

-  const disputeKitID = coreRound.disputeKit;
+  const disputeKitID = coreRound.disputeKit;
+  if (!disputeKitID) {
+    // Inconsistent data – abort processing to avoid polluting the store
+    return null;
+  }

Fail-fast avoids persisting wrongly-keyed entities and makes the issue visible during indexing.


🏁 Script executed:

#!/bin/bash
echo "=== GraphQL schema files ==="
find . -type f -name "*.graphql"

echo ""
echo "=== 'type Round' and 'disputeKit' in GraphQL schemas ==="
rg -n "type Round" -C2 -g "*.graphql" || true
rg -n "disputeKit" -C2 -g "*.graphql" || true

echo ""
echo "=== Locate and inspect Round entity class ==="
round_files=$(rg -l "export class Round" -g "*.ts")
echo "Found Round.ts files:"
echo "$round_files"

for file in $round_files; do
  echo ""
  echo "------ $file ------"
  rg -n "export class Round" -C3 "$file"
  rg -n "get disputeKit" -C5 "$file" || true
done

Length of output: 3678


Guard against a missing disputeKit reference

The GraphQL schema defines Round.disputeKit as non-nullable, but legacy or corrupted data may still omit it. Add a null check immediately after loading the Round to avoid constructing IDs like "null-<coreDisputeID>-<coreRoundIndex>" and silently polluting the store.

• File: subgraph/core/src/entities/ClassicContribution.ts
• Context: right after assigning disputeKitID

-  const disputeKitID = coreRound.disputeKit;
+  const disputeKitID = coreRound.disputeKit;
+  if (!disputeKitID) {
+    // Inconsistent data – abort processing to avoid polluting the store
+    return null;
+  }

This fail-fast guard ensures any missing disputeKit is surfaced during indexing rather than resulting in fragmented or mis-keyed entities.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return null;
const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return null;
const disputeKitID = coreRound.disputeKit;
const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return null;
const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return null;
const disputeKitID = coreRound.disputeKit;
if (!disputeKitID) {
// Inconsistent data – abort processing to avoid polluting the store
return null;
}
const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;

ensureUser(event.params._contributor.toHexString());
const contributor = event.params._contributor.toHexString();
const choice = event.params._choice;
Expand Down
8 changes: 4 additions & 4 deletions subgraph/core/src/entities/ClassicDispute.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { BigInt } from "@graphprotocol/graph-ts";
import { DisputeCreation } from "../../generated/DisputeKitClassic/DisputeKitClassic";
import { ClassicDispute } from "../../generated/schema";
import { ZERO } from "../utils";

export function createClassicDisputeFromEvent(event: DisputeCreation): void {
export function createClassicDisputeFromEvent(event: DisputeCreation, disputeKitID: string, roundIndex: BigInt): void {
const coreDisputeID = event.params._coreDisputeID.toString();
const classicDispute = new ClassicDispute(`1-${coreDisputeID}`);
const classicDispute = new ClassicDispute(`${disputeKitID}-${coreDisputeID}`);
classicDispute.coreDispute = coreDisputeID;
classicDispute.currentLocalRoundIndex = ZERO;
classicDispute.currentLocalRoundIndex = roundIndex;
classicDispute.numberOfChoices = event.params._numberOfChoices;
classicDispute.extraData = event.params._extraData;
classicDispute.timestamp = event.block.timestamp;
Expand Down
20 changes: 16 additions & 4 deletions subgraph/core/src/entities/ClassicRound.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { BigInt } from "@graphprotocol/graph-ts";
import { Contribution } from "../../generated/DisputeKitClassic/DisputeKitClassic";
import { Answer, ClassicRound } from "../../generated/schema";
import { Answer, ClassicRound, Dispute, Round } from "../../generated/schema";
import { ZERO } from "../utils";

export function createClassicRound(disputeID: string, numberOfChoices: BigInt, roundIndex: BigInt): void {
const localDisputeID = `1-${disputeID}`;
export function createClassicRound(
disputeID: string,
numberOfChoices: BigInt,
roundIndex: BigInt,
disputeKitID: string
): void {
const localDisputeID = `${disputeKitID}-${disputeID}`;
const id = `${localDisputeID}-${roundIndex.toString()}`;
const classicRound = new ClassicRound(id);
classicRound.localDispute = localDisputeID;
Expand Down Expand Up @@ -67,9 +72,16 @@ export function updateCountsAndGetCurrentRuling(id: string, choice: BigInt, delt
}

export function updateChoiceFundingFromContributionEvent(event: Contribution): void {
const disputeKitID = "1";
const coreDisputeID = event.params._coreDisputeID.toString();
const coreRoundIndex = event.params._coreRoundID.toString();
const coreDispute = Dispute.load(coreDisputeID);
if (!coreDispute) return;

const roundId = `${coreDisputeID}-${coreRoundIndex}`;
const coreRound = Round.load(roundId);
if (!coreRound) return;
const disputeKitID = coreRound.disputeKit;

const roundID = `${disputeKitID}-${coreDisputeID}-${coreRoundIndex}`;

const classicRound = ClassicRound.load(roundID);
Expand Down
8 changes: 7 additions & 1 deletion subgraph/core/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { BigInt } from "@graphprotocol/graph-ts";
import { BigInt, Bytes } from "@graphprotocol/graph-ts";

export const ZERO = BigInt.fromI32(0);
export const ONE = BigInt.fromI32(1);

export function extractDisputeKitIDFromExtraData(extraData: Bytes): string {
const start = extraData.length - 32;
const littleEndian = extraData.subarray(start, extraData.length).reverse();
return BigInt.fromUnsignedBytes(Bytes.fromUint8Array(littleEndian)).toString();
}
36 changes: 36 additions & 0 deletions subgraph/core/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,42 @@ dataSources:
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
handler: handleCommitCast
file: ./src/DisputeKitClassic.ts
- kind: ethereum
name: DisputeKitShutter
network: arbitrum-sepolia
source:
address: "0x09F3d00B995186D76Af9AA8627D06351d0d9f950"
abi: DisputeKitShutter
startBlock: 148194178
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- ClassicDispute
- ClassicRound
- ClassicVote
- ClassicContribution
abis:
- name: DisputeKitShutter
file: ../../contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json
- name: KlerosCore
# FIX: temporarily point to abi with event addition
file: ./abi-migrations/KlerosCore.json
eventHandlers:
- event: DisputeCreation(indexed uint256,uint256,bytes)
handler: handleDisputeCreation
- event: Contribution(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleContributionEvent
- event: Withdrawal(indexed uint256,indexed uint256,uint256,indexed address,uint256)
handler: handleWithdrawal
- event: ChoiceFunded(indexed uint256,indexed uint256,indexed uint256)
handler: handleChoiceFunded
- event: VoteCast(indexed uint256,indexed address,uint256[],indexed uint256,string)
handler: handleVoteCast
- event: CommitCast(indexed uint256,indexed address,uint256[],bytes32)
handler: handleCommitCast
file: ./src/DisputeKitClassic.ts
- kind: ethereum
name: EvidenceModule
network: arbitrum-sepolia
Expand Down
2 changes: 1 addition & 1 deletion subgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kleros/kleros-v2-subgraph",
"version": "0.15.2",
"version": "0.16.0",
"drtVersion": "0.12.0",
"license": "MIT",
"scripts": {
Expand Down