Closed ChiTimesChi closed 2 months ago
The pull request introduces significant updates to the Solidity testing framework, particularly for the FastBridgeV2
contract. It modifies the GitHub Actions workflow for gas reporting, introduces new test contracts for benchmarking gas usage, and refactors existing test contracts to streamline functionality. The changes focus on enhancing the accuracy of gas cost estimations and improving the structure of the testing codebase.
File Path | Change Summary |
---|---|
.github/workflows/solidity.yml | Modified the GitHub Actions workflow to change the command for running tests and generating gas reports, focusing on a specific benchmark test instead of excluding failing tests. |
packages/contracts-rfq/test/FastBridgeV2.Dst.Base.t.sol | Introduced FastBridgeV2DstBaseTest with methods for setup, deployment, and token minting, along with relay functions. |
packages/contracts-rfq/test/FastBridgeV2.Dst.t.sol | Refactored FastBridgeV2DstTest to inherit from FastBridgeV2DstBaseTest , removing several methods and constants to streamline the contract. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Dst.t.sol | Added a gas benchmarking contract for destination chain functions, including test functions for evaluating gas costs associated with relaying tokens and ETH. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.PFees.t.sol | Introduced FastBridgeV2GasBenchmarkSrcProtocolFeesTest , overriding functions to set up protocol fee configurations and transaction parameters. |
packages/contracts-rfq/test/FastBridgeV2.GasBench.Src.t.sol | Created a comprehensive gas benchmarking test suite for source chain functions, including setup, transaction fixture creation, and multiple test functions for gas costs and functionality. |
packages/contracts-rfq/test/FastBridgeV2.Src.Base.t.sol | Introduced FastBridgeV2SrcBaseTest with constants, setup methods, and helper functions for bridging operations, enhancing the testing capabilities of the FastBridgeV2 contract. |
packages/contracts-rfq/test/FastBridgeV2.Src.t.sol | Refactored FastBridgeV2SrcTest to inherit from FastBridgeV2SrcBaseTest , removing several constants and functions, indicating a shift in the testing approach for bridging functionalities. |
FastBridge
deployment on testnets, related to testing workflow modifications in this PR.FastBridgeV2
to allow relay, prove, and claim functions to operate with different addresses, relevant to testing and gas reporting changes.FastBridgeV2
to store the relayer address during relay operations, aligning with the focus on gas usage in bridge transactions.FastBridgeV2
, pertinent to testing and gas reporting changes.M-ci
, size/m
, M-contracts
, needs-go-generate-services/rfq
π In the meadow where bunnies play,
New tests hop in, brightening the day!
Gas reports dance, with numbers so neat,
FastBridge flows, a testing feat!
With each little change, we leap and bound,
In the world of Solidity, joy is found! πΌ
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: dc091ceecf618707e72228d3c18ce6dfbbb1d2b7, compared to commit: 257e57c702c97ec6314390930609725e023848c2
Contract | Method | Avg (+/-) | % |
---|---|---|---|
FastBridgeV2 | bridge bridgeStatuses claim(bytes) claim(bytes,address) protocolFees relay(bytes) relay(bytes,address) |
-10,935 β
+571 β -9,794 β -8,320 β -699 β -9,613 β -20,402 β |
-12.18% +98.11% -15.97% -13.54% -37.91% -11.95% -22.26% |
Latest commit: |
129cde2
|
Status: | β Deploy successful! |
Preview URL: | https://11498d1f.sanguine-fe.pages.dev |
Branch Preview URL: | https://fix-gas-estimation-tests.sanguine-fe.pages.dev |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.94584%. Comparing base (
f0b13bc
) to head (129cde2
). Report is 10 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description Introduces a separate set of tests meant for accurate average gas estimation.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests