-
Notifications
You must be signed in to change notification settings - Fork 30
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-rfq): CI workflows [SLT-245] #3178
Conversation
WalkthroughThe changes encompass updates to various configuration files and Solidity contracts within the project. Key modifications include upgrading the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 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 #3178 +/- ##
=============================================
Coverage 41.54443% 41.54443%
=============================================
Files 460 460
Lines 25770 25770
Branches 357 357
=============================================
Hits 10706 10706
Misses 14326 14326
Partials 738 738
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
|
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: 3
Outside diff range and nitpick comments (2)
packages/contracts-rfq/test/UniversalTokenLibHarness.sol (1)
6-6
: Approved, but consider adding a brief explanation.The addition of the
solhint-disable ordering
comment is acceptable for a test file. However, it would be helpful to briefly explain why this rule is being disabled.Consider adding a brief explanation, like this:
// solhint-disable ordering - Test harness requires flexible function ordering
packages/contracts-rfq/package.json (1)
1-30
: Summary of changes and recommendations.This PR introduces significant changes to the project configuration:
- Updated project name and license.
- Expanded scope of included files.
- Updated dependencies, removing prettier and updating solhint.
- Revised linting and formatting scripts to use forge and solhint.
These changes suggest a shift towards a more Solidity-focused toolchain and could significantly impact the development workflow. To ensure a smooth transition:
- Update all documentation to reflect the new project name, license, and development processes.
- Inform all team members about the changes in linting and formatting procedures.
- Review and update any CI/CD pipelines to use the new scripts and configurations.
- Consider running a team training session on the new tools and workflows.
- Monitor the impact of these changes on code quality and developer productivity in the coming weeks.
Given the shift in tooling, consider implementing a pre-commit hook using husky to run the new linting scripts automatically. This can help maintain code quality and consistency across the team.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (9)
- packages/contracts-core/package.json (1 hunks)
- packages/contracts-rfq/.solhint.json (1 hunks)
- packages/contracts-rfq/.solhintignore (1 hunks)
- packages/contracts-rfq/package.json (1 hunks)
- packages/contracts-rfq/test/FastBridgeV2.t.sol (1 hunks)
- packages/contracts-rfq/test/MockERC20.sol (1 hunks)
- packages/contracts-rfq/test/UniversalTokenLib.t.sol (1 hunks)
- packages/contracts-rfq/test/UniversalTokenLibHarness.sol (1 hunks)
- packages/solidity-devops/package.json (1 hunks)
Files skipped from review due to trivial changes (3)
- packages/contracts-rfq/test/FastBridgeV2.t.sol
- packages/contracts-rfq/test/MockERC20.sol
- packages/contracts-rfq/test/UniversalTokenLib.t.sol
Additional comments not posted (7)
packages/contracts-rfq/test/UniversalTokenLibHarness.sol (1)
Line range hint
8-10
: LGTM! New function correctly exposes library functionality.The
universalTransfer
function is a well-implemented wrapper for theUniversalTokenLib.universalTransfer
function. It correctly passes all parameters and is appropriately marked aspublic
for testing purposes.packages/contracts-rfq/package.json (4)
23-25
: Review updates to linting scripts.The linting scripts have been significantly updated:
- The
lint
script now usesforge fmt
andsolhint
.- A new
lint:check
script has been added for checking without fixing.- The
ci:lint
script now callslint:check
.These changes align with the removal of prettier and the update to solhint. Please ensure that:
- The new linting process meets the project's code quality standards.
- All developers are aware of the new linting commands and how to use them.
- CI/CD pipelines are updated to use the new
lint:check
script.To verify the effectiveness of the new linting setup:
#!/bin/bash # Run the new linting scripts and check for any issues echo "Running lint:check script:" npm run lint:check echo "Checking for any remaining prettier scripts or configs:" rg "prettier" package.json fd -e prettierrc -e prettier
27-28
: Review updates to solhint scripts.The solhint scripts have been updated:
- The
solhint
script now includes the--fix
option and removes the prompt.- A new
solhint:check
script has been added for checking without fixing.These changes provide more flexibility in how solhint is used, but also change the default behavior. Please ensure that:
- All developers are aware that running
npm run solhint
will now automatically fix issues without prompting.- The new
solhint:check
script is used in situations where automatic fixes are not desired (e.g., in CI/CD pipelines).- The removal of the prompt aligns with the team's workflow preferences.
To check the impact of these changes:
#!/bin/bash # Run solhint scripts and compare results echo "Running solhint:check script:" npm run solhint:check echo "Running solhint script (with --fix):" npm run solhint echo "Comparing results:" git diff
15-15
: Review changes in development dependencies.The following changes have been made to the devDependencies:
- solhint has been updated to version 5.0.3.
- prettier and prettier-plugin-solidity have been removed.
These changes suggest a shift in the project's linting and formatting strategy. Please ensure that:
- The update to solhint 5.0.3 is compatible with your project and doesn't introduce any breaking changes.
- The removal of prettier is intentional and aligns with the project's code style guidelines.
- Any CI/CD pipelines or developer workflows that depended on prettier have been updated accordingly.
To check the impact of these changes:
Verification successful
Verified changes to development dependencies.
The following changes have been confirmed:
solhint
has been updated to version5.0.3
.prettier
andprettier-plugin-solidity
have been removed.No remaining
prettier
configurations or usages were found in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for any remaining prettier configurations or usages echo "Checking for prettier configurations:" fd -e prettierrc -e prettier echo "Checking for prettier usage in scripts:" rg "prettier" package.jsonLength of output: 751
2-3
: Verify the project name and license changes.The project name has been updated to "@synapsecns/contracts-rfq" and the license has been changed to MIT. These are significant changes that may have broader implications:
- The name change suggests this package is now part of the @synapsecns organization. Ensure this aligns with the project's goals and structure.
- The license change from UNLICENSED to MIT is a major shift in terms of how the code can be used and distributed. Verify that this change is intentional and approved by the necessary stakeholders.
To confirm these changes are reflected in other parts of the project:
Verification successful
Package name and license changes are verified.
- The package name "@synapsecns/contracts-rfq" is correctly set in
packages/contracts-rfq/package.json
and not found elsewhere, as expected.- The license has been updated to MIT and is present in the
LICENSE
file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the new package name and license are consistently used # Check for package name in other configuration files echo "Checking for package name in other files:" rg "@synapsecns/contracts-rfq" --type yaml --type json # Check for MIT license in license file and other relevant places echo "Checking for MIT license:" rg "MIT" LICENSE* README*Length of output: 751
Script:
#!/bin/bash # Corrected script to check for package name and MIT license # Check for package name in other configuration files echo "Checking for package name '@synapsecns/contracts-rfq' in YAML and JSON files:" rg "@synapsecns/contracts-rfq" --type yaml --type json # Check for MIT license in license file and relevant documentation echo "Checking for 'MIT' license in LICENSE and README.md:" rg "MIT" LICENSE* README*Length of output: 549
packages/solidity-devops/package.json (1)
43-43
: Verify the major version update of solhint and its potential impacts.The solhint package has been updated from version ^4.5.4 to 5.0.3. This is a major version update which may include breaking changes. Please ensure this update is intentional and verify its compatibility with your project.
Consider the following actions:
- Check the solhint changelog for any breaking changes or new features that may affect your project.
- Run your linting tasks to ensure they still work as expected with the new version.
- Consider using flexible versioning (e.g., ^5.0.3) to allow for minor updates and patches, unless there's a specific reason to pin to this exact version.
packages/contracts-core/package.json (1)
31-31
: Verify compatibility with the major solhint upgrade.The solhint package has been upgraded from version 3.3.8 to 5.0.3, which is a major version change. This upgrade may introduce breaking changes or new linting rules that could affect your project.
Please ensure that:
- This upgrade is intentional and aligns with the project's goals.
- The solhint configuration (
.solhint.json
) has been updated to accommodate any new or changed rules.- The project's Solidity code complies with the new version's linting rules.
To verify the impact of this change, you can run the following script:
This script will help identify any new linting errors and confirm the installed version of solhint.
* update bl * remove global solidity extension settings * use monorepo support in global workspace only * - use Solidity extension for formatting *.sol files - use `forge fmt` as formatter in Solidity extension * REST API Improvements [SLT-179] (#3133) * fix swaptxinfo function * Updates test coverage command * migrating to using token addresses instead of symbols * fix linting errors * fixing swaptxinfocontroller * new tests and new functionality --------- Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> * Publish - @synapsecns/rest-api@1.0.75 - @synapsecns/synapse-interface@0.38.4 * fix harmony proxy (#3149) Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> * merging rfq indexer into monorepo [SLT-164] [SLT-176] (#3136) * merging rfq indexer into monorepo * nuke .env * fix commands * fix package name * test coverage script * rough pass at docs and some linting and fixes yarn * Upgrades wagmi & rainbowkit * indxer * Adds invisible but used packages * +recent-invalid-fills [SLT-188] * Moves wagmi to root * new endpoints and clean up linting --------- Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> Co-authored-by: parodime <jordan@protochainresearch.com> * Publish - @synapsecns/synapse-interface@0.38.5 - @synapsecns/rfq-indexer-api@1.0.2 - @synapsecns/rfq-indexer@0.0.2 * Adds /destinationTokens route [SLT-204] (#3151) * Adds /destinationTokens route * ZeroAddress & NativeGasAddress * Adds test for native gas tokens * Checksums incoming token address params * Publish - @synapsecns/rest-api@1.0.76 * boba pause (#3150) * boba pause * only boba to txns * Publish - @synapsecns/synapse-interface@0.38.6 * fix(synapse-interface): Reorders validation to check existence first (#3156) * Reorders validation to check existence first * Removes duplicates * Publish - @synapsecns/rest-api@1.0.77 * Fix boba pause (#3158) * Publish - @synapsecns/synapse-interface@0.38.7 * update bl * feat(rest-api): Adds Swagger for api docs [SLT-205] (#3159) * Adds Swagger for api docs * Replace prepended verb Get routes with nouns * Adds dev flag for swagger serverUrl * Publish - @synapsecns/rest-api@1.1.0 - @synapsecns/synapse-interface@0.38.8 - @synapsecns/rfq-indexer-api@1.0.3 - @synapsecns/rfq-indexer@0.0.3 * Pulls version from package json (#3160) * Publish - @synapsecns/rest-api@1.1.1 * Require vs import due to file location (#3161) * Require vs import due to file location * Publish - @synapsecns/rest-api@1.1.2 * Prevent caching of api docs (#3162) * Publish - @synapsecns/rest-api@1.1.3 * feat(contracts-rfq): relay/prove/claim with different address [SLT-130] (#3138) * init. solidity ^. FbV2 relay/prove/claim overloads * +IFastBridgeV2, explicit address0 cast, func scope & inheritdoc fixes * pragma lock, contract relabel * feat: start scoping V2 tests * test: override relayer role scenarios, no longer enforced by V2 * test: finish the parity test * test: the management methods * test: dst chain scenarios * test: bridge * test: prove * test: claim * test: dispute * test: refund * test: bridge reverts * remove redundant extend. rearrange inherit list * revert 0.8.20 in favor of user (non-ws) setting --------- Co-authored-by: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> * Publish - FastBridge@0.4.0 * fix(promexporter): make spans better (#3164) * move the errors * [goreleaser] * fix v to w * changing native token address standard [SLT-210] (#3157) * changing native token address standard * fixing tests * normalizeNativeTokenAddress middleware, additional tests --------- Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> * Publish - @synapsecns/rest-api@1.1.4 * Refactoring rfq-indexer API and adding swagger docs [SLT-228] (#3167) * refactoring and adding swagger * remove testing scripts * fix typos and consistency with 404 errors * Publish - @synapsecns/rfq-indexer-api@1.0.4 * fix read mes (#3168) * Publish - @synapsecns/contracts-core@1.0.32 - FastBridge@0.4.1 - @synapsecns/solidity-devops@0.4.5 * fix(opbot): use submitter get tx status [SLT-158] (#3134) * use experimental logger to debug * fix lint * [goreleaser] * use submitter instead of client * [goreleaser] * [goreleaser] * fix(synapse-interface): Additional checks on screen [SLT-166] (#3152) * Additional checks on screen * Adds checks on chain/token changes * Publish - @synapsecns/synapse-interface@0.38.9 * feat(synapse-interface): confirm new price [SLT-150] (#3084) * add bridge quote history middleware * request user confirm changes when quoted price updates * add conditions for displaying confirm change state * track initial quote initializing confirm change state * specify output delta threshold * callback functions to handle initialize/accept/reset confirm changes flow * quote countdown timer animation to signal refresh * implement automatic refresh intervals * mouse move to refresh automatic intervals * add i8n translations for button text --------- Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> * Publish - @synapsecns/synapse-interface@0.39.0 * fix: formatted bridge fee amount (#3165) * Publish - @synapsecns/rest-api@1.1.5 * fix(contracts-rfq): CI workflows [SLT-245] (#3178) * fix: license, files * fix: package name * build: update solhint to latest * build: remove prettier dependencies * fix: solhint workflows * build: update solhint in other packages as well * chore: solhint rules, exceptions * fix: silence linter warnings in tests * chore: forge fmt * add variable to test linter CI * Revert "add variable to test linter CI" This reverts commit 0629309. * Publish - @synapsecns/contracts-core@1.0.33 - @synapsecns/contracts-rfq@0.5.0 - @synapsecns/solidity-devops@0.4.6 * feat(api): bridge limits [SLT-165] (#3179) * adds `/bridgeLimits` route, controller * fetch best sdk quote for min/max origin amounts * add tests * implement middleware to normalize addresses * adds swagger doc * Publish - @synapsecns/rest-api@1.2.0 * fix(contracts-rfq): limit the amount of solhint warnings [SLT-245] (#3182) * ci: limit the amount of solhint warnings * refactor: move the errors into the separate interface * refactor: errors imports in tests * Publish - @synapsecns/contracts-rfq@0.5.1 * ci: Solidity gas diff [SLT-259] (#3181) * ci: run tests w/o coverage first for better visibility * test: malform the test to check the adjusted workflow * Revert "test: malform the test to check the adjusted workflow" This reverts commit e7db6e1. * ci: add gas-diff workflow * try changing the contract to trigger gas diffs * retrigger the workflow * ci: provide the correct report path * ci: run on pull requests only * ci: save gas reports in monorepo root * Revert "ci: run on pull requests only" This reverts commit 0a01d60. * Revert "try changing the contract to trigger gas diffs" This reverts commit 91bc03e. * refactor: wrap if statement * refactor: exclude `solidity-devops` package in a more generic way * ci: run tests w/o coverage for `solidity-devops`, add comments * add generic comment to trigger `solidity-devops` workflows * Revert "add generic comment to trigger `solidity-devops` workflows" This reverts commit cc35a43. * Publish - @synapsecns/contracts-rfq@0.5.2 * fix(contracts-core): set very high gas limit for intensive tests [SLT-259] (#3186) * fix: set very high gas limit for intensive tests * ci: speed up solidity coverage * Publish - @synapsecns/contracts-core@1.0.34 * feat(rest-api): Adds validateRouteExists validation [SLT-260] (#3180) * Adds validateRouteExists validation * Remove timeouts for 400s * Publish - @synapsecns/rest-api@1.3.0 * add duplicate command warning (#3174) Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> * reduce solhint warnings on FbV2 (#3189) * reduce solhint warnings on FbV2 * fix whitespace * Publish - @synapsecns/contracts-rfq@0.5.3 * ci: solidity gas diff options [SLT-267] (#3193) * ci: ignore test files in gas diff report * add some changes to the test files * ci: define some options for gas-diff * try changing the contract to trigger gas diffs * Revert "try changing the contract to trigger gas diffs" This reverts commit 4504e3c. * Revert "add some changes to the test files" This reverts commit 7e7d6cb. * prove w/ tx id [SLT-181] (#3169) * prove w/ tx id SLT-181 * +proveOther tests, forge fmt * fmt * fmt * Publish - @synapsecns/contracts-rfq@0.5.4 * fix(sdk-router): disable ARB airdrop tests (#3195) * Publish - @synapsecns/rest-api@1.3.1 - @synapsecns/sdk-router@0.11.2 - @synapsecns/synapse-interface@0.39.1 - @synapsecns/widget@0.7.2 * Fixing issue for wallet integration [SLT-270] (#3194) * slight modification to graphql call * fixing explorer frontend as well * Publish - @synapsecns/explorer-ui@0.3.3 - @synapsecns/rest-api@1.3.2 * store relayer on relay [SLT-182] (#3170) * store relayer on relay [SLT-182] * +tests, zeroAddr check, fmt * Publish - @synapsecns/contracts-rfq@0.5.5 * Adjust text to trigger build (#3199) * Publish - @synapsecns/synapse-interface@0.39.2 * feat(synapse-interface): refund RFQ transaction [SLT-272] (#3197) * Txn transaction refund tracking * Update store to support tracking * Query FastBridge contract for `bridgeStatuses` to find refund status * Track bridge transaction `bridgeQuote.routerAddress` in store * Fetch FastBridge contract address when only provided router address * add translations --------- Co-authored-by: aureliusbtc <82057759+aureliusbtc@users.noreply.github.com> Co-authored-by: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> Co-authored-by: Defi-Moses <Defi-Moses@users.noreply.github.com> Co-authored-by: trajan0x <83933037+trajan0x@users.noreply.github.com> Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> Co-authored-by: parodime <jordan@protochainresearch.com> Co-authored-by: abtestingalpha <104046418+abtestingalpha@users.noreply.github.com> Co-authored-by: abtestingalpha <abtestingalpha@users.noreply.github.com> Co-authored-by: parodime <parodime@users.noreply.github.com> Co-authored-by: vro <168573323+golangisfun123@users.noreply.github.com> Co-authored-by: ChiTimesChi <ChiTimesChi@users.noreply.github.com> Co-authored-by: bigboydiamonds <57741810+bigboydiamonds@users.noreply.github.com> Co-authored-by: bigboydiamonds <bigboydiamonds@users.noreply.github.com>
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
FastBridge
functionality with new contracts, interfaces, and test suites.universalTransfer
function to theUniversalTokenLibHarness
contract.IncorrectlyNamedVariable
in theFastBridgeV2
contract.Bug Fixes
Chores
solhint
package to version 5.0.3 for improved linting capabilities.package.json
for clarity and organization.