Skip to content

Commit

Permalink
feat(DrawCalculatorV2): add contract
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed Mar 10, 2022
1 parent 058f544 commit f003aea
Show file tree
Hide file tree
Showing 8 changed files with 1,983 additions and 10 deletions.
4 changes: 1 addition & 3 deletions contracts/DrawCalculator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ contract DrawCalculator is IDrawCalculator {

uint64 timeNow = uint64(block.timestamp);



// calculate prizes awardable for each Draw passed
for (uint32 drawIndex = 0; drawIndex < _draws.length; drawIndex++) {

require(timeNow < _draws[drawIndex].timestamp + _prizeDistributions[drawIndex].expiryDuration, "DrawCalc/draw-expired");

uint64 totalUserPicks = _calculateNumberOfUserPicks(
Expand All @@ -159,6 +156,7 @@ contract DrawCalculator is IDrawCalculator {
_prizeDistributions[drawIndex]
);
}

prizeCounts = abi.encode(_prizeCounts);
prizesAwardable = _prizesAwardable;
}
Expand Down
Loading

0 comments on commit f003aea

Please sign in to comment.