Closed ChiTimesChi closed 1 month ago
This pull request introduces several changes across multiple Solidity test files related to the FastBridgeV2
contract. Key updates include the addition of new test contracts for benchmarking gas overhead associated with arbitrary calls, renaming existing contracts for consistency, and modifications to functions that manage transaction parameters and nonce values. The changes enhance the testing framework to better simulate real-world scenarios and ensure proper functionality of the FastBridgeV2
contract.
File Path | Change Summary |
---|---|
packages/contracts-rfq/test/FastBridgeV2.GasBench.Dst.ArbitraryCall.t.sol |
Added contract FastBridgeV2GasBenchmarkDstArbitraryCallTest with overridden setUp and createFixturesV2 methods. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Dst.Excl.t.sol |
Renamed contracts and updated createFixturesV2 to call super.createFixturesV2() . |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Dst.t.sol |
Renamed contract from FastBridgeV2DstGasBenchmarkTest to FastBridgeV2GasBenchmarkDstTest . |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Encoding.t.sol |
Renamed contract to FastBridgeV2GasBenchmarkEncodingTest and added test_getBridgeTransactionV2_withArbitraryCall method. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.ArbitraryCall.t.sol |
Added contract FastBridgeV2GasBenchmarkSrcArbitraryCallTest with overridden createFixturesV2 method. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.PFees.t.sol |
Updated configureFastBridge to set protocol fee rate to 1% and adjusted createFixtures . |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.t.sol |
Modified nonce assignments and refactored test functions for bridging tokens and ETH. |
packages/contracts-rfq/test/FastBridgeV2.t.sol |
Added cheatSenderNonce function to manipulate sender's nonce. |
bridge()
function, relevant to the new gas benchmarking functionality.FastBridgeV2
contract to support arbitrary call parameters, directly relating to the new testing functionalities.M-ci
, size/m
, needs-go-generate-services/rfq
π In the realm of code, we leap and bound,
With tests and functions, new paths are found.
Gas benchmarks soaring, like rabbits in flight,
In the world of Solidity, we code through the night! πβ¨
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 32.29410%. Comparing base (
2b05e51
) to head (c4393fc
). Report is 12 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Latest commit: |
c4393fc
|
Status: | β Deploy successful! |
Preview URL: | https://03d6c40a.sanguine-fe.pages.dev |
Branch Preview URL: | https://test-fbv2-arbitrary-call-gas.sanguine-fe.pages.dev |
Generated at commit: 53d53a2ccac0268cf6560489d3c3abb40c2454b7, compared to commit: 6dd94ca5c4e9c8ec1263940d7ffff78096d90b2b
Contract | Method | Avg (+/-) | % |
---|---|---|---|
FastBridgeV2 | getBridgeTransactionV2 relay(bytes) relay(bytes,address) |
+147 β +1,653 β +1,653 β |
+3.49% +2.34% +2.33% |
Description
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests