-
Notifications
You must be signed in to change notification settings - Fork 51
feat: add argentina consumer protection dispute kit #2211
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
base: dev
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for kleros-v2-testnet-devtools failed. Why did it fail? →
|
❌ Deploy Preview for kleros-v2-testnet failed. Why did it fail? →
|
❌ Deploy Preview for kleros-v2-neo failed. Why did it fail? →
|
|
WalkthroughThis PR introduces a new Argentina Consumer Protection dispute kit across the subgraph and web application, adding data source mappings, UI components, feature flags, voting flows, and appeal mechanisms to support the new dispute resolution variant. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/src/components/DisputeFeatures/Features/index.tsx (1)
34-36: Unrelated formatting change.The tooltip text formatting change for ShieldedVote (removed line break, adjusted spacing) appears unrelated to the Argentina Consumer Protection feature addition. Consider separating unrelated formatting changes into separate commits for clearer change history.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
subgraph/core/subgraph.template.yamlweb/src/components/DisputeFeatures/Features/ArgentinaConsumerProtection.tsxweb/src/components/DisputeFeatures/Features/index.tsxweb/src/consts/disputeFeature.tsweb/src/consts/index.tsweb/src/hooks/useDisputeKitAddresses.tsweb/src/hooks/useVotingContext.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Voting/index.tsxweb/wagmi.config.ts
🧰 Additional context used
🧠 Learnings (12)
📚 Learning: 2024-10-28T05:55:12.728Z
Learnt from: Harman-singh-waraich
Repo: kleros/kleros-v2 PR: 1716
File: web-devtools/src/app/(main)/dispute-template/CustomContextInputs.tsx:29-42
Timestamp: 2024-10-28T05:55:12.728Z
Learning: In the `CustomContextInputs` component located at `web-devtools/src/app/(main)/dispute-template/CustomContextInputs.tsx`, the `DisputeRequestParams` array is used to exclude certain variables from the custom input since they are already provided in a preceding component. Therefore, converting it to a type is unnecessary.
Applied to files:
web/src/components/DisputeFeatures/Features/ArgentinaConsumerProtection.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsxweb/src/pages/Cases/CaseDetails/Voting/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsxweb/src/components/DisputeFeatures/Features/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx
📚 Learning: 2025-05-09T13:39:15.086Z
Learnt from: tractorss
Repo: kleros/kleros-v2 PR: 1982
File: web/src/pages/Resolver/Parameters/NotablePersons/PersonFields.tsx:64-0
Timestamp: 2025-05-09T13:39:15.086Z
Learning: In PersonFields.tsx, the useEffect hook for address validation intentionally uses an empty dependency array to run only once on component mount. This is specifically designed for the dispute duplication flow when aliasesArray is already populated with addresses that need initial validation.
Applied to files:
web/src/hooks/useDisputeKitAddresses.ts
📚 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:
web/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsxweb/src/pages/Cases/CaseDetails/Voting/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx
📚 Learning: 2025-05-15T06:50:40.859Z
Learnt from: tractorss
Repo: kleros/kleros-v2 PR: 1982
File: web/src/pages/Resolver/Landing/index.tsx:62-62
Timestamp: 2025-05-15T06:50:40.859Z
Learning: In the Landing component, it's safe to pass `dispute?.dispute?.arbitrated.id as 0x${string}` to `usePopulatedDisputeData` without additional null checks because the hook internally handles undefined parameters through its `isEnabled` flag and won't execute the query unless all required data is available.
Applied to files:
web/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsxweb/src/pages/Cases/CaseDetails/Voting/index.tsxweb/src/hooks/useVotingContext.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx
📚 Learning: 2024-10-14T13:58:25.708Z
Learnt from: Harman-singh-waraich
Repo: kleros/kleros-v2 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.
Applied to files:
web/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsxweb/src/pages/Cases/CaseDetails/Voting/index.tsxweb/src/hooks/useVotingContext.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx
📚 Learning: 2024-10-09T10:22:41.474Z
Learnt from: jaybuidl
Repo: kleros/kleros-v2 PR: 1582
File: web-devtools/src/app/(main)/ruler/SelectArbitrable.tsx:88-90
Timestamp: 2024-10-09T10:22:41.474Z
Learning: Next.js recommends using the `useEffect` hook to set `isClient` and using `suppressHydrationWarning` as a workaround for handling hydration inconsistencies, especially when dealing with data like `knownArbitrables` that may differ between server-side and client-side rendering. This approach is acceptable in TypeScript/React applications, such as in `web-devtools/src/app/(main)/ruler/SelectArbitrable.tsx`.
Applied to files:
web/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsxweb/src/hooks/useVotingContext.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsx
📚 Learning: 2024-12-06T13:04:50.495Z
Learnt from: kemuru
Repo: kleros/kleros-v2 PR: 1774
File: web/src/components/CasesDisplay/index.tsx:61-61
Timestamp: 2024-12-06T13:04:50.495Z
Learning: In `web/src/components/CasesDisplay/index.tsx`, the variables `numberDisputes` and `numberClosedDisputes` can sometimes be `NaN`, and should default to `0` using logical OR (`||`) to prevent display issues in the `StatsAndFilters` component.
Applied to files:
web/src/pages/Cases/CaseDetails/Voting/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsx
📚 Learning: 2025-09-30T17:18:12.895Z
Learnt from: jaybuidl
Repo: kleros/kleros-v2 PR: 2145
File: contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol:277-286
Timestamp: 2025-09-30T17:18:12.895Z
Learning: In DisputeKitClassicBase.sol's castCommit function, jurors are allowed to re-submit commits during the commit period. The implementation uses a commitCount variable to track only first-time commits (where commit == bytes32(0)) so that totalCommitted is not incremented when a juror updates their existing commit.
Applied to files:
web/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsx
📚 Learning: 2024-06-27T10:11:54.861Z
Learnt from: nikhilverma360
Repo: kleros/kleros-v2 PR: 1632
File: web/src/components/DisputeView/DisputeInfo/DisputeInfoList.tsx:37-42
Timestamp: 2024-06-27T10:11:54.861Z
Learning: `useMemo` is used in `DisputeInfoList` to optimize the rendering of `FieldItems` based on changes in `fieldItems`, ensuring that the mapping and truncation operation are only performed when necessary.
Applied to files:
web/src/pages/Cases/CaseDetails/Voting/Classic/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/index.tsxweb/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx
📚 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:
subgraph/core/subgraph.template.yaml
📚 Learning: 2024-11-19T05:31:48.701Z
Learnt from: Harman-singh-waraich
Repo: kleros/kleros-v2 PR: 1744
File: web/src/hooks/useGenesisBlock.ts:9-31
Timestamp: 2024-11-19T05:31:48.701Z
Learning: In `useGenesisBlock.ts`, within the `useEffect` hook, the conditions (`isKlerosUniversity`, `isKlerosNeo`, `isTestnetDeployment`) are mutually exclusive, so multiple imports won't execute simultaneously, and race conditions are not a concern.
Applied to files:
web/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsx
📚 Learning: 2024-12-09T12:36:59.441Z
Learnt from: Harman-singh-waraich
Repo: kleros/kleros-v2 PR: 1775
File: web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx:0-0
Timestamp: 2024-12-09T12:36:59.441Z
Learning: In the `StakeWithdrawButton` component, the transaction flow logic is tightly linked to component updates, so extracting it into a custom hook does not provide significant benefits.
Applied to files:
web/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx
🧬 Code graph analysis (9)
web/src/components/DisputeFeatures/Features/ArgentinaConsumerProtection.tsx (1)
web/src/components/DisputeFeatures/Features/index.tsx (2)
RadioInput(15-21)StyledRadio(25-29)
web/src/hooks/useDisputeKitAddresses.ts (1)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)
web/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsx (1)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)
web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx (1)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)
web/src/hooks/useVotingContext.tsx (2)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)web/src/consts/index.ts (1)
REFETCH_INTERVAL(9-9)
web/src/pages/Cases/CaseDetails/Voting/Classic/index.tsx (1)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)
web/src/pages/Cases/CaseDetails/Appeal/index.tsx (1)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)
web/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsx (1)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)
web/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx (2)
web/src/consts/disputeFeature.ts (1)
DisputeKits(33-33)web/src/hooks/useClassicAppealContext.tsx (1)
useSelectedOptionContext(119-119)
⏰ 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). (5)
- GitHub Check: Redirect rules - kleros-v2-testnet
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Pages changed - kleros-v2-testnet
- GitHub Check: hardhat-tests
- GitHub Check: Mend Security Check
🔇 Additional comments (25)
subgraph/core/subgraph.template.yaml (1)
231-267: Looks good. The data source configuration is correct.The new Argentina Consumer Protection dispute kit is properly configured. All event signatures match the contract implementation, handler functions exist to process all events, and the configuration structure aligns with other Classic-based dispute kit variants.
web/src/consts/index.ts (1)
50-50: LGTM! Clean enum addition.The new ArgentinaConsumerProtection dispute kit enum value follows the existing naming conventions and integrates well with the broader dispute kit infrastructure.
web/src/hooks/useVotingContext.tsx (3)
12-12: LGTM! Consistent hook import.The import follows the established pattern for dispute kit-specific hooks.
85-91: LGTM! Properly integrated hook call.The argentinaConsumerProtectionVoteResult hook follows the exact pattern of existing dispute kit integrations with proper conditional enabling and refetch configuration.
104-105: LGTM! Complete integration.The switch case and dependency array are properly updated to handle the new Argentina Consumer Protection dispute kit, maintaining consistency with the existing implementation pattern.
Also applies to: 115-115
web/src/hooks/useDisputeKitAddresses.ts (1)
22-22: LGTM! Proper configuration mapping.The new dispute kit mapping follows the established pattern and will be automatically resolved by the existing hook logic. The contract address key "disputeKitGatedArgentinaConsumerProtectionAddress" should be present in the generated contracts for proper resolution.
web/src/consts/disputeFeature.ts (3)
14-14: LGTM! Feature enum addition.The new ArgentinaConsumerProtection feature follows the camelCase naming convention for enum values.
42-47: LGTM! Proper feature grouping.ArgentinaConsumerProtection is correctly added to the Eligibility group, which is appropriate for this type of dispute kit feature. The formatting change (splitting the array) improves readability.
76-80: LGTM! Well-defined dispute kit configuration.The new dispute kit (id: 5) properly pairs ClassicVote with ArgentinaConsumerProtection features. The type is set to "general" which is appropriate for this use case.
web/src/pages/Cases/CaseDetails/Appeal/index.tsx (2)
56-59: LGTM! Correct dispute kit classification.ArgentinaConsumerProtection is appropriately classified as a "classic" dispute kit since it uses ClassicVote, ensuring it follows the same appeal flow as other classic kits.
70-70: LGTM! Proper prop forwarding.The disputeKitName prop is now passed to the Classic component, enabling downstream components to implement Argentina CP-specific logic when needed.
web/src/components/DisputeFeatures/Features/index.tsx (2)
10-10: LGTM! Consistent component import.The ArgentinaConsumerProtection component import follows the established pattern for feature components.
53-53: LGTM! Complete feature UI integration.The Argentina Consumer Protection feature is properly mapped to its UI component, following the same pattern as other features in the FeatureUIs registry.
web/src/pages/Cases/CaseDetails/Voting/index.tsx (2)
75-78: LGTM! Consistent dispute kit classification.ArgentinaConsumerProtection is correctly classified as a "classic" dispute kit for voting purposes, maintaining consistency with the appeal flow classification.
125-125: LGTM! Complete prop propagation.The disputeKitName is properly passed to the Classic voting component, enabling downstream commit/reveal components to implement Argentina CP-specific simulation paths.
web/src/pages/Cases/CaseDetails/Appeal/Classic/index.tsx (3)
5-5: LGTM! Required type import.The DisputeKits import is necessary for typing the new disputeKitName prop.
22-22: LGTM! Proper interface and prop handling.The disputeKitName prop is correctly typed as optional (DisputeKits?) and properly destructured in the component, enabling flexible handling when the kit name may not be available.
Also applies to: 25-25
53-58: LGTM! Complete prop forwarding to Fund.The disputeKitName is properly forwarded to the Fund component via spread props, completing the prop chain from the Appeal parent component down to Fund where Argentina CP-specific logic can be applied.
web/src/components/DisputeFeatures/Features/ArgentinaConsumerProtection.tsx (1)
9-20: LGTM!The component is well-structured and follows the established pattern for dispute feature components. The tooltip provides clear information about juror token requirements for this dispute kit.
web/src/pages/Cases/CaseDetails/Voting/Classic/index.tsx (1)
20-23: LGTM!Clean prop threading of
disputeKitNameto child components. The optional typing is appropriate since not all disputes will use this kit.Also applies to: 33-37
web/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx (1)
82-92: LGTM for the enable condition updates.The enable conditions correctly implement mutual exclusivity: Classic is disabled when
isGated || isArgentinaCP, Gated is disabled whenisArgentinaCP, and Argentina CP only enables whenisArgentinaCPis true.Also applies to: 95-106
web/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsx (2)
69-74: LGTM!The simulation function selection logic correctly prioritizes Argentina Consumer Protection over the gated check, following the expected three-way branching pattern.
86-101: Dependency array correctly updated.Including
disputeKitNameensures the callback is recomputed when the dispute kit changes.web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx (2)
92-97: LGTM!The simulation function selection mirrors the pattern in Commit.tsx, maintaining consistency across the voting flow components.
109-125: Dependency array correctly updated.Including
disputeKitNamein the dependency array ensures proper recomputation when switching between dispute kits.
| return isArgentinaCP | ||
| ? { | ||
| fundAppeal: fundAppealGated, | ||
| fundAppealConfig: fundAppealGatedConfig, | ||
| isLoading: isLoadingGated, | ||
| isError: isErrorGated, | ||
| data: fundAppealArgentinaCPConfig, | ||
| isLoading: isLoadingArgentinaCP, | ||
| isError: isErrorArgentinaCP, | ||
| fundAppeal: fundAppealArgentinaCP, | ||
| } | ||
| : { fundAppeal, fundAppealConfig, isLoading, isError }; | ||
| : isGated | ||
| ? { | ||
| fundAppeal: fundAppealGated, | ||
| fundAppealConfig: fundAppealGatedConfig, | ||
| isLoading: isLoadingGated, | ||
| isError: isErrorGated, | ||
| } | ||
| : { fundAppeal, fundAppealConfig, isLoading, isError }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return object key mismatch will break Argentina CP funding flow.
The Argentina CP branch returns data as the key for the config object, but the Gated and Classic branches return fundAppealConfig. The destructuring on line 167 expects fundAppealConfig, which will be undefined for Argentina CP disputes. This causes the button click handler (line 204) to silently fail since it checks fundAppealConfig.
🔎 Proposed fix
return isArgentinaCP
? {
- data: fundAppealArgentinaCPConfig,
+ fundAppealConfig: fundAppealArgentinaCPConfig,
isLoading: isLoadingArgentinaCP,
isError: isErrorArgentinaCP,
fundAppeal: fundAppealArgentinaCP,
}
: isGated📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| return isArgentinaCP | |
| ? { | |
| fundAppeal: fundAppealGated, | |
| fundAppealConfig: fundAppealGatedConfig, | |
| isLoading: isLoadingGated, | |
| isError: isErrorGated, | |
| data: fundAppealArgentinaCPConfig, | |
| isLoading: isLoadingArgentinaCP, | |
| isError: isErrorArgentinaCP, | |
| fundAppeal: fundAppealArgentinaCP, | |
| } | |
| : { fundAppeal, fundAppealConfig, isLoading, isError }; | |
| : isGated | |
| ? { | |
| fundAppeal: fundAppealGated, | |
| fundAppealConfig: fundAppealGatedConfig, | |
| isLoading: isLoadingGated, | |
| isError: isErrorGated, | |
| } | |
| : { fundAppeal, fundAppealConfig, isLoading, isError }; | |
| return isArgentinaCP | |
| ? { | |
| fundAppealConfig: fundAppealArgentinaCPConfig, | |
| isLoading: isLoadingArgentinaCP, | |
| isError: isErrorArgentinaCP, | |
| fundAppeal: fundAppealArgentinaCP, | |
| } | |
| : isGated | |
| ? { | |
| fundAppeal: fundAppealGated, | |
| fundAppealConfig: fundAppealGatedConfig, | |
| isLoading: isLoadingGated, | |
| isError: isErrorGated, | |
| } | |
| : { fundAppeal, fundAppealConfig, isLoading, isError }; |
🤖 Prompt for AI Agents
In web/src/pages/Cases/CaseDetails/Appeal/Classic/Fund.tsx around lines 121-135,
the Argentina CP branch returns the config under the key "data" while the Gated
and Classic branches return it as "fundAppealConfig", which makes the
destructuring on line 167 get undefined and breaks the click handler on line
204; update the Argentina CP return to use the same key name (fundAppealConfig)
and keep the returned object shape consistent with the other branches so
fundAppealConfig, fundAppeal, isLoading, and isError are always present.
| "DisputeKitShutter", | ||
| "DisputeKitGated", | ||
| "DisputeKitGatedShutter", | ||
| "DisputeKitGatedArgentinaConsumerProtection", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify that DisputeKitGatedArgentinaConsumerProtection artifact files exist in deployment directories
# Search for the artifact files across deployment directories
fd -e json "DisputeKitGatedArgentinaConsumerProtection" contracts/deployments/ 2>/dev/null | head -20Repository: kleros/kleros-v2
Length of output: 42
🏁 Script executed:
#!/bin/bash
# Check deployment directory structure and look for similar artifacts
echo "=== Checking if deployments directory exists ==="
ls -la contracts/deployments/ 2>/dev/null | head -20
echo -e "\n=== Searching for other DisputeKit artifacts ==="
fd -e json "DisputeKit" contracts/deployments/ 2>/dev/null | head -20
echo -e "\n=== Listing all deployment subdirectories ==="
find contracts/deployments -maxdepth 1 -type d 2>/dev/null | sortRepository: kleros/kleros-v2
Length of output: 3081
🏁 Script executed:
#!/bin/bash
# Read the wagmi.config.ts file to understand artifact processing
cat -n contracts/deployments/wagmi.config.ts | head -80Repository: kleros/kleros-v2
Length of output: 129
🏁 Script executed:
#!/bin/bash
# Find wagmi.config.ts
fd "wagmi.config.ts"
# Also read the file
echo -e "\n=== Reading web/wagmi.config.ts ==="
cat -n web/wagmi.config.ts | head -80Repository: kleros/kleros-v2
Length of output: 3583
🏁 Script executed:
#!/bin/bash
# Check git history for this file to understand intent
echo "=== Recent commits for web/wagmi.config.ts ==="
git log --oneline web/wagmi.config.ts | head -5
echo -e "\n=== Check if artifact was deployed to any network ==="
fd "DisputeKitGatedArgentinaConsumerProtection" contracts/deployments/
echo -e "\n=== Check all networks for count of DisputeKit artifacts ==="
for dir in contracts/deployments/*/; do
count=$(ls "$dir"DisputeKit* 2>/dev/null | wc -l)
echo "$(basename "$dir"): $count DisputeKit files"
doneRepository: kleros/kleros-v2
Length of output: 576
Missing deployment artifacts — this addition cannot be merged without corresponding JSON files.
DisputeKitGatedArgentinaConsumerProtection is added to vanillaArtifacts but deployment files for this artifact do not exist in any network directory (arbitrum/, arbitrumSepolia/, arbitrumSepoliaDevnet/, etc.). The artifact must be deployed and the resulting JSON files added to contracts/deployments/{network}/DisputeKitGatedArgentinaConsumerProtection.json (and any implementation/proxy variants) before this configuration can be merged.
🤖 Prompt for AI Agents
In web/wagmi.config.ts around line 30, you added
"DisputeKitGatedArgentinaConsumerProtection" to vanillaArtifacts but there are
no corresponding deployment JSONs; deploy the contract to each target network
and add the generated JSON files under
contracts/deployments/{network}/DisputeKitGatedArgentinaConsumerProtection.json
(include any proxy/implementation JSONs if applicable), then update the PR to
include those files so the config references real artifacts.


PR-Codex overview
This PR introduces the
ArgentinaConsumerProtectionfeature into the dispute kit system, updating various components, hooks, and configurations to accommodate this new feature. It enhances functionality related to voting and dispute management.Detailed summary
ArgentinaConsumerProtectiontoweb/src/consts/index.ts.web/wagmi.config.tswithDisputeKitGatedArgentinaConsumerProtection.useDisputeKitAddresses.ts.ArgentinaConsumerProtection.tsxcomponent with tooltip.AppealandVotingcomponents to includeArgentinaConsumerProtection.ArgentinaConsumerProtectionvoting logic.RevealandCommitcomponents.useFundAppealto manage funding forArgentinaConsumerProtection.disputeKitName.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.