-
Notifications
You must be signed in to change notification settings - Fork 32
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
chore(contracts-rfq): gas bench script #3283
Conversation
WalkthroughThe pull request introduces significant updates to the GitHub Actions workflow for Solidity projects, specifically in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3283 +/- ##
=============================================
Coverage 90.77404% 90.77404%
=============================================
Files 60 60
Lines 1279 1279
Branches 159 159
=============================================
Hits 1161 1161
Misses 114 114
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
🧹 Outside diff range and nitpick comments (1)
.github/workflows/solidity.yml (1)
270-272
: Approve the change to use npm scripts for gas benchmarking.This change improves flexibility by allowing package-specific gas benchmarking scripts. The use of
--if-present
is a good practice for optional scripts.Consider adding a comment explaining the purpose of the
gas:bench
script for better maintainability.You could add a comment like this:
# Run gas benchmarking script if present in the package
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- .github/workflows/solidity.yml (1 hunks)
- packages/contracts-rfq/package.json (1 hunks)
🧰 Additional context used
@@ -20,6 +20,7 @@ | |||
"build:slither": "forge build --out=out --build-info --force", | |||
"test:coverage": "echo 'Please use foundry'", | |||
"test": "forge test", | |||
"gas:bench": "forge test --mc GasBenchmark --gas-report", |
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.
💡 Codebase verification
GasBenchmark contract not found
The new gas:bench
script references a GasBenchmark
contract, but no such contract exists in the codebase. Only GasBenchmarkTest
contracts are present.
- Verify if the intended contract name is
GasBenchmarkTest
and update the script accordingly.
🔗 Analysis chain
LGTM! Consider adding a description comment.
The new gas:bench
script is a valuable addition for gas usage benchmarking. It correctly uses Forge to run tests specifically for the GasBenchmark
contract and generates a gas report.
Consider adding a brief description comment above the script for clarity:
+ // Run gas benchmarking tests and generate a report
"gas:bench": "forge test --mc GasBenchmark --gas-report",
To ensure the script will work as intended, let's verify the existence of a GasBenchmark
contract in the test files:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for the existence of a GasBenchmark contract in test files
# Test: Search for a contract named GasBenchmark in Solidity test files
rg --type solidity -g 'test/**/*.sol' 'contract\s+GasBenchmark'
Length of output: 98
Script:
#!/bin/bash
# Description: Check for the existence of a GasBenchmark contract in Solidity test files
# Test: Search for a contract named GasBenchmark in .sol files within the test directory
rg -g '*.sol' 'contract\s+GasBenchmark' test/
Length of output: 93
Script:
#!/bin/bash
# Description: Check for the existence of a GasBenchmark contract in all Solidity files
# Test: Search for a contract named GasBenchmark in any .sol file
rg -g '*.sol' 'contract\s+GasBenchmark'
Length of output: 210
Deploying sanguine-fe with Cloudflare Pages
|
Description
A clear and concise description of the features you're adding in this pull request.
Additional context
Add any other context about the problem you're solving.
Metadata
Summary by CodeRabbit
New Features
@synapsecns/contracts-rfq
package.Improvements