Skip to content

chore: testnet upgrade and new Dispute Kits deployment #2058

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
merged 2 commits into from
Jul 28, 2025

Conversation

jaybuidl
Copy link
Member

@jaybuidl jaybuidl commented Jul 28, 2025

PR-Codex overview

This PR focuses on updating the README.md file with new contract addresses and enhancing the deployment JSON files for various proxy contracts, specifically related to DisputeKit and KlerosCore.

Detailed summary

  • Updated README.md with new implementation addresses for:
    • DisputeKitClassic
    • DisputeKitGated
    • DisputeKitGatedShutter
    • DisputeKitShutter
    • KlerosCore
  • Added deployment JSON files for:
    • DisputeKitGated
    • DisputeKitShutter
    • DisputeKitGatedShutter
  • Enhanced DisputeKitClassic.json with new functions and updated metadata.

The following files were skipped due to too many changes: contracts/deployments/arbitrumSepolia/DisputeKitClassic.json, contracts/deployments/arbitrumSepolia/KlerosCore.json, contracts/deployments/arbitrumSepolia/SortitionModule.json, contracts/deployments/arbitrumSepolia/DisputeKitGated.json, contracts/deployments/arbitrumSepolia/DisputeKitShutter.json, contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json, contracts/deployments/arbitrumSepolia.ts, contracts/deployments/testnet.viem.ts, contracts/deployments/arbitrumSepolia/DisputeKitGated_Implementation.json, contracts/deployments/arbitrumSepolia/DisputeKitShutter_Implementation.json, contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Implementation.json, contracts/deployments/arbitrumSepolia/SortitionModule_Implementation.json, contracts/deployments/arbitrumSepolia/DisputeKitClassic_Implementation.json, contracts/deployments/arbitrumSepolia/KlerosCore_Implementation.json

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

Summary by CodeRabbit

  • New Features

    • Added new DisputeKit variants (DisputeKitGated, DisputeKitGatedShutter, DisputeKitShutter) on Arbitrum Sepolia, each with proxy and implementation contracts.
    • Introduced new view and utility functions for dispute and voting management in DisputeKitClassic and SortitionModule.
    • Added new functions for handling leftover PNK tokens in SortitionModule.
    • Added new functions in KlerosCore for stake transfer and juror draw tracking.
  • Improvements

    • Enhanced dispute and round information retrieval across dispute kits.
    • Updated event names and parameters in SortitionModule for clarity.
    • Renamed and version-bumped initialization functions for better contract lifecycle management.
  • Bug Fixes

    • Standardized function and event parameter naming across contracts.
  • Documentation

    • Updated README with new and updated contract addresses on Arbitrum Sepolia.

Copy link

netlify bot commented Jul 28, 2025

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit c1ebbb1
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet/deploys/68879dd3867e2a0008004429
😎 Deploy Preview https://deploy-preview-2058--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.

Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

This update revises deployment artifacts and the README for contracts on the Arbitrum Sepolia testnet. It updates implementation addresses for several existing contracts, introduces new deployment artifacts and proxies for DisputeKitGated, DisputeKitGatedShutter, and DisputeKitShutter, and reflects ABI and function signature changes for KlerosCore, DisputeKitClassic, and SortitionModule.

Changes

Cohort / File(s) Change Summary
README and Address Updates
contracts/README.md
Updated deployed contract addresses for DisputeKitClassic, KlerosCore, SortitionModule; added new entries for DisputeKitGated, DisputeKitGatedShutter, and DisputeKitShutter.
DisputeKitClassic Deployment
contracts/deployments/arbitrumSepolia/DisputeKitClassic.json
ABI extended with new view and pure functions; initialize function version bumped; new implementation address and compiler version.
DisputeKitGated Deployments
contracts/deployments/arbitrumSepolia/DisputeKitGated.json,
contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json
Added deployment artifacts for DisputeKitGated and its UUPS proxy, including ABI, events, errors, and initialization logic.
DisputeKitGatedShutter Deployments
contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json,
contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json
Added deployment artifacts for DisputeKitGatedShutter and its UUPS proxy, with full ABI and proxy logic.
DisputeKitShutter Deployments
contracts/deployments/arbitrumSepolia/DisputeKitShutter.json,
contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json
Added deployment artifacts for DisputeKitShutter and its UUPS proxy, including ABI, events, errors, and initialization.
KlerosCore Deployment
contracts/deployments/arbitrumSepolia/KlerosCore.json
Updated ABI: function signature changes, new function, initialize version bump, new implementation address, and updated compiler version.
SortitionModule Deployment
contracts/deployments/arbitrumSepolia/SortitionModule.json
ABI changes: event renames and signature changes, new functions for leftover PNK, function signature adjustments, and initialize version bump; new implementation address and compiler version.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Proxy
    participant Implementation

    User->>Proxy: Call function (e.g., createDispute)
    Proxy->>Implementation: delegatecall(function, args)
    Implementation-->>Proxy: Return result
    Proxy-->>User: Return result

    Note over Proxy,Implementation: Applies to DisputeKitGated, DisputeKitGatedShutter, DisputeKitShutter proxies
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

