-
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
Fix/rfq event regen #1800
Fix/rfq event regen #1800
Conversation
Important Auto Review SkippedAuto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe updates across the contracts and tests indicate a standardization of the Solidity version used, moving from a flexible version to a fixed one. Additionally, there's an expansion of event parameters within the Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fix/rfq-events #1800 +/- ##
====================================================
Coverage ? 52.09276%
====================================================
Files ? 367
Lines ? 24752
Branches ? 296
====================================================
Hits ? 12894
Misses ? 10620
Partials ? 1238
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.
lgtm!
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (2)
- services/rfq/contracts/fastbridge/fastbridge.contractinfo.json
- services/rfq/contracts/testcontracts/fastbridgemock/fastbridgemock.contractinfo.json
Files selected for processing (7)
- packages/contracts-rfq/contracts/Admin.sol (1 hunks)
- packages/contracts-rfq/contracts/FastBridge.sol (3 hunks)
- packages/contracts-rfq/contracts/interfaces/IAdmin.sol (1 hunks)
- packages/contracts-rfq/contracts/interfaces/IFastBridge.sol (2 hunks)
- packages/contracts-rfq/test/FastBridge.t.sol (15 hunks)
- packages/contracts-rfq/test/FastBridgeMock.sol (2 hunks)
- services/rfq/relayer/listener/listener_test.go (1 hunks)
Files skipped from review due to trivial changes (2)
- packages/contracts-rfq/contracts/Admin.sol
- services/rfq/relayer/listener/listener_test.go
Additional comments: 18
packages/contracts-rfq/contracts/interfaces/IAdmin.sol (1)
- 2-2: The pragma directive has been changed to
^0.8.0
, which allows the contract to be compiled with any version of the Solidity compiler greater than or equal to0.8.0
. Please ensure that all compiler versions in this range have been tested and are known to be safe for this contract.packages/contracts-rfq/contracts/interfaces/IFastBridge.sol (2)
2-2: The pragma directive has been changed to
^0.8.0
, which allows the contract to be compiled with any version of the Solidity compiler greater than or equal to0.8.0
. Please ensure that all compiler versions in this range have been tested and are known to be safe for this contract.27-51: The additional parameters in the
BridgeRequested
andBridgeRelayed
events provide more granularity and are consistent with the PR objectives to enhance the RFQ event generation process. These changes appear to be correctly implemented.packages/contracts-rfq/test/FastBridgeMock.sol (3)
- 56-103: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [46-69]
The changes in the
mockBridgeRequest
function correctly reflect the updatedBridgeRequested
event structure and are consistent with the PR objectives.
73-84: The
mockBridgeRequestRaw
function has been updated to use thegetBridgeTransaction
method and theemit
statement has been modified accordingly. This change is consistent with the updated event structure.91-100: The
mockBridgeRelayer
function's signature has been modified to include more detailed parameters, which aligns with the changes in the actualFastBridge
contract. Theemit
statement has been updated accordingly.packages/contracts-rfq/contracts/FastBridge.sol (3)
2-2: The pragma directive has been updated to a fixed version
0.8.20
. This is inconsistent with the other updated files which use^0.8.0
. Please clarify the rationale for this fixed version and ensure consistency across all contracts.110-120: The additional parameters in the
BridgeRequested
event provide more granularity and are consistent with the PR objectives to enhance the RFQ event generation process. These changes appear to be correctly implemented.152-162: The additional parameters in the
BridgeRelayed
event provide more granularity and are consistent with the PR objectives to enhance the RFQ event generation process. These changes appear to be correctly implemented.packages/contracts-rfq/test/FastBridge.t.sol (9)
- 363-372: The
BridgeRequested
event has been updated with new parameters. Ensure that all parts of the codebase that listen to this event are updated to handle the new parameters.Verification successful
The verification process has been completed, and the findings are as follows:
- The Go service handlers that process the
BridgeRequested
event have been identified, and they appear to be updated to handle the new parameters.- The Go contract bindings and TypeScript typechain files define the structure of the
BridgeRequested
event, including the new parameters as per the PR changes.Based on the information gathered, it can be concluded that the necessary parts of the codebase that interact with the
BridgeRequested
event have been updated to accommodate the new event parameters.* 387-397: The test `test_successfulBridge` correctly emits the updated `BridgeRequested` event with the new parameters. This change is consistent with the updated event signature.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the BridgeRequested event usage in the codebase to ensure compatibility with the new parameters. rg --type solidity "BridgeRequested" --files-with-matchesLength of output: 90
Script:
#!/bin/bash # Search for the BridgeRequested event usage in the codebase to ensure compatibility with the new parameters. rg "BridgeRequested" --files-with-matchesLength of output: 1042
Script:
#!/bin/bash # Check the usage of the BridgeRequested event in Solidity files. rg "BridgeRequested" --type solLength of output: 59
Script:
#!/bin/bash # Check the usage of the BridgeRequested event in Go files. rg "BridgeRequested" --type goLength of output: 95135
Script:
#!/bin/bash # Check the usage of the BridgeRequested event in TypeScript files. rg "BridgeRequested" --type tsLength of output: 1379
Script:
#!/bin/bash # Check the usage of the BridgeRequested event in Go files in more detail. rg "BridgeRequested" --type go -C 10Length of output: 190447
Script:
#!/bin/bash # Check the usage of the BridgeRequested event in TypeScript files in more detail. rg "BridgeRequested" --type ts -C 10Length of output: 15165
899-907: The
BridgeRelayed
event has been updated with new parameters. Ensure that all parts of the codebase that listen to this event are updated to handle the new parameters.937-939: The test
test_successfulRelayDestination
correctly emits the updatedBridgeRelayed
event with the new parameters. This change is consistent with the updated event signature.1183-1183: The
BridgeProofProvided
event is used in thetest_successfulRelayProof
function. Ensure that the logic for proof provision is correctly implemented and that the event is emitted as expected.1314-1316: The
BridgeDepositClaimed
event is used in thetest_successfulClaimOriginTokens
function. Verify that the event emission is correct and that the test logic accurately reflects the expected behavior when a deposit is claimed.1551-1551: The
BridgeProofDisputed
event is used in thetest_successfulDisputeProof
function. Confirm that the dispute logic is correctly tested and that the event is emitted appropriately.1648-1648: The
BridgeDepositRefunded
event is used in thetest_successfulRefund
function. Ensure that the refund logic is correctly tested and that the event is emitted appropriately.360-376: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-1648]
Overall, the test file has been updated to reflect the changes in the
BridgeRequested
andBridgeRelayed
events. Ensure that all tests are passing and that they cover all scenarios, including edge cases and failure modes.
* index event topics * relax interface pragmas, set contract pragmas to 0.8.20 * bridge params attrs in bridge requested event * update BridgeRelayed event for extra attrs * regen (#1800) Co-authored-by: Trajan0x <[email protected]> * disable depguard * refund to originSender only (#1802) * regen events (#1803) Co-authored-by: Trajan0x <[email protected]> * deploy w event updates * deploy to l1 * regen [goreleaser] * fix recording [goreleaser] * Change addresses to be checksummed. Update tests to pass with new set of contracts * end span [goreleaser] * use multiplier [goreleaser] * use multiplier [goreleaser] --------- Co-authored-by: Trajan0x <[email protected]> Co-authored-by: trajan0x <[email protected]> Co-authored-by: aureliusbtc <[email protected]>
Description
Regenerate #1650 events for #1778
Summary by CodeRabbit
New Features
BridgeRequested
andBridgeRelayed
to include additional transaction details.Refactor
0.8.20
for consistent compiler targeting.Tests
Documentation