Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase max hat fee split #558

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading