Skip to content

Commit

Permalink
Fix formatting (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermyas authored Jan 1, 2024
1 parent 10b25cd commit eff7950
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 30 deletions.
16 changes: 12 additions & 4 deletions test/Setup.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ abstract contract Setup is Test {
vm.selectFork(fork[chainId]);

address receiverAdapter = address(
new WormholeReceiverAdapter{salt: _salt}(WORMHOLE_RELAYERS[i], srcChainId, contractAddress[chainId][bytes("GAC")])
new WormholeReceiverAdapter{salt: _salt}(
WORMHOLE_RELAYERS[i], srcChainId, contractAddress[chainId][bytes("GAC")]
)
);
contractAddress[chainId][bytes("WORMHOLE_RECEIVER_ADAPTER")] = receiverAdapter;
_receiverAdapters[i] = receiverAdapter;
Expand All @@ -203,7 +205,9 @@ abstract contract Setup is Test {
/// @notice deploy source adapter to Ethereum
vm.selectFork(fork[SRC_CHAIN_ID]);
contractAddress[SRC_CHAIN_ID][bytes("AXELAR_SENDER_ADAPTER")] = address(
new AxelarSenderAdapter{salt: _salt}(ETH_GAS_SERVICE, ETH_GATEWAY, contractAddress[SRC_CHAIN_ID][bytes("GAC")])
new AxelarSenderAdapter{salt: _salt}(
ETH_GAS_SERVICE, ETH_GATEWAY, contractAddress[SRC_CHAIN_ID][bytes("GAC")]
)
);

uint256 len = DST_CHAINS.length;
Expand All @@ -216,7 +220,9 @@ abstract contract Setup is Test {
vm.selectFork(fork[chainId]);

address receiverAdapter = address(
new AxelarReceiverAdapter{salt: _salt}(AXELAR_GATEWAYS[i], "ethereum", contractAddress[chainId][bytes("GAC")])
new AxelarReceiverAdapter{salt: _salt}(
AXELAR_GATEWAYS[i], "ethereum", contractAddress[chainId][bytes("GAC")]
)
);
contractAddress[chainId][bytes("AXELAR_RECEIVER_ADAPTER")] = receiverAdapter;
_receiverAdapters[i] = receiverAdapter;
Expand Down Expand Up @@ -282,7 +288,9 @@ abstract contract Setup is Test {
_receiverAdapters[1] = contractAddress[chainId][bytes("AXELAR_RECEIVER_ADAPTER")];

address mmaReceiver = address(
new MultiBridgeMessageReceiver{salt: _salt}(SRC_CHAIN_ID, contractAddress[chainId][bytes("GAC")], _receiverAdapters, 2)
new MultiBridgeMessageReceiver{salt: _salt}(
SRC_CHAIN_ID, contractAddress[chainId][bytes("GAC")], _receiverAdapters, 2
)
);
contractAddress[chainId][bytes("MMA_RECEIVER")] = mmaReceiver;
contractAddress[chainId][bytes("TIMELOCK")] =
Expand Down
28 changes: 4 additions & 24 deletions test/unit-tests/MultiBridgeMessageReceiver.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ contract MultiBridgeMessageReceiverTest is Setup {
receiverAdapters[0] = address(43);

vm.expectRevert(Error.ZERO_ADDRESS_INPUT.selector);
new MultiBridgeMessageReceiver(
SRC_CHAIN_ID,
address(0),
receiverAdapters,
1
);
new MultiBridgeMessageReceiver(SRC_CHAIN_ID, address(0), receiverAdapters, 1);
}

/// @dev cannot be called with receiver adapters containing zero address
Expand All @@ -79,12 +74,7 @@ contract MultiBridgeMessageReceiverTest is Setup {
receiverAdapters[0] = address(0);

vm.expectRevert(Error.ZERO_ADDRESS_INPUT.selector);
new MultiBridgeMessageReceiver(
SRC_CHAIN_ID,
address(42),
receiverAdapters,
1
);
new MultiBridgeMessageReceiver(SRC_CHAIN_ID, address(42), receiverAdapters, 1);
}

/// @dev cannot be called with zero quorum
Expand All @@ -93,12 +83,7 @@ contract MultiBridgeMessageReceiverTest is Setup {
receiverAdapters[0] = address(42);

vm.expectRevert(Error.INVALID_QUORUM_THRESHOLD.selector);
new MultiBridgeMessageReceiver(
SRC_CHAIN_ID,
address(43),
receiverAdapters,
0
);
new MultiBridgeMessageReceiver(SRC_CHAIN_ID, address(43), receiverAdapters, 0);
}

/// @dev cannot be called with quorum too large
Expand All @@ -107,12 +92,7 @@ contract MultiBridgeMessageReceiverTest is Setup {
receiverAdapters[0] = address(42);

vm.expectRevert(Error.INVALID_QUORUM_THRESHOLD.selector);
new MultiBridgeMessageReceiver(
SRC_CHAIN_ID,
address(43),
receiverAdapters,
2
);
new MultiBridgeMessageReceiver(SRC_CHAIN_ID, address(43), receiverAdapters, 2);
}

/// @dev receives message from one adapter
Expand Down
5 changes: 3 additions & 2 deletions test/unit-tests/adapters/axelar/AxelarReceiverAdapter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,9 @@ contract AxelarReceiverAdapterTest is Setup {
vm.startPrank(currOwner);

senderAdapter = contractAddress[SRC_CHAIN_ID]["AXELAR_SENDER_ADAPTER"];
dummyAdapter =
new AxelarReceiverAdapter(address(new MockAxelarGateway(_validateCall)), "ethereum", contractAddress[DST_CHAIN_ID]["GAC"]);
dummyAdapter = new AxelarReceiverAdapter(
address(new MockAxelarGateway(_validateCall)), "ethereum", contractAddress[DST_CHAIN_ID]["GAC"]
);
dummyAdapter.updateSenderAdapter(senderAdapter);

vm.startPrank(contractAddress[DST_CHAIN_ID]["TIMELOCK"]);
Expand Down

0 comments on commit eff7950

Please sign in to comment.