diff --git a/test/DefaultInflationManager.t.sol b/test/DefaultInflationManager.t.sol index 6ee6cf1..47c3848 100644 --- a/test/DefaultInflationManager.t.sol +++ b/test/DefaultInflationManager.t.sol @@ -71,7 +71,7 @@ contract DefaultInflationManagerTest is Test { assertEq(polygon.totalSupply(), 10_000_000_000e18); } - function test_InvalidDeployment(uint256 seed) external { + function test_InvalidDeployment(uint160 seed) external { address[5] memory params = [ makeAddr("polygon"), makeAddr("migration"), @@ -79,11 +79,17 @@ contract DefaultInflationManagerTest is Test { makeAddr("treasury"), makeAddr("governance") ]; - params[seed % params.length] = address(0); // any one is zero addr address proxy = address( new TransparentUpgradeableProxy(address(new DefaultInflationManager()), msg.sender, "") ); + + vm.prank(address(seed)); + vm.expectRevert("ONLY_DEPLOYER"); + DefaultInflationManager(proxy).initialize(params[0], params[1], params[2], params[3], params[4]); + + params[seed % params.length] = address(0); // any one is zero addr + vm.expectRevert(InvalidAddress.selector); DefaultInflationManager(proxy).initialize(params[0], params[1], params[2], params[3], params[4]); }