-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Signed SafeMath #1559
Signed SafeMath #1559
Conversation
it('reverts with a 0 divisor', async function () { | ||
const a = new BigNumber(5678); | ||
const b = new BigNumber(0); | ||
describe('div', function () { |
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.
Unsigned integer division has a couple more tests this one is missing, should we add them?
Created #1563 to merge this as-is for 2.1 and improve testing afterwards. |
Please add this to the changelog. |
…y into signed-safe-math
PTAL. |
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.
Neat, LGTM!
Closes #835.
Fixes #705.
This PR includes @facuspagnuolo's code and tests from #835 with @cag's fix from facuspagnuolo#1. I've also reviewed @cag's proofs that the math doesn't overflow in #835 (comment) and they seem correct to me.