Skip to content

Conversation

@jaybuidl
Copy link
Member

@jaybuidl jaybuidl commented Jul 20, 2025

bumped @kleros/kleros-v2-contracts to pick up the latest devnet contracts


PR-Codex overview

This PR primarily updates the version of the @kleros/kleros-v2-contracts package from ^0.9.3 to ^0.10.0 and introduces new functionality for managing dispute templates and changing arbitrators within the smart contract framework.

Detailed summary

  • Updated @kleros/kleros-v2-contracts version to ^0.10.0 in package.json files.
  • Added logging for updating the CurateV2 master copy in setDisputeTemplate.ts.
  • Introduced changeArbitrator.ts script to change arbitrators for curated lists.
  • Created a new getDisputeTemplate task to retrieve dispute templates by ID.
  • Updated arbitratorAddress in templates/index.ts.
  • Added new dependencies and updated existing ones in yarn.lock.

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

Summary by CodeRabbit

  • Chores

    • Updated the "@kleros/kleros-v2-contracts" package to version ^0.10.0 in both contracts and web dependencies.
  • Refactor

    • Changed the arbitrator address used in templates to a new value.
  • New Features

    • Added a task to update arbitrator parameters across contracts.
    • Added a task to retrieve and display dispute template details by ID.

@netlify
Copy link

netlify bot commented Jul 20, 2025

Deploy Preview for curate-v2 ready!

Name Link
🔨 Latest commit 46838e7
🔍 Latest deploy log https://app.netlify.com/projects/curate-v2/deploys/6883a58f9aa8420008d07635
😎 Deploy Preview https://deploy-preview-84--curate-v2.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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes update the @kleros/kleros-v2-contracts package version from ^0.9.3 to ^0.10.0 in both the contracts and web packages. The arbitrator address in the shared template properties is updated. A new Hardhat task change-arbitrator is introduced to update arbitration parameters across CurateV2 contracts. Another task getDisputeTemplate is added to query dispute template details. The Hardhat config imports the new script, and a console log is added in the setDisputeTemplate script.

Changes

Files/Paths Change Summary
contracts/package.json, web/package.json Updated @kleros/kleros-v2-contracts version from ^0.9.3 to ^0.10.0
templates/index.ts Changed arbitratorAddress value in sharedTemplateProperties
contracts/hardhat.config.ts Added import for new changeArbitrator script
contracts/scripts/changeArbitrator.ts Added new Hardhat task change-arbitrator to update arbitrator parameters on CurateV2 contracts
contracts/scripts/getDisputeTemplate.ts Added new Hardhat task getDisputeTemplate to fetch and display dispute template details
contracts/scripts/setDisputeTemplate.ts Added console log indicating update start for CurateV2 master copy

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant HH as Hardhat
    participant Core as KlerosCore Contract
    participant Evidence as Evidence Contract
    participant CurateV2 as CurateV2 Contracts
    participant Factory as CurateFactory Contract

    Dev->>HH: Run "change-arbitrator" task
    HH->>Core: Get KlerosCore instance
    HH->>Evidence: Get Evidence instance
    HH->>CurateV2: Get master CurateV2 contract
    HH->>CurateV2: changeArbitrationParams(master)
    HH->>Factory: Get CurateFactory contract
    Factory->>HH: Emit NewList events (all CurateV2 deployed)
    loop For each CurateV2 instance
        HH->>CurateV2: Check governor
        alt Governor is deployer
            HH->>CurateV2: changeArbitrationParams(instance)
        else
            HH->>HH: Skip update
        end
    end
    HH->>HH: Run "set-dispute-template" task
    HH->>Dev: Log transaction hashes and updates complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Poem

🐇 A new task hops into the code,
Changing arbitrators down the road.
Templates updated, versions bumped high,
Logs to tell us when updates fly.
Fetching dispute templates with glee,
The rabbit’s work is done, you see! 🥕✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 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 7f9c439 and 46838e7.

📒 Files selected for processing (4)
  • contracts/hardhat.config.ts (1 hunks)
  • contracts/scripts/changeArbitrator.ts (1 hunks)
  • contracts/scripts/getDisputeTemplate.ts (1 hunks)
  • contracts/scripts/setDisputeTemplate.ts (1 hunks)
✨ 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/devnet-redeploy-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
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

🧹 Nitpick comments (2)
web/package.json (1)

49-51: Version alignment LGTM
Frontend devDependency now matches the contracts workspace, preventing mismatched ABIs during codegen. Remember to run yarn install (which re-creates the lockfile) before pushing the tag.

templates/index.ts (1)

1-18: Consider externalising all “devnet constants” into a single config module
The top-level comment already flags the tech debt; with every devnet redeploy we touch multiple literals here. Moving arbitratorAddress, arbitrableChainID, etc., to a .env file or shared JSON would eliminate manual edits and reduce merge conflicts.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f780881 and 7f9c439.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • contracts/package.json (1 hunks)
  • templates/index.ts (1 hunks)
  • web/package.json (1 hunks)
⏰ 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). (3)
  • GitHub Check: Redirect rules - curate-v2
  • GitHub Check: Header rules - curate-v2
  • GitHub Check: Pages changed - curate-v2
🔇 Additional comments (2)
contracts/package.json (1)

88-90: Confirm compatibility of @kleros/kleros-v2-contracts@^0.10.0 bump
We’ve located imports of @kleros/kleros-v2-contracts in your codebase—this upgrade is pre-1.0 so may include breaking changes:

• contracts/wagmi.config.testnet.ts
• contracts/wagmi.config.mainnet.ts
• contracts/wagmi.config.devnet.ts
• contracts/src/CurateV2.sol
• contracts/deploy/00-curate-v2.ts

Please run:

hardhat compile && yarn test
yarn typechain

and verify that:

  1. TypeChain types still build without errors.
  2. Any constructor or ABI changes in v2 contracts are reflected in your deployment scripts and mocks.
    Confirm before merging.
templates/index.ts (1)

8-11: New devnet arbitrator address acknowledged – verify it’s the one emitted by v0.10 deploys
Given the hard-coded nature of this file, please sanity-check that 0x1Bd44c4a4511DbFa7DC1d5BC201635596E7200f9 is the arbitrator address in the freshly deployed devnet (chain ID 421614).

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 20, 2025
@jaybuidl jaybuidl merged commit bc5502a into master Jul 25, 2025
4 of 6 checks passed
@jaybuidl jaybuidl deleted the chore/devnet-redeploy-jul2025 branch July 25, 2025 15:41
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.

2 participants