Skip to content

Commit

Permalink
add admin to vm.assume
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Sep 1, 2023
1 parent b759292 commit a200828
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions test/PolygonMigration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ contract PolygonMigrationTest is Test {

function test_Migrate(address user, uint256 amount) external {
vm.assume(
amount <= 10000000000 * 10 ** 18 && user != address(0) && user != address(migration) && user != governance
amount <= 10000000000 * 10 ** 18 &&
user != address(0) &&
user != address(migration) &&
user != governance &&
user != address(admin)
);
matic.mint(user, amount);
vm.startPrank(user);
Expand Down Expand Up @@ -97,7 +101,8 @@ contract PolygonMigrationTest is Test {
amount2 <= amount &&
user != address(0) &&
user != address(migration) &&
user != governance
user != governance &&
user != address(admin)
);
matic.mint(user, amount);
vm.startPrank(user);
Expand All @@ -117,11 +122,14 @@ contract PolygonMigrationTest is Test {
}

function testRevert_Unmigrate(address user, uint256 amount) external {
vm.assume(user != address(admin));
bool unmigrationLock = true;
vm.assume(
amount <= 10000000000 * 10 ** 18 && user != address(0) && user != address(migration) && user != governance
amount <= 10000000000 * 10 ** 18 &&
user != address(0) &&
user != address(migration) &&
user != governance &&
user != address(admin)
);
bool unmigrationLock = true;
matic.mint(user, amount);
vm.startPrank(user);
matic.approve(address(migration), amount);
Expand All @@ -148,6 +156,7 @@ contract PolygonMigrationTest is Test {
user != address(migration) &&
user != governance &&
user != migrateTo &&
user != address(admin) &&
migrateTo != address(0) &&
migrateTo != address(migration)
);
Expand Down Expand Up @@ -175,6 +184,7 @@ contract PolygonMigrationTest is Test {
privKey != 0 &&
privKey < 115792089237316195423570985008687907852837564279074904382605163141518161494337 &&
(user = vm.addr(privKey)) != address(migration) &&
user != address(admin) &&
user != governance &&
amount <= 10000000000 * 10 ** 18 &&
amount2 <= amount
Expand Down

0 comments on commit a200828

Please sign in to comment.