synapsecns / sanguine

Synapse Monorepo
MIT License
41 stars 30 forks source link

refactor(contracts-rfq): docs cleanup [SLT-493] #3405

Closed ChiTimesChi closed 23 hours ago

ChiTimesChi commented 1 day ago

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

coderabbitai[bot] commented 1 day ago

Walkthrough

The changes in this pull request involve extensive documentation updates and code refinements across multiple contracts, including AdminV2, FastBridgeV2, and various interfaces. Key modifications include improved comments for clarity, the addition of new functions, and updates to existing function signatures to enhance usability and maintainability. The changes do not alter the core functionality of the contracts but focus on improving the documentation and structure of the code.

Changes

File Path Change Summary
packages/contracts-rfq/contracts/AdminV2.sol Updated comments for constants and functions, changed constructor parameter from _owner to defaultAdmin, added @inheritdoc IAdminV2 to specific functions, clarified comments for sweepProtocolFees and _setCancelDelay.
packages/contracts-rfq/contracts/FastBridgeV2.sol Enhanced documentation, updated function signatures to include new parameters, added refund and cancel functions, refined internal methods, and improved error handling in claim.
packages/contracts-rfq/contracts/interfaces/IAdminV2.sol Added three new functions: setCancelDelay, setProtocolFeeRate, and sweepProtocolFees, with descriptive comments.
packages/contracts-rfq/contracts/interfaces/IFastBridgeV2.sol Updated comment for NULL status in BridgeStatus enum and refined comments in BridgeParamsV2 struct.
packages/contracts-rfq/contracts/interfaces/IMulticallTarget.sol Added multicallNoResults and multicallWithResults functions for batch call execution, with refined documentation.
packages/contracts-rfq/contracts/interfaces/IZapRecipient.sol Introduced new interface IZapRecipient and defined the zap function with clear documentation.
packages/contracts-rfq/contracts/libs/BridgeTransactionV2.sol Minor documentation update for validateV2 function, no functional changes.
packages/contracts-rfq/contracts/utils/MulticallTarget.sol Updated comments for clarity, added @inheritdoc IMulticallTarget to functions, and refined descriptions.

Possibly related PRs

Suggested labels

M-docs, size/xs

Suggested reviewers

Poem

🐰 In the code where rabbits play,
Documentation brightens the day.
Functions refined, clarity found,
With each change, our joy is unbound!
Hops of progress, leaps of cheer,
In the world of contracts, we persevere! πŸ‡


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?

❀️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
πŸͺ§ Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 1 day ago

Changes to gas cost

Generated at commit: cdb7d8f693b64eca32304bcb8d58b4dde75275ee, compared to commit: 7932f416341a227db295c33f232efde89fd2c50c

🧾 Summary (50% most significant diffs)

Contract Method Avg (+/-) %
FastBridgeV2 relay(bytes)
relay(bytes,address)
-128 βœ…
-128 βœ…
-0.19%
-0.19%

Full diff report πŸ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **FastBridgeV2** | 3,459,478 (-10,388) | _relay(bytes)_
_relay(bytes,address)_ | 61,237 (-125)
61,689 (-125) | **-0.20%**
**-0.20%** | 67,688 (-128)
68,140 (-128) | **-0.19%**
**-0.19%** | 67,610 (-130)
68,062 (-130) | **-0.19%**
**-0.19%** | 76,799 (-134)
77,251 (-134) | **-0.17%**
**-0.17%** | 6 (0)
6 (0) |
cloudflare-workers-and-pages[bot] commented 1 day ago

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: aad9617
Status: βœ…  Deploy successful!
Preview URL: https://3544a3c7.sanguine-fe.pages.dev
Branch Preview URL: https://refactor-fbv2-cleanup.sanguine-fe.pages.dev

View logs

codecov[bot] commented 1 day ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 42.36502%. Comparing base (79a40b5) to head (aad9617). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3405 +/- ## =================================================== + Coverage 3.10368% 42.36502% +39.26134% =================================================== Files 44 87 +43 Lines 2932 3019 +87 Branches 0 82 +82 =================================================== + Hits 91 1279 +1188 + Misses 2838 1737 -1101 Partials 3 3 ``` | [Flag](https://app.codecov.io/gh/synapsecns/sanguine/pull/3405/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synapsecns) | Coverage Ξ” | | |---|---|---| | [packages](https://app.codecov.io/gh/synapsecns/sanguine/pull/3405/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synapsecns) | `90.44834% <ΓΈ> (?)` | | | [promexporter](https://app.codecov.io/gh/synapsecns/sanguine/pull/3405/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synapsecns) | `?` | | | [solidity](https://app.codecov.io/gh/synapsecns/sanguine/pull/3405/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synapsecns) | `98.86364% <100.00000%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synapsecns#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: