Skip to content

Commit

Permalink
lint: run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed May 9, 2024
1 parent fca273a commit 5556e22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/AvailDepository.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ contract AvailDepository is PausableUpgradeable, AccessControlDefaultAdminRulesU
external
initializer
{
if (governance == address(0) || pauser == address(0) || depositor == address(0) || newDepository == bytes32(0)) {
if (governance == address(0) || pauser == address(0) || depositor == address(0) || newDepository == bytes32(0))
{
revert ZeroAddress();
}
depository = newDepository;
Expand Down
13 changes: 11 additions & 2 deletions test/DeqRouterTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,19 @@ contract DeqRouterTest is Test {
assertEq(address(newDeqRouter.avail()), address(newAvail));
}

function testRevertZeroAddress_initialize(address newAvail, address newGovernance, address newPauser, address newSwapRouter, address newStakedAvail) external {
function testRevertZeroAddress_initialize(
address newAvail,
address newGovernance,
address newPauser,
address newSwapRouter,
address newStakedAvail
) external {
vm.assume(newAvail != address(0));
DeqRouter newDeqRouter = new DeqRouter(IERC20(newAvail));
vm.assume(newGovernance == address(0) || newPauser == address(0) || newSwapRouter == address(0) || newStakedAvail == address(0));
vm.assume(
newGovernance == address(0) || newPauser == address(0) || newSwapRouter == address(0)
|| newStakedAvail == address(0)
);
vm.expectRevert(IDeqRouter.ZeroAddress.selector);
newDeqRouter.initialize(newGovernance, newPauser, newSwapRouter, IStakedAvail(newStakedAvail));
}
Expand Down

0 comments on commit 5556e22

Please sign in to comment.