Skip to content

Commit

Permalink
refactor: remove repeated code
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Sep 3, 2024
1 parent f318b7e commit 65debfd
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/foundry/unit/Bootstrap.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ contract BootstrapTest is Test {
clientChainLzEndpoint.lzReceive(
Origin(exocoreChainId, bytes32(bytes20(undeployedExocoreGateway)), nonce),
address(bootstrap),
generateUID(1),
generateUID(nonce),
abi.encodePacked(GatewayStorage.Action.REQUEST_MARK_BOOTSTRAP, ""),
bytes("")
);
Expand All @@ -922,17 +922,11 @@ contract BootstrapTest is Test {
}

function test12_MarkBootstrapped_AlreadyBootstrapped() public {
test12_MarkBootstrapped();
vm.startPrank(address(clientChainLzEndpoint));
vm.warp(spawnTime + 1);
_markBootstrapped(1, true);
vm.expectEmit(address(bootstrap));
emit BootstrapStorage.BootstrappedAlready();
bootstrap.lzReceive(
Origin(exocoreChainId, bytes32(bytes20(undeployedExocoreGateway)), uint64(2)),
generateUID(1),
abi.encodePacked(GatewayStorage.Action.REQUEST_MARK_BOOTSTRAP, ""),
address(0),
bytes("")
);
_markBootstrapped(2, true);
vm.stopPrank();
}

Expand Down

0 comments on commit 65debfd

Please sign in to comment.