Skip to content

Commit

Permalink
Merge pull request #558 from hats-finance/increase-max-gov-fee
Browse files Browse the repository at this point in the history
Increase max hat fee split
  • Loading branch information
ben-kaufman authored Apr 16, 2024
2 parents 101d71a + 952fa6d commit 2bb59d1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contracts/HATVaultsRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ contract HATVaultsRegistry is IHATVaultsRegistry, Ownable {

uint16 public constant HUNDRED_PERCENT = 10000;
// the maximum percentage of the bounty that will be converted in HATs
uint16 public constant MAX_HAT_SPLIT = 2000;
uint16 public constant MAX_HAT_SPLIT = 3500;

address public hatVaultImplementation;
address public hatClaimsManagerImplementation;
Expand Down
2 changes: 1 addition & 1 deletion docs/dodoc/tge/HATAirdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Initialize a HATAirdrop instance
| _root | bytes32 | new merkle tree root to use for verifying airdrop data. |
| _startTime | uint256 | start of the redeem period and of the token lock (if exists) |
| _deadline | uint256 | end time to redeem from the contract |
| _lockEndTime | uint256 | end time for the token lock contract (if exists) |
| _lockEndTime | uint256 | end time for the token lock contract. If this date is in the past, the tokens will be transferred directly to the user and no token lock will be created |
| _periods | uint256 | number of periods of the token lock contract (if exists) |
| _token | contract IERC20Upgradeable | the token to be airdropped |
| _tokenLockFactory | contract ITokenLockFactory | the token lock factory to use to deploy the token locks |
Expand Down
28 changes: 14 additions & 14 deletions test/hatvaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,8 @@ contract("HatVaults", (accounts) => {
arbitrator: accounts[2],
maxBounty: maxBounty,
bountySplit: bountySplit,
bountyGovernanceHAT: 1000,
bountyHackerHATVested: 1001,
bountyGovernanceHAT: 1500,
bountyHackerHATVested: 2001,
vestingDuration: 86400,
vestingPeriods: 10
}
Expand Down Expand Up @@ -1233,22 +1233,22 @@ contract("HatVaults", (accounts) => {
}

try {
await claimsManager.setHATBountySplit(1000, 1001);
assert(false, "cannot set hat bounty split to more than 2000");
await claimsManager.setHATBountySplit(1500, 2001);
assert(false, "cannot set hat bounty split to more than 3500");
} catch (ex) {
assertVMException(ex, "TotalHatsSplitPercentageShouldBeUpToMaxHATSplit");
}

try {
await claimsManager.setHATBountySplit(2001, 0);
assert(false, "cannot set hat bounty split to more than 2000");
await claimsManager.setHATBountySplit(3501, 0);
assert(false, "cannot set hat bounty split to more than 3500");
} catch (ex) {
assertVMException(ex, "TotalHatsSplitPercentageShouldBeUpToMaxHATSplit");
}

try {
await claimsManager.setHATBountySplit(0, 2001);
assert(false, "cannot set hat bounty split to more than 2000");
await claimsManager.setHATBountySplit(0, 3501);
assert(false, "cannot set hat bounty split to more than 3500");
} catch (ex) {
assertVMException(ex, "TotalHatsSplitPercentageShouldBeUpToMaxHATSplit");
}
Expand Down Expand Up @@ -1484,22 +1484,22 @@ contract("HatVaults", (accounts) => {
);

try {
await hatVaultsRegistry.setDefaultHATBountySplit(2001, 0);
assert(false, "cannot set hat bounty split to more than 2000");
await hatVaultsRegistry.setDefaultHATBountySplit(3501, 0);
assert(false, "cannot set hat bounty split to more than 3500");
} catch (ex) {
assertVMException(ex, "TotalHatsSplitPercentageShouldBeUpToMaxHATSplit");
}

try {
await hatVaultsRegistry.setDefaultHATBountySplit(0, 2001);
assert(false, "cannot set hat bounty split to more than 2000");
await hatVaultsRegistry.setDefaultHATBountySplit(0, 3501);
assert(false, "cannot set hat bounty split to more than 3500");
} catch (ex) {
assertVMException(ex, "TotalHatsSplitPercentageShouldBeUpToMaxHATSplit");
}

try {
await hatVaultsRegistry.setDefaultHATBountySplit(1001, 1000);
assert(false, "cannot set hat bounty split to more than 2000");
await hatVaultsRegistry.setDefaultHATBountySplit(1501, 2000);
assert(false, "cannot set hat bounty split to more than 3500");
} catch (ex) {
assertVMException(ex, "TotalHatsSplitPercentageShouldBeUpToMaxHATSplit");
}
Expand Down

0 comments on commit 2bb59d1

Please sign in to comment.