Skip to content

Conversation

@jaybuidl
Copy link
Member

@jaybuidl jaybuidl commented Nov 5, 2025

PR-Codex overview

This PR focuses on significant updates to the Kleros smart contract system, including the removal of several JSON files, updates to dependencies, and enhancements in contract functionalities, particularly around the KlerosCoreUniversity and RNG systems.

Detailed summary

  • Deleted multiple JSON deployment files for contracts.
  • Updated @reality.eth/reality-eth-lib dependency from ^3.4.14 to ^3.4.15.
  • Changed optimizer runs from 1000 to 850 in hardhat.config.ts.
  • Modified author and reviewer annotations to custom format in several Solidity files.
  • Renamed governableAbi to ownableAbi in execution.ts and updated related function calls.
  • Added support for RNGWithFallback in various contract mappings and tests.
  • Enhanced KlerosCoreUniversity contract with new events and functions for dispute management.
  • Improved comments and error handling for clarity and functionality.
  • Adjusted various contract methods to ensure compatibility and correctness in dispute resolution.

The following files were skipped due to too many changes: contracts/deployments/arbitrumSepoliaDevnet/RNGWithFallback.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json, contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/SortitionModule.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json, contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/ChainlinkRNG.json, contracts/deployments/arbitrumSepoliaDevnet.ts, contracts/deployments/devnet.viem.ts, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features
    • Owner-based governance, expanded dispute/round settings, justification commitments, token support, RNG fallback and sortition integrations, and PolicyRegistry updates.
  • Bug Fixes
    • Added explicit errors, tightened access controls, and harmonized event/function signatures to improve compatibility.
  • Chores
    • Refreshed Arbitrum Sepolia deployment listings, updated proxy/implementation references, compiler/metadata refresh, and removed outdated deployment artifacts.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (18)
  • contracts/package.json
  • contracts/scripts/publish-devnet-prerelease.sh
  • kleros-app/package.json
  • kleros-sdk/package.json
  • package.json
  • subgraph/core-university/subgraph.template.yaml
  • subgraph/core/schema.graphql
  • subgraph/core/src/DisputeKitClassic.ts
  • subgraph/core/src/EvidenceModule.ts
  • subgraph/core/src/KlerosCore.ts
  • subgraph/core/src/entities/ClassicContribution.ts
  • subgraph/core/src/entities/JurorRewardPenalty.ts
  • subgraph/core/src/entities/Penalty.ts
  • subgraph/core/subgraph.template.yaml
  • subgraph/core/subgraph.yaml
  • subgraph/package.json
  • tsconfig/package.json
  • web-devtools/package.json
⛔ Files ignored due to path filters (2)
  • .yarn/versions/7fe4657f.yml is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Mass update of Arbitrum Sepolia devnet deployment artifacts: many JSON artifacts were removed or replaced and numerous ABIs, events, errors, addresses, and compiler/metadata were updated (notable surface changes: governor→owner renames, NextRoundSettings, dispute-kit API reshapes, proxy/implementation redeploys).

Changes

