Skip to content

Commit

Permalink
Use SafeMath in Challenge struct creation
Browse files Browse the repository at this point in the history
  • Loading branch information
skmgoldin committed Jun 15, 2018
1 parent 38f4f90 commit cd38e26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/Registry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ contract Registry {
parameterizer.get("revealStageLen")
);

uint oneHundred = 100; // Kludge that we need to use SafeMath
challenges[pollID] = Challenge({
challenger: msg.sender,
rewardPool: ((100 - parameterizer.get("dispensationPct")) * minDeposit) / 100,
rewardPool: ((oneHundred.sub(parameterizer.get("dispensationPct"))).mul(minDeposit)).div(100),
stake: minDeposit,
resolved: false,
totalTokens: 0
Expand Down

0 comments on commit cd38e26

Please sign in to comment.