Skip to content

Commit

Permalink
Check outbound transfer reverts when withdrawals are paused
Browse files Browse the repository at this point in the history
  • Loading branch information
gvladika committed May 23, 2024
1 parent a81f5e5 commit 4b60ef6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test-foundry/L2USDCCustomGateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,19 @@ contract L2USDCCustomGatewayTest is L2ArbitrumGatewayTest {
l2USDCGateway.outboundTransfer(l1USDC, address(101), 200, 0, 0, new bytes(0));
}

function test_outboundTransfer_revert_WithdrawalsPaused() public {
// pause withdrawals
vm.prank(AddressAliasHelper.applyL1ToL2Alias(l1Counterpart));
l2USDCGateway.pauseWithdrawals();

vm.expectRevert(
abi.encodeWithSelector(
L2USDCCustomGateway.L2USDCCustomGateway_WithdrawalsPaused.selector
)
);
l2USDCGateway.outboundTransfer(l1USDC, receiver, 200, 0, 0, new bytes(0));
}

function test_pauseWithdrawals() public {
assertEq(l2USDCGateway.withdrawalsPaused(), false, "Invalid initial state");

Expand Down

0 comments on commit 4b60ef6

Please sign in to comment.