Skip to content

Commit

Permalink
Remove constants for 16 tiers case
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan DesRosier committed Jul 6, 2023
1 parent 547b6f4 commit 84cded0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion script/generateConstants.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract GenerateConstants is Script {
console.log("\n");
console.log("/// @notice The odds for each tier and number of tiers pair.");
MIN_TIERS = 3;
MAX_TIERS = 16;
MAX_TIERS = 15;
// Precompute the odds for each tier
for (uint8 numTiers = MIN_TIERS; numTiers <= MAX_TIERS; numTiers++) {
for (uint8 tier = 0; tier < numTiers; tier++) {
Expand Down
17 changes: 0 additions & 17 deletions src/abstract/TieredLiquidityDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -935,23 +935,6 @@ contract TieredLiquidityDistributor {
else if (_tier == 12) return TIER_ODDS_12_15;
else if (_tier == 13) return TIER_ODDS_13_15;
else if (_tier == 14) return TIER_ODDS_14_15;
} else if (_numTiers == 16) {
if (_tier == 0) return TIER_ODDS_0_16;
else if (_tier == 1) return TIER_ODDS_1_16;
else if (_tier == 2) return TIER_ODDS_2_16;
else if (_tier == 3) return TIER_ODDS_3_16;
else if (_tier == 4) return TIER_ODDS_4_16;
else if (_tier == 5) return TIER_ODDS_5_16;
else if (_tier == 6) return TIER_ODDS_6_16;
else if (_tier == 7) return TIER_ODDS_7_16;
else if (_tier == 8) return TIER_ODDS_8_16;
else if (_tier == 9) return TIER_ODDS_9_16;
else if (_tier == 10) return TIER_ODDS_10_16;
else if (_tier == 11) return TIER_ODDS_11_16;
else if (_tier == 12) return TIER_ODDS_12_16;
else if (_tier == 13) return TIER_ODDS_13_16;
else if (_tier == 14) return TIER_ODDS_14_16;
else if (_tier == 15) return TIER_ODDS_15_16;
}
return sd(0);
}
Expand Down

0 comments on commit 84cded0

Please sign in to comment.