Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
ad40c467
Unverified
Commit
ad40c467
authored
Dec 05, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: Add test_unpause_fullSystem_succeeds
parent
96316eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
ExtendedPause.t.sol
packages/contracts-bedrock/test/ExtendedPause.t.sol
+22
-9
No files found.
packages/contracts-bedrock/test/ExtendedPause.t.sol
View file @
ad40c467
...
...
@@ -4,24 +4,37 @@ pragma solidity 0.8.15;
import { CommonTest } from "test/setup/CommonTest.sol";
import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";
/// @dev These tests are somewhat redundant with tests in the SuperchainConfig and other pausable contracts, however
/// it is worthwhile to pull them into one location to ensure that the behavior is consistent.
contract ExtendedPause_Test is CommonTest {
/// @dev Tests that other contracts are paused when the superchain config is paused
/// This test is somewhat redundant with tests in the SuperchainConfig and other pausable contracts, however
/// it is worthwhile to pull them into one location to ensure that the behavior is consistent.
function test_pause_fullSystem_succeeds() external {
function test_pause_fullSystem_succeeds() public {
assertFalse(superchainConfig.paused());
assertEq(l1CrossDomainMessenger.paused(), superchainConfig.paused());
vm.prank(superchainConfig.guardian());
superchainConfig.pause("identifier");
// validate the paused state
assertTrue(superchainConfig.paused());
assert
Eq(l1CrossDomainMessenger.paused(), superchainConfig
.paused());
assert
True(optimismPortal
.paused());
assertTrue(l1CrossDomainMessenger.paused());
assertTrue(l1StandardBridge.paused());
assertEq(l1StandardBridge.paused(), superchainConfig.paused());
assertTrue(l1ERC721Bridge.paused());
assertEq(l1ERC721Bridge.paused(), superchainConfig.paused());
}
/// @dev Tests that other contracts are unpaused when the superchain config is paused and then unpaused.
function test_unpause_fullSystem_succeeds() external {
// first use the test above to pause the system
test_pause_fullSystem_succeeds();
vm.prank(superchainConfig.guardian());
superchainConfig.unpause();
// validate the unpaused state
assertFalse(superchainConfig.paused());
assertFalse(optimismPortal.paused());
assertFalse(l1CrossDomainMessenger.paused());
assertFalse(l1StandardBridge.paused());
assertFalse(l1ERC721Bridge.paused());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment