-
Notifications
You must be signed in to change notification settings - Fork 0
Added functions to help calculate tier fractions #7
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
base: master
Are you sure you want to change the base?
Conversation
POOL-1918 Make it easy to calculate more human prize tiers
People express prize tiers as: 2500, 800, 400 etc. We need a lib to help with that |
| (tot: BigNumber, tierPrize: BigNumber, index: number): BigNumber => { | ||
| return tot.add( | ||
| tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index)) | ||
| ); | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tot is the total right? Would be more explicit in full.
| (tot: BigNumber, tierPrize: BigNumber, index: number): BigNumber => { | |
| return tot.add( | |
| tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index)) | |
| ); | |
| }, | |
| (total: BigNumber, tierPrize: BigNumber, index: number): BigNumber => { | |
| return total.add( | |
| tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index)) | |
| ); | |
| }, |
| tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index)) | ||
| ); | ||
| }, | ||
| ethers.BigNumber.from("0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed and this way we can also remove the ethers import.
| ethers.BigNumber.from("0") |
No description provided.