Closed parodime closed 1 month ago
The changes in this pull request focus on the FastBridgeV2
contract, specifically refining the handling of bridge transactions and exclusivity parameters. The bridge
function now conditionally sets exclusivityEndTime
based on the presence of a relayer address. The validation logic in _validateBridgeParams
has also been updated to enforce stricter conditions. Additionally, modifications were made to the test contracts, adjusting how exclusivityEndTime
is initialized and altering test function names for clarity.
File | Change Summary |
---|---|
packages/contracts-rfq/contracts/FastBridgeV2.sol |
Modified bridge and _validateBridgeParams functions to refine logic for exclusivityEndTime . |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.t.sol |
Removed createFixturesV2 function, affecting exclusivityEndTime initialization for transaction objects. |
packages/contracts-rfq/test/FastBridgeV2.Src.Exclusivity.Negative.t.sol |
Renamed test functions for clarity and removed revert expectations related to exclusivity parameters. |
packages/contracts-rfq/test/FastBridgeV2.t.sol |
Adjusted exclusivityEndTime for tokenTx and ethTx from block.timestamp to 0 . |
bridge()
function.FastBridgeV2
contract to support arbitrary calls with additional parameters.FastBridgeV2
contract.size/s
🐇 In the realm of bridges, we hop with glee,
Exclusivity's end time, now clearer to see.
With tests refined, and logic so bright,
Our transactions will dance in the soft moonlight! 🌙
Hooray for the changes, let’s celebrate,
For every new feature, we eagerly await! 🎉
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?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 34.85109%. Comparing base (
0651118
) to head (4d77ec2
). Report is 9 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Latest commit: |
4d77ec2
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ed963cbc.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-fbv2-exclusoffsetdefzer.sanguine-fe.pages.dev |
Previously if bridge was not intended to be exclusive it would still end up with exclusivityEndtime = block.timestamp as a default from excl offset being 0.
This is generally fine & efficient, except it adds reorg risk to even non-exclusive relays whereby the bridge params are dependent upon block.timestamp and will change if reorged into a different block.
This approach will instead pay slightly more gas to default to a static exclusivityEndtime value (0) if no exclusivity is intended - inferred by quoteRelayer being address 0
Summary by CodeRabbit
New Features
exclusivityEndTime
.Bug Fixes
Tests