-
Notifications
You must be signed in to change notification settings - Fork 50
Contracts: interfaces pragma set to any 0.8 solc version #2083
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
Conversation
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughUpdated Solidity version pragmas across multiple interfaces and one contract from ^0.8.24 to >=0.8.0 <0.9.0. No changes to interfaces, events, or function signatures. No logic modifications. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
❌ Deploy Preview for kleros-v2-university failed. Why did it fail? →
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
contracts/src/arbitration/interfaces/IArbitrableV2.sol(1 hunks)contracts/src/arbitration/interfaces/IArbitratorV2.sol(1 hunks)contracts/src/arbitration/interfaces/IDisputeKit.sol(1 hunks)contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol(1 hunks)contracts/src/arbitration/interfaces/IEvidence.sol(1 hunks)contracts/src/arbitration/interfaces/ISortitionModule.sol(1 hunks)contracts/src/gateway/interfaces/IForeignGateway.sol(1 hunks)contracts/src/gateway/interfaces/IHomeGateway.sol(1 hunks)contracts/src/rng/IRandomizer.sol(1 hunks)contracts/src/rng/RNG.sol(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-12-07T11:39:10.927Z
Learnt from: jaybuidl
PR: kleros/kleros-v2#1778
File: contracts/src/rng/ChainlinkRNG.sol:135-153
Timestamp: 2024-12-07T11:39:10.927Z
Learning: In the `contracts/src/rng/ChainlinkRNG.sol` contract, the `requestRandomness` function is restricted to being called only by the `SortitionModule`, which does not send concurrent requests. Therefore, it's acceptable not to handle multiple random number requests concurrently in this context.
Applied to files:
contracts/src/rng/RNG.sol
⏰ 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
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Pages changed - kleros-v2-testnet
- GitHub Check: Pages changed - kleros-v2-testnet
- GitHub Check: Redirect rules - kleros-v2-testnet-devtools
- GitHub Check: Header rules - kleros-v2-testnet-devtools
- GitHub Check: Pages changed - kleros-v2-testnet-devtools
- GitHub Check: Redirect rules - kleros-v2-neo
- GitHub Check: Header rules - kleros-v2-neo
- GitHub Check: Pages changed - kleros-v2-neo
- GitHub Check: contracts-testing
- GitHub Check: Analyze (javascript)
🔇 Additional comments (11)
contracts/src/arbitration/interfaces/IDisputeKit.sol (1)
3-3: Pragma update broadens compiler compatibility appropriately.The change from
^0.8.24to>=0.8.0 <0.9.0successfully expands compatibility to all 0.8.x versions while maintaining the exclusion of breaking changes in 0.9.x. This is consistent with the PR-wide approach to broaden compiler version support.contracts/src/arbitration/interfaces/IDisputeTemplateRegistry.sol (1)
3-3: Pragma update aligns with PR objectives.The compiler version range update from
^0.8.24to>=0.8.0 <0.9.0correctly broadens compatibility while maintaining interface stability. No functional changes are needed since this is a simple interface with basic function signatures.contracts/src/arbitration/interfaces/IArbitratorV2.sol (1)
3-3: Compiler version broadening is appropriate.The pragma update from
^0.8.24to>=0.8.0 <0.9.0expands compatibility to all 0.8.x versions, which is beneficial for broader ecosystem adoption. The interface definitions remain unchanged, preserving API compatibility.contracts/src/gateway/interfaces/IHomeGateway.sol (1)
3-3: Pragma modification enhances compatibility.The compiler version update maintains consistency with other interfaces in this PR by expanding from
^0.8.24to>=0.8.0 <0.9.0. This allows compilation with any 0.8.x version while avoiding potential breaking changes in 0.9.0.contracts/src/arbitration/interfaces/IArbitrableV2.sol (1)
3-3: Consistent pragma update across interfaces.The version range expansion from
^0.8.24to>=0.8.0 <0.9.0aligns with the PR's objective to standardize compiler compatibility across all interfaces. The change preserves interface integrity while improving accessibility.contracts/src/arbitration/interfaces/IEvidence.sol (1)
3-3: Pragma update follows established pattern.The compiler version broadening from
^0.8.24to>=0.8.0 <0.9.0is consistent with other interface updates in this PR. The simple interface structure requires no additional considerations for backward compatibility.contracts/src/rng/IRandomizer.sol (1)
3-3: Pragma standardization completed successfully.The update from
^0.8.24to>=0.8.0 <0.9.0completes the uniform compiler version standardization across the codebase. The interface functions remain unchanged, ensuring no breaking changes.contracts/src/rng/RNG.sol (1)
3-3: Pragma update maintains consistency.The compiler version change from
^0.8.24to>=0.8.0 <0.9.0aligns with the PR-wide standardization effort. The interface declarations remain unchanged, preserving compatibility with dependent contracts.contracts/src/arbitration/interfaces/ISortitionModule.sol (1)
3-3: Broadening pragma to 0.8.x for an interface is appropriateThis increases consumer compatibility without altering the ABI. No functional risk within the interface itself.
contracts/src/gateway/interfaces/IForeignGateway.sol (2)
3-3: LGTM: pragma widened to 0.8.xInterface surface and imports remain unchanged; widening the pragma for an interface is a safe, consumer-friendly change.
3-3: Confirm compatible Solidity pragmas across interfaces
contracts/src/arbitration/interfaces/IArbitratorV2.soldeclares
pragma solidity >=0.8.0 <0.9.0;
which cleanly intersects with the gateway’s>=0.8.0 <0.9.0.IReceiverGateway.solis imported from@kleros/vea-contractsand isn’t vendored in this repo. Please verify that itspragma soliditydirective also falls within>=0.8.0 <0.9.0to avoid compiler‐version mismatches.



PR-Codex overview
This PR updates the Solidity version pragma across multiple contract files to allow for a broader range of compatible compiler versions, specifically from
0.8.0to less than0.9.0.Detailed summary
pragma solidityfrom^0.8.24to>=0.8.0 <0.9.0in the following files:contracts/src/rng/RNG.solcontracts/src/arbitration/interfaces/IDisputeKit.solcontracts/src/arbitration/interfaces/IArbitrableV2.solcontracts/src/rng/IRandomizer.solcontracts/src/arbitration/interfaces/IEvidence.solcontracts/src/arbitration/interfaces/ISortitionModule.solcontracts/src/arbitration/interfaces/IDisputeTemplateRegistry.solcontracts/src/arbitration/interfaces/IArbitratorV2.solcontracts/src/gateway/interfaces/IHomeGateway.solcontracts/src/gateway/interfaces/IForeignGateway.solSummary by CodeRabbit