Cohort / File(s) Change Summary
DisputeKit family
contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json
Large artifact replacements: extensive ABI changes (new/renamed errors and events including NextRoundSettings), function signature reshapes (draw, hashVote, commit/vote flows, getNextRoundSettings), owner/governor renames, proxy/implementation addresses and compiler metadata updated.
Dispute Resolver artifacts
contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json (deleted), contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json
Deployment artifact deletions/replacements and ABI edits: owner/governor renames, DisputeRequest event parameter reduction, new errors, and updated deployment receipts/metadata.
Dispute Template Registry
contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json, .../DisputeTemplateRegistry_Implementation.json, .../DisputeTemplateRegistry_Proxy.json, .../DisputeTemplateRegistryUniversity.json, .../DisputeTemplateRegistryUniversity_Implementation.json, .../DisputeTemplateRegistryUniversity_Proxy.json
Artifacts updated/replaced: governance rename (changeGovernor→changeOwner, owner getter), implementation/proxy address swaps, new OwnerOnly error, and compiler/metadata refresh.
Evidence Module
contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json, .../EvidenceModule_Implementation.json (deleted), .../EvidenceModule_Proxy.json
Implementation artifact deleted; proxy/manifest updated: added OwnerOnly error, owner getter, event arg rename (_externalDisputeID_arbitratorDisputeID), implementation address and metadata updated.
KlerosCore & related
contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json, .../KlerosCoreRuler.json (deleted), .../KlerosCoreRuler_Proxy.json (deleted), .../KlerosCoreSnapshotProxy.json (deleted)
Artifacts removed/updated: many new/renamed errors and events, owner/guardian/governor renames, jurorNft/whitelist and jump/round helper APIs added, addresses and compiler metadata updated.
RNG / Example / Misc
contracts/deployments/arbitrumSepoliaDevnet/ArbitrableExample.json (deleted), .../BlockHashRNG.json (deleted), .../ChainlinkRNG.json (deleted)
Deleted deployment artifact files (full artifact removal).
README & tooling
contracts/README.md, .yarnrc.yml
README updated for Arbitrum Sepolia / V2 Devnet (removed legacy entries; added/updated PolicyRegistry, RNGWithFallback, SortitionModule, proxies/implementations). .yarnrc.yml updated yarnPath to yarn-4.10.3.

Sequence Diagram(s)

sequenceDiagram participant Deployer participant Proxy as UUPS Proxy participant Impl as Implementation participant Owner rect rgba(52,211,153,0.06) Deployer->>Proxy: deploy(proxy, implementation, initData) Proxy->>Impl: delegatecall initialize(initData) Impl-->>Proxy: initialized end rect rgba(59,130,246,0.06) Owner->>Proxy: executeOwnerProposal(destination, data) Proxy->>Impl: delegatecall executeOwnerProposal(...) alt DisputeKit flow Impl->>DisputeKit: getNextRoundSettings(coreDisputeID, courtIDs, ...) DisputeKit-->>Impl: NextRoundSettings tuple end end 
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Focus areas needing extra attention:
    • DisputeKit ABI changes (NextRoundSettings tuple, draw/hashVote/castCommit/castVote signatures) — verify ABI/consumer compatibility.
    • Owner/governor renames across artifacts and proxies — ensure access-control semantics match source changes.
    • Proxy initializer/execute calldata, implementation addresses, and matching compiled ABIs in proxy JSONs.
    • KlerosCore additions (jurorNft, arbitrable whitelist, new errors/events) and potential storage/layout mismatches.

Possibly related PRs

Suggested labels

Type: Maintenance :construction:, Package: Contracts

Suggested reviewers

  • unknownunknown1
  • alcercu

Poem

🐰 I hopped through artifacts with tiny feet,

Old JSON footprints cleared from every street.
Proxies re-pointed, ABIs tidied bright,
New deploys planted under moonlit night.
🥕 A rabbit cheers — everything now in sight!

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Devnet 2.0-rc Deployment' accurately describes the main objective of the changeset, which involves redeploying contracts to the Arbitrum Sepolia devnet environment with updated 2.0-rc versions.

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 5, 2025
@netlify
Copy link

netlify bot commented Nov 5, 2025

Deploy Preview for kleros-v2-neo ready!

Name Link
🔨 Latest commit a3c9f91
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-neo/deploys/690be5876518670008ed48a5
😎 Deploy Preview https://deploy-preview-2197--kleros-v2-neo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 5, 2025

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit a3c9f91
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet/deploys/690be58757dfa7000836e37b
😎 Deploy Preview https://deploy-preview-2197--kleros-v2-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 5, 2025

Deploy Preview for kleros-v2-testnet-devtools failed. Why did it fail? →

Name Link
🔨 Latest commit a3c9f91
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet-devtools/deploys/690be587dd7e9700085045be
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json (1)

