-
Notifications
You must be signed in to change notification settings - Fork 33
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
refactor(contracts-rfq): relax pragmas #3381
Conversation
WalkthroughThe primary change in this pull request involves updating the Solidity version pragma across multiple files from Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (17)
✅ Files skipped from review due to trivial changes (15)
🧰 Additional context used📓 Learnings (1)packages/contracts-rfq/contracts/interfaces/IFastBridgeV2.sol (1)
🪛 GitHub Check: Slitherpackages/contracts-rfq/contracts/interfaces/IAdmin.sol[warning] 2-2: Incorrect versions of Solidity [warning] 2-2: Incorrect versions of Solidity 🔇 Additional comments (1)packages/contracts-rfq/contracts/interfaces/IFastBridgeV2.sol (1)
Potential issues with downgrading Solidity compiler version to Changing the pragma from Run the following script to identify any code that may be incompatible with Solidity Please review any matches and adjust the code accordingly to ensure compatibility with Solidity ✅ Verification successfulSolidity version downgrade to ^0.8.4 is safe for this interface file The verification shows that:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Find Solidity code using features introduced after version 0.8.4.
# Search for user-defined value types (introduced in 0.8.8)
ast-grep --pattern $'type $_ is $_;' --lang solidity
# Search for external function calls to private methods (changed in 0.8.6)
ast-grep --pattern $'function $_($_) private' --lang solidity
# Search for try/catch on external function calls returning multiple variables (added in 0.8.10)
ast-grep --pattern $'try $_($_) returns ($_,$_) {} catch {}' --lang solidity
Length of output: 545 Script: #!/bin/bash
# Let's try a different approach using ripgrep to search for Solidity features
# Search for user-defined value types (introduced in 0.8.8)
echo "=== Searching for user-defined value types ==="
rg "type\s+\w+\s+is\s+\w+" -t sol
# Search for try-catch blocks with multiple returns (added in 0.8.10)
echo -e "\n=== Searching for try-catch with multiple returns ==="
rg "try\s+\w+\s*\([^)]*\)\s+returns\s*\([^)]*,.*\)" -t sol
# Search for custom errors (introduced in 0.8.4)
echo -e "\n=== Searching for custom errors ==="
rg "error\s+\w+\s*\([^)]*\)" -t sol
# Search for push with value (introduced in 0.8.7)
echo -e "\n=== Searching for array push with value ==="
rg "\.push\s*\([^)]+\)" -t sol
# Get all pragma versions in the codebase
echo -e "\n=== All pragma versions in the codebase ==="
rg "pragma solidity" -t sol
Length of output: 856 Script: #!/bin/bash
# Let's try without file type filtering since 'sol' is not recognized
# Search for user-defined value types (introduced in 0.8.8)
echo "=== Searching for user-defined value types ==="
rg "type\s+\w+\s+is\s+\w+" "packages/contracts-rfq"
# Search for try-catch blocks with multiple returns (added in 0.8.10)
echo -e "\n=== Searching for try-catch with multiple returns ==="
rg "try\s+\w+\s*\([^)]*\)\s+returns\s*\([^)]*,.*\)" "packages/contracts-rfq"
# Search for custom errors (introduced in 0.8.4)
echo -e "\n=== Searching for custom errors ==="
rg "error\s+\w+\s*\([^)]*\)" "packages/contracts-rfq"
# Search for push with value (introduced in 0.8.7)
echo -e "\n=== Searching for array push with value ==="
rg "\.push\s*\([^)]+\)" "packages/contracts-rfq"
# Get all pragma versions in the codebase
echo -e "\n=== All pragma versions in the codebase ==="
rg "pragma solidity" "packages/contracts-rfq"
Length of output: 11555 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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.20; | |||
pragma solidity ^0.8.4; |
Check warning
Code scanning / Slither
Incorrect versions of Solidity Warning
- FullInlinerNonExpressionSplitArgumentEvaluationOrder
- MissingSideEffectsOnSelectorAccess
- AbiReencodingHeadOverflowWithStaticArrayCleanup
- DirtyBytesArrayToStorage
- DataLocationChangeInInternalOverride
- NestedCalldataArrayAbiReencodingSizeValidation
- SignedImmutables.
It is used by:
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
@@ -1,5 +1,5 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.20; | |||
pragma solidity ^0.8.4; |
Check warning
Code scanning / Slither
Incorrect versions of Solidity Warning
- FullInlinerNonExpressionSplitArgumentEvaluationOrder
- MissingSideEffectsOnSelectorAccess
- AbiReencodingHeadOverflowWithStaticArrayCleanup
- DirtyBytesArrayToStorage
- DataLocationChangeInInternalOverride
- NestedCalldataArrayAbiReencodingSizeValidation
- SignedImmutables.
It is used by:
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
- ^0.8.4
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3381 +/- ##
===================================================
+ Coverage 33.20876% 34.79226% +1.58350%
===================================================
Files 544 530 -14
Lines 34786 33792 -994
Branches 82 82
===================================================
+ Hits 11552 11757 +205
+ Misses 22216 21020 -1196
+ Partials 1018 1015 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Deploying sanguine-fe with Cloudflare Pages
|
Description
Allows easier external integration + reusing 0.8.17
DefaultRouter
template for FastBridgeV2Router later on.Summary by CodeRabbit
New Features
IFastBridgeV2
interface with new structures for improved transaction handling.Bug Fixes
Documentation
IFastBridgeV2
interface.Chores
^0.8.20
to^0.8.4
across all relevant files for better compiler compatibility.