-
Notifications
You must be signed in to change notification settings - Fork 46
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
fix(contracts): fix ruler arbitrator deploy script #1675
Conversation
WalkthroughThis update introduces significant modifications to the Kleros arbitration contracts, enhancing dispute management capabilities. Key changes include a reorganization of utility imports, updates to the Solidity version for improved performance, and a shift from using constants in an external library to directly defined constants within the contracts. These adjustments aim to streamline the code and maintain functionality while supporting better arbitration processes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DisputeResolver
participant DisputeResolverRuler
participant KlerosCoreRuler
User->>DisputeResolver: Request Dispute Creation
DisputeResolver->>DisputeResolverRuler: Call _createDispute()
DisputeResolverRuler->>KlerosCoreRuler: Verify Parameters
KlerosCoreRuler->>KlerosCoreRuler: Process Dispute
KlerosCoreRuler-->>DisputeResolverRuler: Return Dispute ID
DisputeResolverRuler-->>DisputeResolver: Emit Dispute Request Event
DisputeResolver-->>User: Confirm Dispute Created
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
❌ Deploy Preview for kleros-v2-university failed. Why did it fail? →
|
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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: 0
Outside diff range, codebase verification and nitpick comments (1)
contracts/src/arbitration/devtools/KlerosCoreRuler.sol (1)
7-7
: Remove unused importConstants.sol
.The
Constants.sol
library is no longer used in this file. Consider removing the import statement to clean up the code.- import "../../libraries/Constants.sol";
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- contracts/deploy/00-home-chain-arbitration-ruler.ts (1 hunks)
- contracts/src/arbitration/devtools/DisputeResolverRuler.sol (1 hunks)
- contracts/src/arbitration/devtools/KlerosCoreRuler.sol (7 hunks)
Files skipped from review due to trivial changes (1)
- contracts/deploy/00-home-chain-arbitration-ruler.ts
Additional comments not posted (11)
contracts/src/arbitration/devtools/DisputeResolverRuler.sol (1)
10-10
: Update Solidity version pragma.The Solidity version pragma has been updated to
0.8.24
. Ensure that this version is compatible with all dependencies and that any new features or changes in this version are accounted for in the contract logic.contracts/src/arbitration/devtools/KlerosCoreRuler.sol (10)
264-264
: EnsureFORKING_COURT
is correctly defined.The constant
FORKING_COURT
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
518-518
: EnsureNATIVE_CURRENCY
is correctly defined.The constant
NATIVE_CURRENCY
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
650-650
: EnsureGENERAL_COURT
is correctly defined.The constant
GENERAL_COURT
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
389-389
: EnsureNATIVE_CURRENCY
is correctly defined.The constant
NATIVE_CURRENCY
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
190-190
: EnsureFORKING_COURT
is correctly defined.The constant
FORKING_COURT
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
575-575
: EnsureGENERAL_COURT
is correctly defined.The constant
GENERAL_COURT
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
3-3
: Update Solidity version pragma.The Solidity version pragma has been updated to
0.8.24
. Ensure that this version is compatible with all dependencies and that any new features or changes in this version are accounted for in the contract logic.
656-656
: EnsureNULL_DISPUTE_KIT
is correctly defined.The constant
NULL_DISPUTE_KIT
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
657-657
: EnsureDISPUTE_KIT_CLASSIC
is correctly defined.The constant
DISPUTE_KIT_CLASSIC
is now used directly. Verify that it is correctly defined within the contract or imported from another source.
654-654
: EnsureDEFAULT_NB_OF_JURORS
is correctly defined.The constant
DEFAULT_NB_OF_JURORS
is now used directly. Verify that it is correctly defined within the contract or imported from another source.Verification successful
DEFAULT_NB_OF_JURORS
is correctly defined.The constant
DEFAULT_NB_OF_JURORS
is defined incontracts/src/libraries/Constants.sol
asuint256 constant DEFAULT_NB_OF_JURORS = 3;
. This definition is suitable for use across multiple contracts, includingKlerosCoreRuler.sol
. Ensure that it is imported correctly where needed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify definition of `DEFAULT_NB_OF_JURORS`. # Test: Check for the definition of `DEFAULT_NB_OF_JURORS`. # Expect: Definition found within the contract or imported. grep -r "DEFAULT_NB_OF_JURORS" contracts/src/arbitration/devtools/ | grep -v "Constants"Length of output: 292
Script:
#!/bin/bash # Search for the definition of `DEFAULT_NB_OF_JURORS` in the entire codebase. rg "DEFAULT_NB_OF_JURORS" --type solidityLength of output: 74
Script:
#!/bin/bash # Search for the definition of `DEFAULT_NB_OF_JURORS` in Solidity files across the codebase. rg "DEFAULT_NB_OF_JURORS" --glob "*.sol"Length of output: 1374
Code Climate has analyzed commit 433ee64 and detected 0 issues on this pull request. View more on Code Climate. |
Quality Gate passedIssues Measures |
This PR fixes #1517 issue
PR-Codex overview
This PR updates the file
00-home-chain-arbitration-ruler.ts
by renaming the import fromdeployERC20AndFaucet
todeployTokens
.Detailed summary
deployERC20AndFaucet
todeployTokens
Summary by CodeRabbit
New Features
KlerosCoreRuler
smart contract, improving readability.Bug Fixes
Chores