Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Sep 2, 2024
1 parent 01f1493 commit a74091c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/foundry/unit/ClientChainGateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -373,22 +373,16 @@ contract WithdrawalPrincipalFromExocore is SetUp {
tokens[1] = bytes32(bytes20(address(restakeToken)));

// Simulate adding VIRTUAL_STAKED_ETH_ADDRESS to whitelist via lzReceive
bytes memory message = abi.encodePacked(
GatewayStorage.Action.REQUEST_ADD_WHITELIST_TOKEN,
abi.encodePacked(tokens[0])
);
Origin memory origin = Origin({
srcEid: exocoreChainId, sender: address(exocoreGateway).toBytes32(), nonce: 1
});
bytes memory message =
abi.encodePacked(GatewayStorage.Action.REQUEST_ADD_WHITELIST_TOKEN, abi.encodePacked(tokens[0]));
Origin memory origin = Origin({srcEid: exocoreChainId, sender: address(exocoreGateway).toBytes32(), nonce: 1});

vm.prank(address(clientChainLzEndpoint));
clientGateway.lzReceive(origin, bytes32(0), message, address(0), bytes(""));
// assert that VIRTUAL_STAKED_ETH_ADDRESS and restake token is whitelisted
assertTrue(clientGateway.isWhitelistedToken(VIRTUAL_STAKED_ETH_ADDRESS));
origin.nonce = 2;
message = abi.encodePacked(
GatewayStorage.Action.REQUEST_ADD_WHITELIST_TOKEN, abi.encodePacked(tokens[1])
);
message = abi.encodePacked(GatewayStorage.Action.REQUEST_ADD_WHITELIST_TOKEN, abi.encodePacked(tokens[1]));
vm.prank(address(clientChainLzEndpoint));
clientGateway.lzReceive(origin, bytes32(0), message, address(0), bytes(""));
assertTrue(clientGateway.isWhitelistedToken(address(restakeToken)));
Expand Down

0 comments on commit a74091c

Please sign in to comment.