Skip to content

Commit

Permalink
fix: fuzz inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Aug 30, 2023
1 parent 9b0c88d commit eeecc03
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/PolygonMigration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ contract PolygonMigrationTest is Test {
}

function test_Migrate(address user, uint256 amount) external {
vm.assume(amount <= 10000000000 * 10 ** 18 && user != address(0));
vm.assume(
amount <= 10000000000 * 10 ** 18 &&
user != address(0) &&
user != address(migration)
);
matic.mint(user, amount);
vm.startPrank(user);
matic.approve(address(migration), amount);
Expand Down Expand Up @@ -134,14 +138,15 @@ contract PolygonMigrationTest is Test {
uint256 amount,
uint256 amount2
) external {
address user;
vm.assume(
privKey != 0 &&
privKey <
115792089237316195423570985008687907852837564279074904382605163141518161494337 &&
(user = vm.addr(privKey)) != address(migration) &&
amount <= 10000000000 * 10 ** 18 &&
amount2 <= amount
);
address user = vm.addr(privKey);
matic.mint(user, amount);
vm.startPrank(user);
matic.approve(address(migration), amount);
Expand Down

0 comments on commit eeecc03

Please sign in to comment.