Closed parodime closed 2 months ago
The pull request introduces modifications to the refund
function in the FastBridgeV2
contract, adding a status check to ensure that only transactions in the REQUESTED
state can be refunded. Additionally, it updates test cases by removing skip directives, allowing them to run and verify the new revert conditions. These changes ensure proper handling of refunds based on transaction status.
Files | Change Summary |
---|---|
packages/contracts-rfq/contracts/FastBridgeV2.sol |
Modified the refund function to include a check for bridgeStatuses[transactionId] being BridgeStatus.REQUESTED before processing refunds, with an updated comment for clarity. |
packages/contracts-rfq/test/FastBridgeV2.Src.t.sol |
Replaced ethTx with tokenTx in several test cases and removed skip directives from three test functions, enabling them to execute and verify the expected revert conditions related to the refund function under various transaction statuses. |
refund
function in the main PR are directly related to the refund
function introduced in PR #3138, as both involve the handling of refunds within the FastBridgeV2
contract.FastBridgeV2
contract by storing detailed information about relay transactions, which may interact with the refund
functionality by ensuring that only valid transactions can be refunded based on their relay status.FastBridgeV2
contract, including modifications that may indirectly affect the clarity and maintainability of the refund
function's implementation.size/s
, Sol
, Typescript
In the meadow where bunnies play,
A contract now finds a clearer way.
With checks in place, no more to stray,
Refunds will hop without delay!
So let us cheer, with joy we say,
For code that's bright as a sunny day! 🐰✨
Latest commit: |
8388836
|
Status: | ✅ Deploy successful! |
Preview URL: | https://78f2eec2.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-fbv2-refundcheckvalidat.sanguine-fe.pages.dev |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 38.42159%. Comparing base (
e897b18
) to head (8388836
). Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Changes will decrease total bundle size by 16.13kB (-0.05%) :arrow_down:. This is within the configured threshold :white_check_mark:
ℹ️ *Bundle size includes cached data from a previous commit
Description rearrange refund validation checks - Check transaction status first then check secondaries
Summary by CodeRabbit
New Features
Bug Fixes