Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jaybuidl
Copy link
Member

@jaybuidl jaybuidl commented Sep 12, 2025

PR-Codex overview

This PR introduces the DisputeTemplateRegistryUniversityProxy contract and updates references to the DisputeTemplateRegistry across various files, ensuring consistency with the new naming convention. It also modifies contract interactions and deployment scripts accordingly.

Detailed summary

  • Added DisputeTemplateRegistryUniversityProxy contract.
  • Updated disputeTemplateRegistry references to DisputeTemplateRegistryUniversity in test files.
  • Renamed owner to governor in contract execution logic.
  • Adjusted deployment scripts to reference the new DisputeTemplateRegistryUniversity.
  • Modified deployment JSON files to reflect new addresses and ABI for DisputeTemplateRegistryUniversity.

The following files were skipped due to too many changes: contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet.ts, contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json, contracts/deployments/devnet.viem.ts, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Implementation.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Implementation.json

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

Summary by CodeRabbit

  • New Features

    • Added a University Dispute Template Registry and new University proxy deployments on Arbitrum Sepolia Devnet.
    • New juror stake management: leftover PNK tracking/withdrawal, forced-unstake and stake reward/penalty actions, enhanced draw/stake queries.
  • Changes

    • Governance surface shifted from “governor” to “owner” across University contracts; several public events/functions renamed or restructured.
    • Multiple University contract deployments and addresses refreshed (Arbitrum Sepolia).
  • Documentation

    • Devnet renamed to “V2 Devnet (unstable)” and minor listing formatting fixes.

Copy link

netlify bot commented Sep 12, 2025

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit 79e4210
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet/deploys/68c97ace5faeaf00088a5316
😎 Deploy Preview https://deploy-preview-2138--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

netlify bot commented Sep 12, 2025

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

Name Link
🔨 Latest commit 79e4210
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-university/deploys/68c97ace1ab2fc00087c2160

Copy link

netlify bot commented Sep 12, 2025

Deploy Preview for kleros-v2-neo ready!

Name Link
🔨 Latest commit 79e4210
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-neo/deploys/68c97aceaecde00007ef5e15
😎 Deploy Preview https://deploy-preview-2138--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.

Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Walkthrough

Renames “Devnet” to “V2 Devnet (unstable)”, updates Arbitrum Sepolia University deployment addresses, adds DisputeTemplateRegistryUniversity (UUPS proxy + impl), upgrades University variants of DisputeKitClassic, KlerosCore, SortitionModule, and DisputeResolver (ABI and governance changes), expands proxy suite, and adjusts deploy/test wiring and utilities.

Changes

