Skip to content

Commit

Permalink
Increase max hat fee split
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-kaufman committed Apr 11, 2024
1 parent 101d71a commit c30b074
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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
24 changes: 12 additions & 12 deletions test/hatvaults.js
Original file line number Diff line number Diff line change
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 c30b074

Please sign in to comment.