46-69: Breaking change — DisputeRequest event now emits (arbitrator, arbitratorDisputeID, templateId); externalDisputeID and templateUri removed.

Multiple consumers still expect the old signature DisputeRequest(address,uint256,uint256,uint256,string) and will break — update or revert the ABI. Key affected locations:

  • subgraph/core/src/entities/Dispute.ts (uses the old signature and decodes _externalDisputeId/_templateUri)
  • web-devtools/src/utils/getDisputeRequestParamsFromTxn.ts (selector "DisputeRequest(address,uint256,uint256,uint256,string)")
  • web/src/utils/getDisputeRequestParamsFromTxn.ts (same selector)
  • kleros-sdk/src/utils/getDispute.ts and kleros-sdk/config/v2-disputetemplate/** (types expect externalDisputeID/templateUri)
  • contracts/test/evidence/index.ts (test unpacks templateUri)
  • contracts/scripts/disputeRelayerBot.ts (parses DisputeRequest for relaying)

Action: either restore the previous event shape in the contract ABI or update the listed consumers (subgraph, web/web‑devtools, SDK, tests, scripts) to the new 3‑argument event and reindex/redeploy as required.

🧹 Nitpick comments (4)
contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json (1)

134-138: Harden initializer against zero address.

Consider rejecting initialize(address(0)) to avoid a stuck implementation.

If acceptable, add a require(_owner != address(0)) in source before the next redeploy.

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json (1)

1633-1639: Deployment wiring: core points to KlerosCore proxy (0x9EfCaeF…).

Looks correct. Please add the tx hash for changeCore (if any) to the runbook for traceability.

Also applies to: 1624-1626

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json (1)

1018-1070: NextRoundSettings surfaced (event + getter) — update indexers/watchers.

ABI adds NextRoundSettingsChanged and a getNextRoundSettings view; subgraph currently does not index them.

  • Add a handler for NextRoundSettingsChanged and persist the NextRoundSettings tuple (subgraph/core/src/DisputeKitClassic.ts).
  • If you want to record the computed jump/settings, call getNextRoundSettings from your handler or indexing logic and update generated contract types/Graph schema. (See contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json — NextRoundSettingsChanged ≈ line 318; getNextRoundSettings ≈ line 1018.)
contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json (1)

1342-1364: Function pair hashJustification and hashVote differ in signature and stateability.

hashJustification (line 1342) is declared pure, taking _salt and _justification only. hashVote (line 1366) is declared view, taking _choice, _salt, and _justification (though no state is read, the view modifier is conservative). Verify this discrepancy is intentional; if hashVote does not read state, consider changing it to pure for consistency and gas efficiency.

Also applies to: 1366-1393

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 643d561 and 33f84ad.

📒 Files selected for processing (16)
  • contracts/README.md (1 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json (20 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json (22 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json (23 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json (23 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json (10 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json (5 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json (7 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json (7 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json (26 hunks)
✅ Files skipped from review due to trivial changes (1)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-09-04T23:36:16.415Z
Learnt from: jaybuidl Repo: kleros/kleros-v2 PR: 2126 File: contracts/src/arbitration/KlerosCore.sol:472-489 Timestamp: 2025-09-04T23:36:16.415Z Learning: In this repo, KlerosCore emits AcceptedFeeToken and NewCurrencyRate events that are declared in contracts/src/arbitration/interfaces/IArbitratorV2.sol; implementations don’t need to redeclare these events. 

Applied to files:

  • contracts/README.md
  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json
📚 Learning: 2024-10-21T10:32:16.970Z
Learnt from: Harman-singh-waraich Repo: kleros/kleros-v2 PR: 1703 File: kleros-sdk/src/utils/getDispute.ts:38-40 Timestamp: 2024-10-21T10:32:16.970Z Learning: The variables 'arbitrableChainID' and 'externalDisputeID' are required by the context to have uppercase 'ID', so they should remain unchanged even if the corresponding source properties use 'Id'. 

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json
📚 Learning: 2024-11-19T16:31:08.965Z
Learnt from: jaybuidl Repo: kleros/kleros-v2 PR: 1746 File: contracts/config/courts.v2.mainnet-neo.json:167-170 Timestamp: 2024-11-19T16:31:08.965Z Learning: In the court hierarchy, child courts' `minStake` must be greater than or equal to their parent court's `minStake`. 

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
📚 Learning: 2024-11-19T16:09:41.467Z
Learnt from: jaybuidl Repo: kleros/kleros-v2 PR: 1746 File: contracts/config/courts.v2.mainnet-neo.json:3-17 Timestamp: 2024-11-19T16:09:41.467Z Learning: In `contracts/config/courts.v2.mainnet-neo.json`, the General Court (ID: 1) can have its `parent` ID set to itself (`"parent": 1`), as there is no parent court with ID 0 currently. 

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
📚 Learning: 2024-11-19T17:18:39.007Z
Learnt from: jaybuidl Repo: kleros/kleros-v2 PR: 1746 File: contracts/config/courts.v2.mainnet-neo.json:3-5 Timestamp: 2024-11-19T17:18:39.007Z Learning: In `contracts/config/courts.v2.mainnet-neo.json`, the General Court (id: 1) intentionally references itself as its parent (`"parent": 1`). This self-reference is acceptable and should not be flagged as an issue in future reviews. 

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json
📚 Learning: 2025-01-22T00:55:35.842Z
Learnt from: jaybuidl Repo: kleros/kleros-v2 PR: 1805 File: contracts/src/proxy/UUPSProxiable.sol:127-129 Timestamp: 2025-01-22T00:55:35.842Z Learning: In Solidity, a public state variable automatically implements a corresponding external view function with the same name. For example, `string public constant override version = "0.8.0"` implements the abstract `function version() external view returns (string memory)`. 

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json
📚 Learning: 2025-09-09T13:33:46.896Z
Learnt from: tractorss Repo: kleros/kleros-v2 PR: 2117 File: web/src/components/DisputeFeatures/Features/GatedErc1155.tsx:51-66 Timestamp: 2025-09-09T13:33:46.896Z Learning: The `setDisputeData` function in `NewDisputeContext` at `web/src/context/NewDisputeContext.tsx` has signature `(disputeData: IDisputeData) => void` and only accepts direct state values, not functional updates like standard React state setters. It cannot be used with the pattern `setDisputeData((prev) => ...)`. 

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json
🔇 Additional comments (33)
contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json (1)

2-2: Deployment artifact updates look consistent and properly formatted.

The proxy address, transaction metadata, initialization arguments, and compiler settings have been updated coherently for the redeployment. Spot-checking: the implementation address in args[0] (0xEBd4a08A1f02F0661637CA7D1a920F52A52B3487) will need to match the corresponding implementation artifact referenced in related deployment files.

Also applies to: 29-29, 59-61, 63-63

contracts/README.md (1)

81-81: README devnet deployment addresses successfully updated and cross-verified.

Spot-checked devnet addresses against their corresponding JSON deployment artifacts:

  • Line 90 EvidenceModule proxy: 0x8AAF07ac05E81c92C6FD369aaEdE159E9893508d matches EvidenceModule_Proxy.json ✓
  • Line 87 DisputeKitShutter proxy: 0xD143b4FcdCf5699983fF9Ad7e38DE80Aa7Eb9Ce7 matches DisputeKitShutter_Proxy.json ✓
  • Line 86 DisputeKitGatedShutter proxy: 0x476EE17A32363aec1D32DB49ab701E70Ec56a8e6 matches DisputeKitGatedShutter_Proxy.json ✓
  • Line 89 DisputeTemplateRegistry proxy: 0xa28cA6364B40537B3e73c395cc2B1Bb6de1F1161 matches DisputeTemplateRegistry_Proxy.json ✓

Also applies to: 84-91, 96-98

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json (1)

2-2: Deployment artifact properly updated with consistent metadata and initialization parameters.

Address, transaction data, compiler version (0.8.30), EVM target (Cancun), and optimizer settings (850 runs with viaIR) align with the broader devnet 2.0-rc deployment pattern observed across other proxy artifacts.

Also applies to: 29-29, 59-60, 63-63

contracts/deployments/arbitrumSepoliaDevnet/EvidenceModule.json (1)

38-42: Governance model migration (governor → owner) properly reflected in updated ABI and deployment artifacts.

Evidence of consistent API changes across EvidenceModule.json and related contracts:

  • New OwnerOnly() error added (line 38-42) ✓
  • initialize(address _owner) parameter renamed from _governor (line 114) ✓
  • New owner() view function added (lines 125-135) ✓
  • Event parameter renamed: _arbitratorDisputeID replacing _externalDisputeID (line 65) ✓
  • Implementation address correctly updated (line 259) ✓

Compiler metadata updated to 0.8.30, Cancun EVM, optimizer 850 runs, viaIR enabled—consistent across all devnet 2.0-rc artifacts.

Also applies to: 65-65, 114-114, 125-125, 144-154

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json (1)

2-2: Deployment artifact updated consistently with devnet 2.0-rc redeployment pattern.

Address (0x648943Cf73b7fa053942Af576C8327fcEfD314d8), compiler settings (0.8.30, Cancun, 850 runs, viaIR), and transaction metadata align with other proxy artifacts in this devnet redeployment cycle.

Also applies to: 29-29, 59-60, 63-63

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json (1)

2-2: Deployment artifact updated with consistent redeployment metadata.

Address (0x476EE17A32363aec1D32DB49ab701E70Ec56a8e6), compiler, and initialization arguments properly updated. Metadata reflects 0.8.30 compiler, Cancun EVM, and 850 optimizer runs consistent across the redeployment.

Also applies to: 29-29, 59-60, 63-63

contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json (1)

2-2: Proxy artifact properly updated with new address and consistent metadata.

Address (0xa28cA6364B40537B3e73c395cc2B1Bb6de1F1161) and implementation reference (0xbD51dae8044B8d418c9F86F601Ec48EABb322e7D) align with DisputeTemplateRegistry.json's updated deployment state. Compiler settings consistent with the broader devnet redeployment (0.8.30, Cancun, 850 runs, viaIR).

Also applies to: 29-29, 59-60, 63-63

contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json (1)

38-42: Governance model migration (governor → owner) consistently applied across DisputeTemplateRegistry contract.

ABI changes align with the pattern established in EvidenceModule.json:

  • New OwnerOnly() error added (line 38-42) ✓
  • New changeOwner(address _owner) function added (line 124) ✓
  • New owner() view function added (lines 144-154) ✓
  • initialize(address _owner) parameter properly renamed (line 133) ✓
  • Implementation address updated to 0xbD51dae8044B8d418c9F86F601Ec48EABb322e7D (line 288) ✓

Compiler metadata updates (0.8.30, Cancun EVM, 850 optimizer runs, viaIR enabled) consistent across all devnet 2.0-rc deployment artifacts.

Also applies to: 120-120, 124-127, 144-154

contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json (4)

165-193: Open template registration: confirm intent.

setDisputeTemplate is permissionless. If this registry should be curated, gate with onlyByOwner; otherwise, confirm indexers/frontends expect arbitrary submissions.


154-164: proxiableUUID guard looks correct.

UUPS proxiableUUID is present and (per library) reverts via delegatecall to avoid self-delegation bricking. LGTM.


271-273: No storage corruption risk — storage layout is compatible across upgrades.

The verification confirms that the current storage layout is safe. Prior implementations used governor at slot 0 (address type) and templates at slot 1 (uint256 type). The current implementation renamed the variable to owner but preserved the same slots and types, ensuring full compatibility with previous deployments during UUPS upgrades.


114-125: No downstream updates required; governance changes are local implementation details.

The review comment incorrectly assumes this change affects callers. Verification shows:

  • IDisputeTemplateRegistry interface only exposes setDisputeTemplate(), not governance functions.
  • DisputeResolver and ArbitrableExample only interact with the interface, calling setDisputeTemplate() only (no governance invocations).
  • The ABI's changeOwner and initialize are implementation details; the interface contract remains unchanged.

Since no production contract calls governance functions on DisputeTemplateRegistry, the rename is scoped to the implementation. SDKs and deployment scripts that depend on the interface are unaffected.

Likely an incorrect or invalid review comment.

contracts/deployments/arbitrumSepoliaDevnet/DisputeResolver.json (2)

248-264: Rule path validation is sound.

Access restricted to arbitrator, bounds checked (0 allowed as “refuse to decide”), prevents double ruling. LGTM.


295-301: Constructor wiring appears correct; proxy address verified.

The deployed templateRegistry address 0xa28cA6364B40537B3e73c395cc2B1Bb6de1F1161 in DisputeResolver.json is confirmed to be an active UUPS proxy (not an implementation). The proxy correctly delegates to implementation 0xbD51dae8044B8d418c9F86F601Ec48EABb322e7D and uses proper ERC-1967 storage patterns. Verify frontend configuration separately to ensure this proxy address is also referenced in UI settings.

contracts/deployments/arbitrumSepoliaDevnet/KlerosCore.json (5)

1768-1834: Initializer args: jurorNft is configurable but set to zero.

ABI exposes jurorNft()/changeJurorNft(). If juror NFTs are required in Devnet 2.0‑rc, add a follow‑up tx to set it; otherwise document that it’s intentionally unset.

Also applies to: 2185-2209


83-86: Guardian surface is properly implemented with intentional access hierarchy.

The admin-only flows are guarded as designed:

  • pause(): allows guardian or owner (via onlyByGuardianOrOwner)
  • unpause(): owner-only by design (per comment: "Can only be done by owner")
  • upgrades: owner-only via _authorizeUpgrade() override (line 373)
  • executeOwnerProposal(): owner-only (line 393)
  • currency rates: owner-only (lines 568, 577)
  • guardian rotation: owner-only via changeGuardian() (line 406)

The GuardianOrOwnerOnly error is properly defined at line 1421 and used in the onlyByGuardianOrOwner modifier. The design gives guardian minimal authority (pause only) while owner retains control of upgrades, currency rates, proposals, and guardian rotation itself.

Ops runbooks for guardian address rotation cannot be verified from code review.


27-31: No action required; the arbitrable whitelist gate is disabled by default.

The arbitrableWhitelistEnabled state variable defaults to false in Solidity, so existing arbitrables are not blocked by the new gate unless it's explicitly enabled by the owner. The gate only enforces the whitelist check when both arbitrableWhitelistEnabled is true AND the caller is not whitelisted. The arbitrumSepoliaDevnet deployment correctly relies on this safe default, and the mainnet deployment shows proper post-deployment setup when the whitelist is explicitly enabled. No existing arbitrables will be broken by this change.

Likely an incorrect or invalid review comment.


1531-1568: Update consumers: Round tuple changed + new getCourtAndDisputeKitJumps.

ABI now adds getCourtAndDisputeKitJumps and extends Round with drawnJurorFromCourtIDs (uint96[]) and uint256[10] __gap — regenerate ABI bindings / TheGraph codegen and update any decoders that call getRoundInfo (notably subgraph/core/src/{KlerosCore.ts, DisputeKitClassic.ts, entities/Round.ts}, contracts/scripts/{keeperBot.ts, console-init.ts}, contracts/test/{integration/index.ts, arbitration/draw.ts}, and any SDK/typechain clients) so they decode the new tuple shape correctly.


108-118: No changes required — court minStake invariant is properly enforced and validated.

Validation confirms:

  • All three v2 court configuration files (devnet, mainnet, testnet) comply with the parent ≤ child minStake invariant
  • The MinStakeHigherThanChildCourt error is correctly defined in the ABI
  • The smart contract enforces this invariant in changeCourtParameters() by iterating child courts and reverting if any child has a lower minStake
contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json (4)

672-716: Verified: Access control and event emission already implemented.

The review comment's concerns have been confirmed as properly addressed:

The changeNextRoundSettings function includes the onlyByOwner modifier, confirming owner-only access control is enforced. Additionally, the NextRoundSettingsChanged event is defined and properly emitted within the function with the required parameters for indexer tracking.

No changes are needed.


226-236: The web search didn't return relevant results. Let me examine the actual code more carefully using the retrieved learning context and my prior findings.

Based on my comprehensive verification:

  1. Current Solidity Implementation (DisputeKitGatedShutter.sol lines ~137-145):

    • Function: castCommitShutter(uint256, uint256[], bytes32, bytes32, bytes)
    • Parameters: _coreDisputeID, _voteIDs, _commit, _identity, _encryptedVote
    • Event: CommitCastShutter(_coreDisputeID, msg.sender, _commit, _identity, _encryptedVote)
  2. Deployment JSON (arbitrumSepoliaDevnet/DisputeKitShutter.json lines 226-236):

    • Shows different parameter names: _choiceCommit and _justificationCommit
    • This does NOT match the current Solidity implementation
  3. Keeper Bot Usage (keeperBotShutter.ts line 220):

    • Filters CommitCastShutter events with current event signature
    • Already handles the correct parameters
  4. Review Comment Claims:

    • States "CommitCastShutter now uses _choiceCommit and adds _justificationCommit"
    • This claim is incorrect based on actual Solidity code

Conclusion: The review comment contains an inaccurate statement about the API changes. The actual implementation has a single _commit parameter plus _identity and _encryptedVote, not separate _choiceCommit and _justificationCommit. The JSON file may be outdated or from a different contract version. The keeper bot is already correctly using the current API.

Shutter commit API is correctly implemented. The review comment's specific claim about parameter names is incorrect and should be disregarded. No client updates are needed beyond what's already in the codebase.

Likely an incorrect or invalid review comment.


1313-1335: hashJustification helper is defined in ABI but not integrated into test suite.

Investigation reveals:

  • justificationCommitments() is properly used in tests (lines 352, 385) to store/retrieve commitments
  • However, hashJustification is defined in the ABI but never called in the codebase
  • Tests manually compute hashing logic instead: ethers.keccak256(ethers.toUtf8Bytes(justification)) followed by salt encoding
  • No frontend code exists in this repository to verify the stated concern about frontend consistency

The main verification concern—"ensure frontends use hashJustification consistently with castVoteShutter"—cannot be validated within this codebase as frontend implementations are not present. Additionally, the test suite appears to bypass the helper function with inline hashing. Clarify whether tests should refactor to use hashJustification, or if this helper is intended only for external off-chain use.


912-944: Decoders/hooks appear auto-generated from ABIs; verify codegen was run.

The draw() function signature changes are complete and consistent across all contracts. However, the review comment references updating "decoders," which likely refers to auto-generated wagmi/viem hooks. The generated hooks directory isn't present in the repository filesystem, suggesting these are build artifacts.

Verify that contract codegen/hook generation has been executed after the ABI changes, as the generated code is not stored in the repository and won't reflect the updated signature until regenerated.

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json (3)

839-843: Verify migration completeness for Governor→Owner function names.

The migration is incomplete. While new changeOwner and executeOwnerProposal functions are present in DKClassic deployments and Solidity source code, old changeGovernor and executeGovernorProposal functions persist in multiple deployment files including arbitrumSepoliaDevnet.ts. The same file contains both old and new function names (e.g., changeGovernor at lines 631, 3007, 3540 and changeOwner at new lines), indicating an inconsistent state. Verify whether this is intentional dual-support or incomplete migration cleanup.


1456-1461: Verify post-deploy core initialization and clarify changeNextRoundSettings reference.

The changeCore function exists in DisputeKitClassicBase with proper access control (onlyByGovernor), confirming the mechanism is in place. However, this review cannot confirm from codebase inspection alone whether the post-deploy transaction that sets core via changeCore() was actually executed for the arbitrumSepoliaDevnet deployment.

Additionally, the mention of "changeNextRoundSettings" in the original comment could not be verified—no such function appears in the current codebase. If this refers to a different mechanism or renamed function, clarification is needed.

Action items:

  • Manually verify the deployment logs/scripts to confirm changeCore() was called post-deployment with the correct core address.
  • Clarify or remove the reference to changeNextRoundSettings if it doesn't apply to current code.
  • Confirm whether core=0x0 in the JSON is expected (pre-wiring state) or indicates incomplete deployment.

788-820: All draw() signature changes verified and correctly implemented across callers.

All dispute kit callers have been updated:

  • KlerosCore.sol (line 758): Calls disputeKit.draw(_disputeID, startIndex + i++, round.nbVotes) and correctly destructures both return values
  • KlerosCoreUniversity.sol (line 605): Calls with new 3-param signature and dual return destructuring
  • DisputeKitGatedArgentinaConsumerProtection.sol (line 95): Calls super.draw() with all three parameters and returns both values

No callers using the old 2-parameter signature remain.

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGated.json (4)

2-2: Contract address alignment is correct.

The root address (line 2), receipt contractAddress (line 1469), and implementation address (line 1511) are appropriately distinct and consistently referenced throughout the artifact.

Also applies to: 1469-1469, 1511-1511


1250-1250: Initialize parameter naming change: governor → owner.

Line 1250 reflects a governance model shift from _governor to _owner. The execute section (lines 1503–1510) provides three address arguments matching the updated function signature: owner, core, and wNative. This is a breaking interface change; verify that all callers of this contract's initialize function are aware of the renamed parameter.

Also applies to: 1503-1510


286-331: New event NextRoundSettingsChanged introduced with struct fields.

Line 329 introduces a new event with an embedded NextRoundSettings struct (lines 296–327). This aligns with new functions changeNextRoundSettings (line 599) and getNextRoundSettings (line 1079). Ensure that off-chain indexing and monitoring are aware of this new event structure.


660-689: Output naming and structure updates in dispute query functions.

Lines 660–666 and 684–689 update return value naming for coreDisputeIDToActive and coreDisputeIDToLocal. This is a breaking change for callers relying on positional returns; named outputs should make this clearer in type-safe environments but may require upstream updates.

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json (3)

2-2: Contract address alignment is correct.

The root address (line 2), receipt contractAddress (line 1646), and implementation address (line 1688) are appropriately distinct and consistently referenced.

Also applies to: 1646-1646, 1688-1688


221-263: Shutter-variant events and hashing functions introduce encryption-aware structures.

Lines 221–263 introduce CommitCastShutter event with separate _choiceCommit and _justificationCommit fields. The new hashJustification function (lines 1342–1364) is a pure hash function taking salt + justification (no choice), distinct from hashVote (lines 1366–1393) which includes the choice. Verify that client implementations using these functions for vote/justification separation are aware of this dual-commit structure.

Also applies to: 1342-1364


1466-1493: New state accessor justificationCommitments breaks encapsulation if not already present.

This new function (lines 1466–1493) exposes a mapping of justification commitments keyed by (localDisputeID, localRoundID, voteID). If this is a new addition, verify that clients querying this state are aware of its availability and structure.

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 5, 2025
@jaybuidl jaybuidl force-pushed the chore/devnet-redeploy-2.0rc branch from 6528829 to a3c9f91 Compare November 6, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants