I’m using ethers v6
and comparing the converted numbers, but I’m facing this error:
TypeError: ethers.toBigInt(...).eq is not a function
I’m using ethers v6
and comparing the converted numbers, but I’m facing this error:
TypeError: ethers.toBigInt(...).eq is not a function
In ethers v6
, instead of eq
you’ve to use the ==
operator for equality comparison, like:
value1 = ethers.toBigInt("1000");
value2 = ethers.toBigInt("1000");
isEqual = (value1 == value2);
You can refer to the Big Numbers migration section of the ethers v6 doc.
I think You need to try the ether.js 5.7.2 version as it is stable and works.
npm install [email protected]
Or
yarn add [email protected]