Skip to content

Commit

Permalink
test: rename zap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Oct 18, 2024
1 parent b0b0db4 commit 08c0bb8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {RecipientMock} from "./mocks/RecipientMock.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";

// solhint-disable func-name-mixedcase, ordering
contract FastBridgeV2DstArbitraryCallTest is FastBridgeV2DstExclusivityTest {
contract FastBridgeV2DstZapTest is FastBridgeV2DstExclusivityTest {
bytes public constant ZAP_DATA = abi.encode("Hello, world!");
bytes public constant REVERT_MSG = "GM, this is a revert";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import {FastBridgeV2GasBenchmarkDstTest} from "./FastBridgeV2.GasBench.Dst.t.sol
import {RecipientMock} from "./mocks/RecipientMock.sol";

// solhint-disable func-name-mixedcase, no-empty-blocks
contract FastBridgeV2GasBenchmarkDstArbitraryCallTest is FastBridgeV2GasBenchmarkDstTest {
contract FastBridgeV2GasBenchmarkDstZapTest is FastBridgeV2GasBenchmarkDstTest {
// To get an idea about how much overhead the Zap adds to the relaying process, we use a mock
// recipient that has the hook function implemented as a no-op.
// The mocked zapData are chosen to be similar to the real use cases:
// - user address
// - some kind of ID to decide what to do with the tokens next

/// @notice We include an empty "test" function so that this contract does not appear in the coverage report.
function testFastBridgeV2GasBenchmarkDstArbitraryCallTest() external {}
function testFastBridgeV2GasBenchmarkDstZapTest() external {}

function setUp() public virtual override {
// In the inherited tests userB is always used as the recipient of the tokens.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract FastBridgeV2GasBenchmarkEncodingTest is FastBridgeV2SrcBaseTest {
fastBridge.getBridgeTransactionV2(request);
}

function test_getBridgeTransactionV2_withArbitraryCall() public {
function test_getBridgeTransactionV2_withZap() public {
setTokenTestZapData({zapData: abi.encode(userA, keccak256("Random ID"))});
test_getBridgeTransactionV2();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity ^0.8.20;
import {FastBridgeV2GasBenchmarkSrcTest} from "./FastBridgeV2.GasBench.Src.t.sol";

// solhint-disable func-name-mixedcase, no-empty-blocks
contract FastBridgeV2GasBenchmarkSrcArbitraryCallTest is FastBridgeV2GasBenchmarkSrcTest {
contract FastBridgeV2GasBenchmarkSrcZapTest is FastBridgeV2GasBenchmarkSrcTest {
/// @notice We include an empty "test" function so that this contract does not appear in the coverage report.
function testFastBridgeV2GasBenchmarkSrcArbitraryCallTest() external {}
function testFastBridgeV2GasBenchmarkSrcZapTest() external {}

function createFixturesV2() public virtual override {
super.createFixturesV2();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.20;
import {FastBridgeV2SrcExclusivityTest} from "./FastBridgeV2.Src.Exclusivity.t.sol";

// solhint-disable func-name-mixedcase, ordering
contract FastBridgeV2SrcArbitraryCallTest is FastBridgeV2SrcExclusivityTest {
contract FastBridgeV2SrcZapTest is FastBridgeV2SrcExclusivityTest {
bytes public constant ZAP_DATA = abi.encode("Hello, World!");
uint256 public constant ZAP_NATIVE = 1_337_420;

Expand Down

0 comments on commit 08c0bb8

Please sign in to comment.