Closed ChiTimesChi closed 2 months ago
The pull request introduces updates to the FastBridgeV2
contract and its associated interfaces, enhancing transaction handling with new structures for exclusivity parameters. Key changes include the addition of a new interface IFastBridgeV2
, modifications to existing function signatures, and updates to the testing framework to accommodate the new transaction structures. These changes refine the bridge mechanism, ensuring improved management of transaction exclusivity and validation processes.
Files | Change Summary |
---|---|
packages/contracts-rfq/contracts/FastBridgeV2.sol |
Added getBridgeTransactionV2 function, overloaded bridge function with new parameters, modified transaction request structure to include exclusivity fields, and updated relay function logic. |
packages/contracts-rfq/contracts/interfaces/IFastBridgeV2.sol |
Introduced BridgeParamsV2 and BridgeTransactionV2 structs, added BridgeQuoteDetails event, and updated bridge function signature. |
packages/contracts-rfq/test/FastBridgeV2.t.sol |
Updated tests to transition from IFastBridge to IFastBridgeV2 , modified function signatures to use BridgeTransactionV2 , and added new tests for exclusivity handling. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.t.sol |
Updated tests to reflect changes in transaction handling and added new tests for exclusivity scenarios in bridging tokens and ETH. |
packages/contracts-rfq/test/FastBridgeV2.Src.Exclusivity.t.sol |
Implemented exclusivity parameters in tests for both token and ETH transactions, ensuring correct handling of exclusivity conditions and reverts. |
packages/contracts-rfq/test/FastBridgeV2.Src.Exclusivity.Negative.t.sol |
Added tests to validate negative scenarios for exclusivity parameters, checking for expected reverts under incorrect conditions. |
FastBridgeRouterV2
contract, which is directly related to the changes made in the main PR regarding the new IFastBridgeV2
interface and its associated structures.FastBridgeV2
contract by implementing overloads for the relay, prove, and claim functions, which aligns with the modifications made in the main PR regarding the new interface and transaction structures.FastBridgeV2
contract to store detailed information about relay transactions, which is relevant to the changes in transaction handling in the main PR.FastBridgeV2
contract, which is closely related to the changes in transaction structures and handling in the main PR.FastBridgeV2
functionalities, ensuring that the changes in the main PR are also covered in terms of performance metrics.FastBridgeV2
contract, which is directly related to the code quality improvements made in the main PR.javascript
, Sol
, Typescript
π° In the meadow, where bunnies play,
A bridge was built, brightening the day.
With exclusivity and new paths to roam,
Tokens and ETH now find their home.
So hop along, let the relayers cheer,
For FastBridgeV2 is finally here! π
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?
Generated at commit: 7acdf381c46fc911287304b67092a609387d62a6, compared to commit: eead134ff4d19554413efdab732c38e9d90fe763
Contract | Method | Avg (+/-) | % |
---|---|---|---|
FastBridgeV2 | bridgeProofs claim(bytes) claim(bytes,address) prove(bytes,bytes32) relay(bytes) |
+22 β +524 β +634 β +337 β +664 β |
+3.65% +1.05% +1.23% +0.97% +0.94% |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.35088%. Comparing base (
f0b13bc
) to head (ad5bd73
). Report is 21 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Changes will increase total bundle size by 407.1kB (1.14%) :arrow_up:. This is within the configured threshold :white_check_mark:
βΉοΈ *Bundle size includes cached data from a previous commit
Gas diffs will be much closer to the true values once #3204 is merged
Description User should be able to provide new fields for the
bridge()
function (field names are tentative):Old
bridge()
function should be preserved, by using the default empty/zero values for these fields.Objective:
quoteRelayer
to have exclusive fill rights until exclusivity deadline.Summary by CodeRabbit
New Features
FastBridgeV2
contract with enhanced transaction handling capabilities.BridgeQuoteDetails
to log bridge quote details with unique identifiers.Bug Fixes
Tests