Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Revert "C4-136, C4-690: Adding duration and delegation fee bounds (#2…
Browse files Browse the repository at this point in the history
…45)" (#267)

This reverts commit 8b92375.
  • Loading branch information
emersoncloud authored and 0xju1ie committed Feb 7, 2023
1 parent 9a79014 commit 6022595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
8 changes: 0 additions & 8 deletions contracts/contract/MinipoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,6 @@ contract MinipoolManager is Base, ReentrancyGuard, IWithdrawer {
revert InsufficientAVAXForMinipoolCreation();
}

if (duration < 2 weeks || duration > 365 days) {
revert DurationOutOfBounds();
}

if (delegationFee < 0.02 ether || delegationFee > 1 ether) {
revert DelegationFeeOutOfBounds();
}

Staking staking = Staking(getContractAddress("Staking"));
staking.increaseAVAXStake(msg.sender, msg.value);
staking.increaseAVAXAssigned(msg.sender, avaxAssignmentRequest);
Expand Down
10 changes: 5 additions & 5 deletions test/unit/MinipoolManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ contract MinipoolManagerTest is BaseTest {
function testCreateMinipool() public {
address nodeID = address(1);
uint256 duration = 2 weeks;
uint256 delegationFee = 0.02 ether;
uint256 delegationFee = 20;
uint256 avaxAssignmentRequest = 1000 ether;
uint256 nopAvaxAmount = 1000 ether;

Expand Down Expand Up @@ -676,7 +676,7 @@ contract MinipoolManagerTest is BaseTest {
function testGetMinipool() public {
address nodeID = address(1);
uint256 duration = 2 weeks;
uint256 delegationFee = 0.02 ether;
uint256 delegationFee = 20;
uint256 avaxAssignmentRequest = 1000 ether;
uint256 nopAvaxAmount = 1000 ether;

Expand Down Expand Up @@ -708,7 +708,7 @@ contract MinipoolManagerTest is BaseTest {
nodeID = randAddress();
ggp.approve(address(staking), ggpStakeAmt);
staking.stakeGGP(ggpStakeAmt);
minipoolMgr.createMinipool{value: depositAmt}(nodeID, 14 days, 0.02 ether, avaxAssignmentRequest);
minipoolMgr.createMinipool{value: depositAmt}(nodeID, 0, 0, avaxAssignmentRequest);
}
vm.stopPrank();

Expand Down Expand Up @@ -737,7 +737,7 @@ contract MinipoolManagerTest is BaseTest {
nodeID = randAddress();
ggp.approve(address(staking), ggpStakeAmt);
staking.stakeGGP(ggpStakeAmt);
minipoolMgr.createMinipool{value: depositAmt}(nodeID, 14 days, 0.02 ether, avaxAssignmentRequest);
minipoolMgr.createMinipool{value: depositAmt}(nodeID, 0, 0, avaxAssignmentRequest);
}
vm.stopPrank();
assertEq(minipoolMgr.getMinipoolCount(), 10);
Expand Down Expand Up @@ -1064,7 +1064,7 @@ contract MinipoolManagerTest is BaseTest {
vm.startPrank(nodeOp);
ggp.approve(address(staking), 100 ether);
staking.stakeGGP(100 ether);
minipoolMgr.createMinipool{value: 1000 ether}(nodeID, 14 days, 0.02 ether, avaxAssignmentRequest);
minipoolMgr.createMinipool{value: 1000 ether}(nodeID, 0, 0, avaxAssignmentRequest);
vm.stopPrank();
}
index = minipoolMgr.getIndexOf(nodeID);
Expand Down

0 comments on commit 6022595

Please sign in to comment.