diff --git a/contracts/gas-snapshots/l2ep.gas-snapshot b/contracts/gas-snapshots/l2ep.gas-snapshot index 569af2fe661..d80eec0d020 100644 --- a/contracts/gas-snapshots/l2ep.gas-snapshot +++ b/contracts/gas-snapshots/l2ep.gas-snapshot @@ -130,7 +130,7 @@ ScrollSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (ga ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 18035) ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 18253) ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17959) -ScrollSequencerUptimeFeed_Constructor:test_InitialState() (gas: 21085) +ScrollSequencerUptimeFeed_Constructor:test_InitialState() (gas: 185840) ScrollSequencerUptimeFeed_GasCosts:test_GasCosts() (gas: 64888) ScrollSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 597491) ScrollSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 573807) diff --git a/contracts/src/v0.8/l2ep/test/v1_0_0/scroll/ScrollSequencerUptimeFeed.t.sol b/contracts/src/v0.8/l2ep/test/v1_0_0/scroll/ScrollSequencerUptimeFeed.t.sol index 85195816b90..5a53853f1f5 100644 --- a/contracts/src/v0.8/l2ep/test/v1_0_0/scroll/ScrollSequencerUptimeFeed.t.sol +++ b/contracts/src/v0.8/l2ep/test/v1_0_0/scroll/ScrollSequencerUptimeFeed.t.sol @@ -40,6 +40,14 @@ contract ScrollSequencerUptimeFeedTest is L2EPTest { contract ScrollSequencerUptimeFeed_Constructor is ScrollSequencerUptimeFeedTest { /// @notice it should have been deployed with the correct initial state function test_InitialState() public { + // L1 sender address must not be the zero address + vm.expectRevert(abi.encodeWithSelector(ScrollSequencerUptimeFeed.ZeroAddress.selector)); + new ScrollSequencerUptimeFeed(address(0), address(s_mockScrollL2CrossDomainMessenger), false); + + // L2 cross domain messenger address must not be the zero address + vm.expectRevert(abi.encodeWithSelector(ScrollSequencerUptimeFeed.ZeroAddress.selector)); + new ScrollSequencerUptimeFeed(s_l1OwnerAddr, address(0), false); + // Sets msg.sender and tx.origin to a valid address vm.startPrank(s_l1OwnerAddr, s_l1OwnerAddr);