-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugVerified to be an issue.Verified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.
Description
Ethers Version
5.6.7
Search Terms
No response
Describe the Problem
There was a serious bug identified in BN.js, which results in hex strings being incorrectly computed in some cases (analysis will be performed shortly, after I get the CI off and running).
The hexstring is used extensively in ethers v5 BigNumber library, to ensure immutability. This does not affect the v6-beta branch, as it does not use BN.js.
There is a fix published in that repository, so I just need to update the version, verify correctness, and lock the versions in the package.json files.
h/t: @alexdupre
Code Snippet
// Two numbers, which *should* be different:
const a = BigNumber.from(2).pow(336);
const b = BigNumber.from(2).pow(316);
// Should log `false`, but actually logs `true`
console.log(a.eq(b))Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugVerified to be an issue.Verified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.