Cohort / File(s) Summary
Docs
contracts/README.md
Renamed Devnet heading to "V2 Devnet (unstable)"; updated Arbitrum Sepolia University addresses; minor bullet formatting fix.
Deploy script
contracts/deploy/00-home-chain-arbitration-university.ts
Instantiates DisputeTemplateRegistryUniversity as an upgradable contract and updates DisputeKitClassicUniversity constructor args; wiring now uses the new registry address (no early-return behavior introduced).
New registry artifacts
contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity*.json
Adds UUPS proxy + implementation artifacts and initialization metadata for DisputeTemplateRegistryUniversity.
DisputeKitClassicUniversity
contracts/deployments/.../DisputeKitClassicUniversity*.json
ABI expanded/changed (owner/ownerProposal naming, hashVote, new getters, removed ONE_BASIS_POINT); new implementation/proxy addresses; updated compiler/metadata.
DisputeResolverUniversity
contracts/deployments/.../DisputeResolverUniversity.json, src/arbitration/arbitrables/DisputeResolver.sol, src/arbitration/interfaces/IArbitrableV2.sol
Switched governor→owner, renamed changeGovernor→changeOwner and governor()→owner(); removed templateUri variant/event param and createDisputeForTemplateUri; added owner-only errors; ABI/metadata updated.
KlerosCoreUniversity
contracts/deployments/.../KlerosCoreUniversity*.json
ABI and events refactored toward owner/instructor model; added owner(), transferBySortitionModule, getPnkAtStakePerJuror, version(); updated proxy/impl addresses and metadata.
SortitionModuleUniversity
contracts/deployments/.../SortitionModuleUniversity*.json
Staking/draw API changes (uint96 court IDs, draw returns fromSubcourtID), new stake-management functions/events/errors, owner() accessor, redeployed proxy/impl and metadata updates.
Proxy suite
contracts/src/proxy/KlerosProxies.sol, contracts/src/proxy/UUPSProxy.sol
Added university-specific proxy contracts (e.g., DisputeTemplateRegistryUniversityProxy) and expanded proxy declarations; minor pragma/metadata tweaks in UUPSProxy.
Deployment wiring / configs
contracts/deployments/contractsEthers.ts, contracts/deployments/contractsViem.ts, contracts/scripts/utils/contracts.ts
Introduced devnetDtrUniversityConfig, wired university deployments to use DisputeTemplateRegistryUniversity, added per-core mapping entry for dispute template registry.
Execution util
contracts/scripts/utils/execution.ts
governableAbi usage changed: reads governor() (ABI/name adjusted) when querying governance address.
Tests
contracts/test/integration/getContractsEthers.test.ts, contracts/test/integration/getContractsViem.test.ts
University mapping now expects "DisputeTemplateRegistryUniversity" as the contract name for the university deployment.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Deployer
  participant Chain
  participant DTRProxy as DisputeTemplateRegistryUniversity Proxy
  participant DTRImpl as DisputeTemplateRegistryUniversity Impl
  rect rgb(240,248,255)
  note right of Deployer: University deploy sequence (high-level)
  Deployer->>Chain: deploy DTR Implementation
  Deployer->>Chain: deploy DTR Proxy(implementation, initData)
  Chain-->>DTRProxy: Proxy constructed
  DTRProxy->>DTRImpl: delegatecall initialize(owner)
  DTRImpl-->>DTRProxy: initialization complete
  Deployer->>Chain: continue with DisputeKit/Core/Sortition deployments using DTR address
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • unknownunknown1

Poem

A rabbit taps the devnet drum,
New proxies, registries—here they come.
Owner hops in where governor stood,
Kits and cores in order, good.
Sepolia blooms; the garden's neat—hop, deploy, repeat! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "University redeploy" succinctly and accurately summarizes the primary change set — redeploying university-specific contracts and updating deployment artifacts and references. It is concise, on-topic, and clear enough for a teammate scanning PR history to understand the main intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/university-deploy-stable

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

@jaybuidl jaybuidl added the Package: Contracts Court smart contracts label Sep 12, 2025
Copy link

netlify bot commented Sep 12, 2025

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

Name Link
🔨 Latest commit 79e4210
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet-devtools/deploys/68c97ace02606500086a5e27

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

Caution

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

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