Package: Contracts

Poem

In Sepolia’s fields, new proxies bloom,
Dispute kits gather, dispelling the gloom.
Gated and shuttered, their logic refined,
While classic and core are newly aligned.
Rabbits rejoice—deployments anew,
With bytes and ABIs, the contracts grew!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac946a8 and c1ebbb1.

📒 Files selected for processing (10)
  • contracts/README.md (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitClassic.json (5 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGated.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitShutter.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/KlerosCore.json (4 hunks)
  • contracts/deployments/arbitrumSepolia/SortitionModule.json (11 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • contracts/README.md
  • contracts/deployments/arbitrumSepolia/KlerosCore.json
  • contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json
  • contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json
  • contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json
  • contracts/deployments/arbitrumSepolia/DisputeKitClassic.json
  • contracts/deployments/arbitrumSepolia/DisputeKitShutter.json
  • contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json
  • contracts/deployments/arbitrumSepolia/DisputeKitGated.json
🧰 Additional context used
🧠 Learnings (1)
contracts/deployments/arbitrumSepolia/SortitionModule.json (3)

Learnt from: jaybuidl
PR: #1746
File: contracts/config/courts.v2.mainnet-neo.json:167-170
Timestamp: 2024-11-19T16:31:08.965Z
Learning: In contracts/config/courts.v2.mainnet-neo.json, the minStake parameter is denominated in PNK, not ETH.

Learnt from: jaybuidl
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.

Learnt from: jaybuidl
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.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: contracts-testing
🔇 Additional comments (7)
contracts/deployments/arbitrumSepolia/SortitionModule.json (7)

68-85: Event parameter naming is inconsistent across new events

LeftoverPNK uses _account to designate the juror address, whereas the new StakeDelayed event (see lines 128-141) keeps the older _address identifier. Mixing _account / _address for the same semantic concept complicates client-side log decoding and analytics.

Diff to align the names (preferred: _account, used in most new events):

-        {
-          "indexed": true,
-          "internalType": "address",
-          "name": "_address",
+        {
+          "indexed": true,
+          "internalType": "address",
+          "name": "_account",

[ suggest_nitpick ]


491-509: Missing view qualifier on pure read helper

getJurorLeftoverPNK only returns a cached value yet is marked nonpayable → callers must send a transaction and pay gas. This prevents free off-chain calls through eth_call, defeating the purpose of the helper.

-      "stateMutability": "nonpayable",
+      "stateMutability": "view",

Please cross-check the implementation; if no state is mutated, switch to view.
[ raise_critical_issue ]


562-566: Bump in initializer requires explicit upgrade path documentation

initialize4() supersedes the previous initialize3(). Anyone scripting upgrades must pass the new selector or the proxy will remain un-initialized, effectively bricking the module. Add an entry in the README / migration scripts describing:

  1. Exactly when initialize4() must be called.
  2. Required governance role that can invoke it.

[ request_verification ]


725-738: Changed return values in penalizeStake are breaking

penalizeStake now returns (pnkBalance, availablePenalty). Down-stream contracts / bots that decode the old zero-return signature will revert. Ensure:

  • Core contract expectations are upgraded in the same deployment batch.
  • Off-chain services (subgraphs, monitoring) redeploy with the new ABI.

[ request_verification ]


858-881: setStake no longer carries _alreadyTransferred – double-spend guard?

The boolean previously prevented re-processing of a delayed stake once tokens were transferred. With its removal, the same protection must be enforced elsewhere (validateStake?) or re-entrancy via repeated calls could drain PNK.

Please confirm the new flow and add a short comment in the Solidity source explaining where the guard now lives.

[ raise_critical_issue ]


967-1005: validateStake marked nonpayable but looks like a pure validator

If this function only computes deltas and emits no state change, it should be view to allow light-client dry-runs. Re-compile the implementation and update the ABI accordingly.

[ suggest_essential_refactor ]


1082-1086: Mismatch between pragma and compiler version

Source pragma is ^0.8.24, compiler recorded 0.8.28. That’s acceptable semver-wise, but hard-pinning exact 0.8.28 in Hardhat/Foundry configs avoids non-deterministic byte-code in repeat builds.

[ suggest_optional_refactor ]

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/testnet-upgrade-jul2025

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Jul 28, 2025

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

Name Link
🔨 Latest commit c1ebbb1
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-university/deploys/68879dd3d4f2a1000852a012

Copy link

netlify bot commented Jul 28, 2025

Deploy Preview for kleros-v2-testnet-devtools ready!

Name Link
🔨 Latest commit c1ebbb1
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet-devtools/deploys/68879dd3b0a0760008b9ffa2
😎 Deploy Preview https://deploy-preview-2058--kleros-v2-testnet-devtools.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.

Copy link

netlify bot commented Jul 28, 2025

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

Name Link
🔨 Latest commit c1ebbb1
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-neo/deploys/68879dd369c7110008c44f8f

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: 3

🔭 Outside diff range comments (1)
contracts/deployments/arbitrumSepolia/KlerosCore.json (1)

1839-1843: Signature of setStakeBySortitionModule changed

The boolean _alreadyTransferred parameter was removed.
Make sure SortitionModule has been updated accordingly; otherwise the call will revert.

Consider bumping interface version constants to catch mismatches at compile time.

🧹 Nitpick comments (7)
contracts/deployments/arbitrumSepolia/KlerosCore.json (2)

1857-1874: New privileged transfer hook – security review recommended

transferBySortitionModule(address _account, uint256 _amount) allows the sortition module to pull arbitrary PNK from the core.

• Confirm access control (SortitionModuleOnly) is applied in implementation.
• Double-check re-entrancy protection inside SortitionModule when it calls this.
• Unit tests covering malicious SortitionModule address replacement are desirable.


2006-2014: Deployment metadata bump – be explicit in changelog

numDeployments incremented to 4 and execute.methodName switched to initialize5.
Record this in release notes; consumers relying on deployment counters (e.g., CI scripts that diff artifacts) may need an update.

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

1058-1072: Multiple initializer variants (initialize vs initialize8) may create operational ambiguity

The ABI exposes both initialize() and initialize8() entry points. Having two public initializers makes it easy to invoke the wrong one during future upgrades and increases the surface area for configuration mistakes.

Consider removing legacy initializers once the proxy is live, or gate the newer one behind an onlyInitializing / version-guarded modifier exactly as OpenZeppelin’s reinitializer(uint8) pattern does.

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

964-969: Initializer naming drift (initialize7) diverges from other kits

This proxy is deployed with initialize7() while other newly-deployed kits still use plain initialize().
The inconsistency invites operator error when upgrading or scripting deployments.

Unify the versioned-initializer strategy across all dispute-kit implementations, or clearly document the reason for the deviation.

contracts/deployments/arbitrumSepolia/DisputeKitGated.json (1)

992-999: Deployment still calls initialize() although initialize7() exists

Unlike DisputeKitClassic, this kit was deployed via initialize(), yet it also exposes initialize7().
Mixing version numbers across deployments complicates automated upgrade scripts and off-chain tooling.

Align the initializer invoked at deployment with the intended versioned entry point, or drop the unused one.

contracts/deployments/arbitrumSepolia/SortitionModule.json (2)

70-84: Update downstream indexers & UIs for new LeftoverPNK event

The renamed LeftoverPNK(+ LeftoverPNKWithdrawn) events add an indexed _account param.
Please make sure sub-graphs, analytics dashboards, and any UI components listening for the previous StakeDelayedAlreadyTransferredDeposited/…Withdrawn events are migrated, otherwise they’ll silently stop updating.


968-1005: validateStake is write-mutable, not view

validateStake only reads & returns calculations yet is marked nonpayable (state-changing).
Consider declaring it view to prevent unnecessary gas-cost suspicion and to allow static-call usage.

-      "stateMutability": "nonpayable",
+      "stateMutability": "view",
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 026fe83 and ac946a8.

📒 Files selected for processing (10)
  • contracts/README.md (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitClassic.json (5 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGated.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitGated_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitShutter.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepolia/KlerosCore.json (4 hunks)
  • contracts/deployments/arbitrumSepolia/SortitionModule.json (11 hunks)
🧰 Additional context used
🧠 Learnings (4)
contracts/README.md (1)

Learnt from: Harman-singh-waraich
PR: #1846
File: prettier-config/index.js:26-26
Timestamp: 2025-01-23T08:14:47.397Z
Learning: The prettier-plugin-solidity plugin is installed in the kleros-v2 repository, even though it's not visible in the sandbox environment's node_modules (which is expected as node_modules is not committed to the repository).

contracts/deployments/arbitrumSepolia/DisputeKitClassic.json (4)

Learnt from: Harman-singh-waraich
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'.

Learnt from: kemuru
PR: #1702
File: web/src/pages/Home/TopJurors/JurorCard/index.tsx:10-11
Timestamp: 2024-10-07T06:18:23.427Z
Learning: In the kleros-v2 codebase, the property totalResolvedDisputes should remain and should not be renamed to totalResolvedVotes.

Learnt from: kemuru
PR: #1702
File: web/src/pages/Home/TopJurors/JurorCard/index.tsx:10-11
Timestamp: 2024-10-08T16:23:56.291Z
Learning: In the kleros-v2 codebase, the property totalResolvedDisputes should remain and should not be renamed to totalResolvedVotes.

Learnt from: Harman-singh-waraich
PR: #1703
File: web/src/hooks/queries/usePopulatedDisputeData.ts:58-61
Timestamp: 2024-10-14T13:58:25.708Z
Learning: In web/src/hooks/queries/usePopulatedDisputeData.ts, the query and subsequent logic only execute when disputeData.dispute?.arbitrableChainId and disputeData.dispute?.externalDisputeId are defined, so initialContext properties based on these values are safe to use without additional null checks.

contracts/deployments/arbitrumSepolia/KlerosCore.json (1)

Learnt from: jaybuidl
PR: #1746
File: contracts/config/courts.v2.mainnet-neo.json:167-170
Timestamp: 2024-11-19T16:31:08.965Z
Learning: In contracts/config/courts.v2.mainnet-neo.json, the minStake parameter is denominated in PNK, not ETH.

contracts/deployments/arbitrumSepolia/SortitionModule.json (3)

Learnt from: jaybuidl
PR: #1746
File: contracts/config/courts.v2.mainnet-neo.json:167-170
Timestamp: 2024-11-19T16:31:08.965Z
Learning: In contracts/config/courts.v2.mainnet-neo.json, the minStake parameter is denominated in PNK, not ETH.

Learnt from: jaybuidl
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.

Learnt from: jaybuidl
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.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Redirect rules - kleros-v2-testnet-devtools
  • GitHub Check: Header rules - kleros-v2-testnet-devtools
  • GitHub Check: Redirect rules - kleros-v2-university
  • GitHub Check: Pages changed - kleros-v2-testnet-devtools
  • GitHub Check: Header rules - kleros-v2-university
  • GitHub Check: Pages changed - kleros-v2-university
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: contracts-testing
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (9)
contracts/deployments/arbitrumSepolia/DisputeKitShutter_Proxy.json (1)

58-61: Proxy→implementation wiring verified

  • contracts/README.md correctly references the implementation address 0x97a1DAAc5aF27383B2c2AB57d8974664A7fe4352 under Arbitrum Sepolia.
  • Hardhat is configured to compile with Solidity 0.8.28, and the contract’s pragma (^0.8.24) is within that range, so there are no UUPS‐upgrade incompatibilities.

No further changes needed.

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

58-61: ✅ Implementation address matches README – no action needed.

The args[0] value in contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter_Proxy.json
(0xbd64B87c8A1276c0B83042f3F9128f7994753836) aligns with the README entry at line 40.

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

58-61: README implementation address is up-to-date
The implementation 0x074837F8306faD19D4e6b1f3d2f98eA796c3f8a9 is already referenced in contracts/README.md (line 39). No further action required.

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

1268-1272: Verify governor & core addresses encoded in deployment calldata

execute.methodName shows an initialize(...) with params
0xf1C7c037891525E360C59f708739Ac09A7670c59 (governor) and
0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479 (core).

Double-check that

  1. both addresses are correct for Arbitrum Sepolia,
  2. the governor is a timelock / multisig with upgrade authority,
  3. the core address is the expected KlerosCore proxy.
contracts/deployments/arbitrumSepolia/DisputeKitClassic.json (1)

1158-1166: Solc input hash & compiler bump: ensure downstream tooling is regenerated

The artifact switched to solc 0.8.28 with a new solcInputHash.
Make sure ABI-coded clients, typechain bindings, and subgraph models are re-generated; otherwise they will miss newly-added view functions (getLocalDisputeRoundID, hashVote, …).

contracts/deployments/arbitrumSepolia/DisputeKitGated.json (1)

1185-1199: Confirm governor/core addresses

The encoded calldata passes governor 0xf1C7…c59 and core 0xE84423…3479. Please validate that these are the final governance & core proxies for Sepolia before the artifact is promoted to production branches.

contracts/deployments/arbitrumSepolia/SortitionModule.json (2)

858-882: setStake signature changed – confirm core linkage

The method now expects _pnkDeposit, _pnkWithdrawal, _newStake and dropped _alreadyTransferred.
Double-check that:

  1. KlerosCore.setStakeBySortitionModule encodes the new parameter list.
  2. Any off-chain scripts that stage batched stake updates have been regenerated from the latest ABI.

Failure to update will revert with bad calldata.


725-737: penalizeStake ABI Change Verified — Internal Call Sites Updated

All internal Solidity callers have been updated to handle the new two‐value return. No instances of penalizeStake being invoked without unpacking both pnkBalance and availablePenalty were found.

• Definitions of penalizeStake exist in:
contracts/src/arbitration/interfaces/ISortitionModule.sol
contracts/src/arbitration/SortitionModuleBase.sol
contracts/src/arbitration/university/SortitionModuleUniversity.sol

• Call sites correctly unpack both return values in:
contracts/src/arbitration/KlerosCoreBase.sol:786
contracts/src/arbitration/university/KlerosCoreUniversity.sol:777

No internal changes are required. Please ensure that any off-chain services or relay contracts using the old single-value ABI are updated to the new ABI before deployment.

contracts/deployments/arbitrumSepolia/DisputeKitGatedShutter.json (1)

1067-1072: Initializer version bump (initialize7) acknowledged

The new proxy exposes initialize7, continuing the monotonic versioning pattern.
No issues spotted – deployment args look correct.

Comment on lines 1682 to 1686
"inputs": [],
"name": "initialize4",
"name": "initialize5",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
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

New initializer initialize5

Initializer bump means:

  1. Proxy execute section already calls it (good).
  2. Any scripts still invoking initialize4 will revert with function selector not found.

Sanity-scan deployment scripts for initialize4 before merging.


🏁 Script executed:

#!/bin/bash
rg -n "initialize4" scripts

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Verify existence of the scripts directory
if [ -d scripts ]; then
  echo "Directory 'scripts' exists."
else
  echo "Directory 'scripts' does not exist."
fi

# Search for any references to initialize4 across the entire repository
rg -n "initialize4" || true

Length of output: 297801


Update deployment & upgrade scripts to call initialize5
The initializer bump to initialize5 means any hard-coded "initialize4" selectors in your deployment or upgrade scripts will now fail. I found references to initialize4 in:

  • contracts/deploy/upgrade-all.ts (line 103)
  • All JSON ABIs under contracts/deployments/* (e.g. ARB Sepolia, Mainnet, Devnet, Testnet viem files)
  • contracts/deployments/arbitrumSepolia.ts, arbitrum.ts, arbitrumSepoliaDevnet.ts, plus their .viem.ts counterparts

Please replace those occurrences of "initialize4" with "initialize5" (and update the corresponding ABI entries) before merging to ensure your proxies invoke the new initializer correctly.

🤖 Prompt for AI Agents
In contracts/deployments/arbitrumSepolia/KlerosCore.json around lines 1682 to
1686, the function initializer has been updated from "initialize4" to
"initialize5". You need to update all deployment and upgrade scripts that
reference "initialize4" to now use "initialize5". Specifically, replace
"initialize4" with "initialize5" in contracts/deploy/upgrade-all.ts at line 103,
all JSON ABI files under contracts/deployments/*, and the related deployment
scripts contracts/deployments/arbitrumSepolia.ts, arbitrum.ts,
arbitrumSepoliaDevnet.ts, and their .viem.ts counterparts. Also update the ABI
entries accordingly to reflect the new initializer function.

@jaybuidl jaybuidl force-pushed the chore/testnet-upgrade-jul2025 branch from ac946a8 to c1ebbb1 Compare July 28, 2025 15:57
Copy link

@jaybuidl jaybuidl merged commit 041f3d9 into dev Jul 28, 2025
17 of 25 checks passed
@jaybuidl jaybuidl deleted the chore/testnet-upgrade-jul2025 branch July 28, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant