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
baa0fa5b
Unverified
Commit
baa0fa5b
authored
Oct 04, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(ctb): Add test for transferring to fallback owner
parent
f6838067
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
LivenessModule.t.sol
packages/contracts-bedrock/test/LivenessModule.t.sol
+14
-4
No files found.
packages/contracts-bedrock/test/LivenessModule.t.sol
View file @
baa0fa5b
...
...
@@ -20,10 +20,10 @@ contract LivnessModule_TestInit is Test, SafeTestTools {
LivenessGuard livenessGuard;
SafeInstance safeInstance;
function makeKeys(uint256 num) public pure returns (uint256[] memory) {
uint256[] memory keys
= new uint256[](num);
function makeKeys(uint256 num) public pure returns (uint256[] memory
keys_
) {
keys_
= new uint256[](num);
for (uint256 i; i < num; i++) {
keys[i] = uint256(keccak256(abi.encodePacked(i)));
keys
_
[i] = uint256(keccak256(abi.encodePacked(i)));
}
}
...
...
@@ -44,8 +44,18 @@ contract LivnessModule_TestInit is Test, SafeTestTools {
}
contract LivenessModule_RemoveOwner_Test is LivnessModule_TestInit {
function test_removeOwner_succeeds() external {
function test_removeOwner_oneOwner_succeeds() external {
uint256 ownersBefore = safeInstance.owners.length;
vm.warp(block.timestamp + 30 days);
livenessModule.removeOwner(safeInstance.owners[0]);
assertEq(safeInstance.safe.getOwners().length, ownersBefore - 1);
}
function test_removeOwner_allOwners_succeeds() external {
vm.warp(block.timestamp + 30 days);
// The safe is initialized with 10 owners, so we need to remove 3 to get below the minOwners threshold
livenessModule.removeOwner(safeInstance.owners[0]);
livenessModule.removeOwner(safeInstance.owners[1]);
livenessModule.removeOwner(safeInstance.owners[2]);
}
}
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