236-244: ABI surface changed — update callers, indexers, tests and deployment ABIs

  • Offchain & frontend: update draw callsites to the new return shape (destructure tuple / handle extra return values) — e.g. web/src/pages/Cases/CaseDetails/MaintenanceButtons/DrawButton.tsx (draw call).
  • Keeper / scripts: fix core.draw usage/staticCall (keeperBot: contracts/scripts/keeperBot.ts casts staticCall to bigint — adjust to actual return).
  • Tests: update expectations for StakeSet and draw across contracts/test/arbitration/* and contracts/test/sortition/* (withArgs / destructuring as needed).
  • Subgraphs / indexers: update mappings and generated types in subgraph/core/src/SortitionModule.ts and subgraph/core-university/src/SortitionModule.ts, update tests (subgraph/core/tests/*), and run codegen after ABI changes (handle extended StakeSet params and add LeftoverPNK handler if present).
  • Deployments / ABIs: update contracts/deployments/* (devnet/testnet/mainnet/arbitrumSepoliaDevnet...) where StakeSet and related ABI entries are defined.
  • governor() migration: ripgrep found no TS/JS uses, but the search did not run over .sol files — scan Solidity sources for governor() and migrate to owner() for university deployments.
contracts/deploy/00-home-chain-arbitration-university.ts (1)

92-97: Use DisputeTemplateRegistryUniversity here

getContractOrDeployUpgradable currently requests "DisputeTemplateRegistry" — change to "DisputeTemplateRegistryUniversity" so the resolver wires to the university registry.

File: contracts/deploy/00-home-chain-arbitration-university.ts (lines 92–97)

-  const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistry", {
+  const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistryUniversity", {
     from: deployer,
     args: [deployer],
     log: true,
   });
🧹 Nitpick comments (7)
contracts/README.md (1)

77-110: Addresses update looks good; add provenance details for ops

Consider appending deployment tx hashes and block numbers next to each new address to ease verification and rollbacks.

contracts/test/integration/getContractsViem.test.ts (1)

214-216: Minor: clarify DEVNET path for “university” verification.

Add a brief comment explaining why university uses NETWORKS.DEVNET (artifacts live under arbitrumSepoliaDevnet) to avoid confusion.

-    await verifyDeployedAddresses(contracts, NETWORKS.DEVNET, universityContractMapping);
+    // University artifacts are stored under arbitrumSepoliaDevnet.
+    await verifyDeployedAddresses(contracts, NETWORKS.DEVNET, universityContractMapping);
contracts/scripts/utils/contracts.ts (1)

54-55: University mapping LGTM.

Correctly points to DisputeTemplateRegistryUniversity for university deployments.

Consider allowing getContractsFromNetwork/getContractNamesFromNetwork to accept an optional core override (env var or param) to support university without hardcoding network names.

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

292-299: ABI change: _courtID/_parent now uint96 — update clients/subgraphs

CourtCreated now emits uint96 for IDs. Update any decoding schemas/types that assumed uint256.


1533-1561: ABI change: Round tuple expanded

getRoundInfo now includes drawnJurorFromCourtIDs (uint96[]) and a __gap field. Regenerate typings and adjust tuple decoding.

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

812-822: Nit: getDegreeOfCoherencePenalty output name

The output is named pnkCoherence while the function denotes a penalty. Consider renaming in source for clarity in future builds (no on-chain impact).


1070-1097: Nit: hashVote’s third parameter is unnamed in ABI

Consider naming the string parameter (e.g., _saltedJustification) in source to improve autogenerated client typings.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbc111a and 452246f.

📒 Files selected for processing (19)
  • contracts/README.md (2 hunks)
  • contracts/deploy/00-home-chain-arbitration-university.ts (1 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json (19 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json (3 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json (10 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json (1 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json (1 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json (1 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json (18 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json (2 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json (13 hunks)
  • contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json (2 hunks)
  • contracts/deployments/contractsEthers.ts (2 hunks)
  • contracts/deployments/contractsViem.ts (2 hunks)
  • contracts/scripts/utils/contracts.ts (2 hunks)
  • contracts/scripts/utils/execution.ts (2 hunks)
  • contracts/src/proxy/KlerosProxies.sol (1 hunks)
  • contracts/test/integration/getContractsEthers.test.ts (1 hunks)
  • contracts/test/integration/getContractsViem.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-04T23:36:16.415Z
Learnt from: jaybuidl
PR: kleros/kleros-v2#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/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json
  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json
📚 Learning: 2025-01-22T00:55:35.842Z
Learnt from: jaybuidl
PR: kleros/kleros-v2#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/DisputeKitClassicUniversity.json
  • contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json
📚 Learning: 2024-11-19T16:31:08.965Z
Learnt from: jaybuidl
PR: kleros/kleros-v2#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.

Applied to files:

  • contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json
🧬 Code graph analysis (1)
contracts/deploy/00-home-chain-arbitration-university.ts (2)
contracts/deploy/utils/deployUpgradable.ts (1)
  • deployUpgradable (37-89)
contracts/deployments/utils.ts (1)
  • deployments (3-16)
⏰ 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). (15)
  • GitHub Check: Redirect rules - kleros-v2-neo
  • GitHub Check: Header rules - kleros-v2-neo
  • GitHub Check: Redirect rules - kleros-v2-university
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-neo
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-university
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-university
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Analyze (javascript)
  • GitHub Check: SonarCloud
  • GitHub Check: hardhat-tests
🔇 Additional comments (17)
contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json (1)

2-67: Proxy artifact refresh acknowledged

Proxy address, tx hash, and metadata updated; matches README. No issues.

contracts/deployments/contractsViem.ts (1)

22-24: Switch to DisputeTemplateRegistryUniversity config is correct

University mapping now points to the university-specific DTR config. LGTM.

Also applies to: 170-177

contracts/deployments/contractsEthers.ts (1)

21-23: University DTR wiring updated

Using devnetDtrUniversityConfig for university deployments is consistent with artifacts and tests.

Also applies to: 206-213

contracts/test/integration/getContractsEthers.test.ts (1)

89-90: Test mapping aligned with university artifact name

Switching to "DisputeTemplateRegistryUniversity" ensures address lookup matches deployments.

contracts/src/proxy/KlerosProxies.sol (1)

34-36: New DisputeTemplateRegistryUniversityProxy added

Consistent with UUPSProxy pattern and deployment artifacts. No issues.

contracts/test/integration/getContractsViem.test.ts (1)

69-69: Approve — DisputeTemplateRegistryUniversity rename is correct. Artifact exists at contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json and is referenced in deployments and tests (address present in contracts/deployments/arbitrumSepoliaDevnet.ts).

contracts/deploy/00-home-chain-arbitration-university.ts (1)

39-39: Initializer args: double-check WETH reference.

  • contracts/deploy/00-home-chain-arbitration-university.ts:39 — verify deployERC20AndFaucet returns an object with a .target (address) and that DisputeKitClassic.initialize(owner, zeroAddr, weth, 1) expects the weth address; if it expects an address, pass weth.target (or weth.address) instead of the contract instance.
contracts/scripts/utils/contracts.ts (1)

44-45: BASE mapping LGTM.

Keeps BASE behavior unchanged for the dispute template registry.

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

1-446: Approve — UUPS implementation artifact looks correct; implementation address only referenced in deployments/docs

ABI, storage layout and events align. Repo search shows the implementation address 0xC3f638389635bF33E019c845FdaF2ed9bca3DF67 appears only in deployment artifacts and README (no occurrences in application/runtime code outside deployments).

Affected files:

  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json
  • contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json
  • contracts/deployments/arbitrumSepoliaDevnet.ts
  • contracts/deployments/devnet.viem.ts
  • contracts/README.md
contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json (1)

1-81: Proxy wiring LGTM — verified

Constructor args point to the implementation; initializer selector matches initialize(address) (0xc4d66de8). diff failed in the sandbox (/dev/fd unavailable) but both addresses printed identically.

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

296-303: LGTM: proxy wired to implementation and initialized with owner

Proxy address, implementation, and initializer args look consistent. No issues spotted here.

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

101-109: Confirm client compatibility with new compiler/bytecode settings

This proxy was rebuilt with Solidity 0.8.30 (viaIR, cancun). Ensure ABIs in downstream clients/subgraphs are regenerated against these artifacts to avoid decoder drift.

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

58-61: Incorrect — DK initializer does not set core to 0x0

Constructor calldata (contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json, args[1])'s first 32‑byte argument is 0x000000000000000000000000f1C7c037891525E360C59f708739aC09A7670c59 (address 0xf1C7c037891525E360C59f708739aC09A7670c59), not 0x0.

Likely an incorrect or invalid review comment.

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

1966-1974: Sanity-check initializer wiring (DK, prosecution module, owner/instructor)

Initializer embeds:

  • owner = 0xF1C7...c59
  • instructor = 0xF1C7...c59
  • jurorProsecutionModule = 0x000...000
  • disputeKit = 0x82F208...92F91 (DK Classic Univ)

Please confirm the prosecution module is intentionally unset (0x0). If not, plan a changeJurorProsecutionModule(address) call.


1387-1391: Function rename: executeOwnerProposal

Downstream code invoking executeGovernorProposal must be updated to executeOwnerProposal.

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

302-302: Good: Arbitrator wired to Core proxy

_arbitrator = 0xA34dBBD0E5e1d09bd683455f9dbC393797BC558f matches the Core proxy. Looks correct.

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

1360-1366: Reconfirm initializer constants (core=0x0, wNative, jumpDKID)

  • _core is 0x0 here as well; ensure a changeCore follow-up is executed (see DK proxy comment).
  • _wNative = 0x3829A2486d53ee984a0ca2D76552715726b77138 — confirm this is the intended wrapped native on Arbitrum Sepolia.
  • _jumpDisputeKitID = 1 — confirm expected.

Copy link

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

♻️ Duplicate comments (1)
contracts/deploy/00-home-chain-arbitration-university.ts (1)

27-33: Use getContractOrDeployUpgradable for idempotence and consistent reruns; also reduces nonce fragility.

Switching to the idempotent helper aligns with the rest of the script and avoids accidental redeploys/skips that can shift nonces before you compute the predicted KlerosCore address.

Apply this diff:

-  const disputeTemplateRegistry = await deployUpgradable(deployments, "DisputeTemplateRegistryUniversity", {
-    from: deployer,
-    contract: "DisputeTemplateRegistry",
-    args: [deployer],
-    log: true,
-  });
+  const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistryUniversity", {
+    from: deployer,
+    args: [deployer],
+    log: true,
+  });

Additionally, your nonce-based prediction for KlerosCore at Lines 41-46 assumes SortitionModule is freshly deployed (2 tx). If Sortition already exists or upgrades, the offset changes and the predicted address can be wrong. Either:

  • compute the offset based on whether Sortition exists, or
  • initialize Sortition with a zero core and set it post‑deploy.

Example (outside this hunk):

const sortitionExisting = await deployments.getOrNull("SortitionModuleUniversity");
const nonce = await ethers.provider.getTransactionCount(deployer);
const offset = sortitionExisting ? 1 : 3; // only KlerosCore (impl+proxy) vs also Sortition (impl+proxy)
klerosCoreAddress = getContractAddress(deployer, nonce + offset);
🧹 Nitpick comments (1)
contracts/deploy/00-home-chain-arbitration-university.ts (1)

37-37: Validate the new 4th constructor arg for DisputeKitClassicUniversity.

Hardcoding 1 is risky. If this is a chainId, derive it: Number(await getChainId()). If it’s a version flag, name a constant and document it.

Possible tweak:

-    args: [deployer, ZeroAddress, weth.target, 1],
+    args: [deployer, ZeroAddress, weth.target, Number(await getChainId())], // if this param is chainId
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 452246f and 79e4210.

📒 Files selected for processing (1)
  • contracts/deploy/00-home-chain-arbitration-university.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
contracts/deploy/00-home-chain-arbitration-university.ts (1)
contracts/deploy/utils/deployUpgradable.ts (1)
  • deployUpgradable (37-89)
⏰ 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
  • GitHub Check: Redirect rules - kleros-v2-testnet-devtools
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Redirect rules - kleros-v2-university
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet-devtools
  • GitHub Check: Header rules - kleros-v2-university
  • GitHub Check: Pages changed - kleros-v2-testnet-devtools
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: hardhat-tests
  • GitHub Check: Pages changed - kleros-v2-university
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
contracts/deploy/00-home-chain-arbitration-university.ts (1)

93-93: Good: Resolver wired to proxy addresses.

Passing core.target (proxy) and disputeTemplateRegistry.address (proxy) is correct and prevents pointing at implementations.

@jaybuidl jaybuidl marked this pull request as ready for review September 16, 2025 17:50
@jaybuidl jaybuidl merged commit 55589e5 into dev Sep 16, 2025
15 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: Contracts Court smart contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant