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
eb0e1335
Unverified
Commit
eb0e1335
authored
Oct 28, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(ctb): Add test for incomplete emptying below minOwners
parent
33c7c8b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
LivenessModule.t.sol
packages/contracts-bedrock/test/LivenessModule.t.sol
+18
-0
No files found.
packages/contracts-bedrock/test/LivenessModule.t.sol
View file @
eb0e1335
...
...
@@ -214,6 +214,24 @@ contract LivenessModule_RemoveOwners_TestFail is LivenessModule_TestInit {
/// @dev Tests if remove owners reverts if it removes too many owners without removing all of them
function test_removeOwners_belowMinButNotEmptied_reverts() external {
// Remove all but one owner
uint256 numOwners = safeInstance.owners.length - 2;
address[] memory ownersToRemove = new address[](numOwners);
for (uint256 i = 0; i < numOwners; i++) {
ownersToRemove[i] = safeInstance.owners[i];
}
address[] memory prevOwners = safeInstance.getPrevOwners(ownersToRemove);
_warpPastLivenessInterval();
vm.expectRevert(
"LivenessModule: must remove all owners and transfer to fallback owner if numOwners < minOwners"
);
livenessModule.removeOwners(prevOwners, ownersToRemove);
}
/// @dev Tests if remove owners reverts if it removes too many owners transferring to the fallback owner
function test_removeOwners_belowEmptiedButNotFallback_reverts() external {
// Remove all but one owner
uint256 numOwners = safeInstance.owners.length - 1;
...
...
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