Skip to content

Release#2076

Draft
jaybuidl wants to merge 533 commits intomasterfrom
dev
Draft

Release#2076
jaybuidl wants to merge 533 commits intomasterfrom
dev

Conversation

@jaybuidl
Copy link
Copy Markdown
Member

@jaybuidl jaybuidl commented Aug 8, 2025

PR-Codex overview

This PR focuses on significant refactoring and updates to various smart contracts and components in the Kleros project, including renaming governance roles, enhancing dispute kits, and improving code structure for better maintainability.

Detailed summary

  • Renamed governor to owner in multiple contracts.
  • Updated imports to use destructured syntax for better readability.
  • Removed deprecated contracts and unnecessary files.
  • Enhanced IRNG interface and implemented in IncrementalNG.
  • Improved error handling and logging in various scripts.
  • Updated deployment scripts to reflect ownership changes.
  • Refactored components to use MarkdownRenderer instead of ReactMarkdown.
  • Added new mock contracts for testing dispute kits.
  • Adjusted event handling in the subgraph configuration.
  • Improved URL validation and external link handling in utilities.

The following files were skipped due to too many changes: web/src/components/DisputeFeatures/Features/index.tsx, web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx, contracts/src/token/Faucet.sol, web/src/components/DisputeFeatures/GroupsUI.tsx, contracts/scripts/populatePolicyRegistry.ts, web/src/pages/Resolver/NavigationButtons/NextButton.tsx, contracts/src/libraries/SafeERC20.sol, web/src/components/DisputePreview/DisputeContext.tsx, contracts/deploy/change-sortition-module-rng.ts, contracts/deploy/00-randomizer-rng.ts, contracts/src/proxy/KlerosProxies.sol, contracts/src/proxy/UUPSProxy.sol, web/src/context/NewDisputeContext.tsx, web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx, contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol, contracts/deploy/00-chainlink-rng.ts, contracts/test/arbitration/dispute-kit-gated-shutter.ts, contracts/deploy/00-home-chain-arbitration-university.ts, contracts/test/integration/getContractsViem.test.ts, web/src/pages/Cases/CaseDetails/Timeline.tsx, contracts/deployments/contractsViem.ts, web/src/pages/Resolver/Briefing/Description.tsx, contracts/test/arbitration/ruler.ts, contracts/scripts/changeOwner.ts, web/src/pages/Resolver/Parameters/Court/index.tsx, contracts/src/arbitration/devtools/DisputeResolverRuler.sol, contracts/test/arbitration/draw.ts, contracts/src/gateway/interfaces/IForeignGateway.sol, contracts/package.json, contracts/deployments/disputeKitsViem.ts, contracts/deploy/upgrade-all.ts, contracts/src/arbitration/interfaces/IArbitrableV2.sol, contracts/deployments/contractsEthers.ts, contracts/scripts/populateCourts.ts, web/src/components/DisputeFeatures/Features/GatedErc20.tsx, web/src/pages/Profile/Stakes/Header.tsx, contracts/src/arbitration/view/KlerosCoreSnapshotProxy.sol, contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol, web/src/hooks/useVotingContext.tsx, contracts/test/integration/getContractsEthers.test.ts, contracts/src/proxy/UUPSProxiable.sol, contracts/src/arbitration/evidence/EvidenceModule.sol, web/src/components/DisputeFeatures/Features/GatedErc1155.tsx, contracts/src/arbitration/DisputeTemplateRegistry.sol, web/src/components/MarkdownEditor.tsx, web/src/components/ExternalLinkWarning.tsx, contracts/src/rng/RNGWithFallback.sol, contracts/src/arbitration/PolicyRegistry.sol, contracts/src/kleros-v1/kleros-liquid/KlerosLiquidToV2Governor.sol, contracts/test/foundry/KlerosCore_RNG.t.sol, contracts/test/proxy/index.ts, contracts/test/evidence/index.ts, contracts/README.md, web/src/hooks/useTokenAddressValidation.ts, contracts/deploy/00-home-chain-arbitration.ts, contracts/src/gateway/interfaces/IHomeGateway.sol, contracts/scripts/utils/contracts.ts, contracts/src/test/SortitionTreesMock.sol, web/src/pages/Resolver/Parameters/Court/FeatureSelection/index.tsx, contracts/src/rng/BlockhashRNG.sol, .github/workflows/contracts-testing.yml, contracts/src/arbitration/dispute-kits/DisputeKitGatedArgentinaConsumerProtection.sol, contracts/src/rng/RandomizerRNG.sol, contracts/test/integration/index.ts, web/src/components/MarkdownRenderer.tsx, contracts/src/arbitration/interfaces/IArbitratorV2.sol, web/src/consts/disputeFeature.ts, contracts/deploy/00-home-chain-arbitration-neo.ts, web/src/styles/mdxEditorTheme.ts, contracts/src/arbitration/dispute-kits/DisputeKitGated.sol, contracts/src/arbitration/arbitrables/DisputeResolver.sol, contracts/test/foundry/KlerosCore_Disputes.t.sol, contracts/CHANGELOG.md, contracts/src/gateway/ForeignGateway.sol, contracts/src/arbitration/devtools/KlerosCoreRuler.sol, contracts/test/foundry/KlerosCore_Initialization.t.sol, contracts/src/libraries/SortitionTrees.sol, contracts/test/foundry/KlerosCore_TestBase.sol, contracts/src/rng/ChainlinkConsumerBaseV2Plus.sol, contracts/src/arbitration/arbitrables/ArbitrableExample.sol, contracts/test/rng/index.ts, contracts/src/arbitration/dispute-kits/DisputeKitShutter.sol, contracts/test/foundry/KlerosCore_Drawing.t.sol, contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol, contracts/src/rng/ChainlinkRNG.sol, contracts/src/gateway/HomeGateway.sol, contracts/src/arbitration/interfaces/ISortitionModule.sol, contracts/src/arbitration/interfaces/IDisputeKit.sol, contracts/test/arbitration/dispute-kit-gated.ts, contracts/test/arbitration/staking.ts, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Proxy.json, contracts/src/arbitration/dispute-kits/DisputeKitGatedShutter.sol, contracts/src/arbitration/university/SortitionModuleUniversity.sol, contracts/test/foundry/KlerosCore_Governance.t.sol, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity.json, contracts/src/arbitration/evidence/ModeratedEvidenceModule.sol, contracts/test/foundry/DisputeKitGatedArgentinaConsumerProtection_Drawing.t.sol, contracts/test/arbitration/staking-neo.ts, contracts/test/foundry/KlerosCore_Voting.t.sol, contracts/src/arbitration/SortitionModule.sol, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity_Proxy.json, contracts/test/arbitration/helpers/dispute-kit-gated-common.ts, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity_Proxy.json, contracts/test/sortition/index.ts, contracts/test/foundry/KlerosCore_Staking.t.sol, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity_Proxy.json, contracts/test/arbitration/helpers/dispute-kit-shutter-common.ts, contracts/deployments/arbitrumSepoliaDevnet/SortitionModuleUniversity.json, contracts/deployments/arbitrumSepoliaDevnet/DisputeKitClassicUniversity.json, contracts/test/foundry/KlerosCore_Execution.t.sol, contracts/deployments/arbitrumSepoliaDevnet/KlerosCoreUniversity.json, contracts/src/arbitration/university/KlerosCoreUniversity.sol, contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol, contracts/deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistryUniversity_Implementation.json, contracts/src/arbitration/KlerosCore.sol, contracts/deployments/arbitrum.ts, contracts/deployments/arbitrumSepoliaDevnet.ts, contracts/deployments/arbitrumSepoliaDevnet/DisputeResolverUniversity.json, contracts/test/foundry/KlerosCore_Appeals.t.sol, contracts/deployments/mainnet.viem.ts, contracts/deployments/devnet.viem.ts, contracts/audit/METRICS.md, yarn.lock, 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

    • Major v2 upgrade: owner-based governance across contracts, enhanced appeals, staking and draw flow.
    • RNG with automatic fallback for reliable randomness.
    • Expanded dispute kits (classic, gated, shutter), including token-gated capabilities.
    • New viem helper to fetch dispute kits on-chain.
    • Added contract docs build/serve scripts.
    • New courts and policies (including “Corte de Defensores del Cliente”).
  • Bug Fixes

    • Correct period progression and suppress zero-amount transfers/events.
  • Refactor

    • Governor → owner terminology; unified mainnet deployments; revamped sortition trees.
  • Chores

    • Tooling upgrades (Solidity 0.8.30, Hardhat, Foundry, Yarn), viem as peer dependency.
  • Tests

    • Extensive new Hardhat/Foundry coverage for disputes, staking, RNG, and governance.

Loading
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.

6 participants