TypeError: gasUsed.mul is not a function #5813
-
Getting this error cannot find a solution. This is while writing tests thsi is the code for the test file -
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
According to Ethers Docs Big Numbers means that you can't use those functions change this and also change this
to this
replace by the way, there is issue with |
Beta Was this translation helpful? Give feedback.
-
Hi @alfaqi I have made the changes you have mentioned but now there is a completely different error related to something about misxing BigInt and other types-
Here is the updated code-
|
Beta Was this translation helpful? Give feedback.
-
hey smarth, i also ran into same problem.
after making those changes. If you get an error like this
The issue is with effectiveGasPrice. ` describe("withdraw", async function () {
this code worked for me. |
Beta Was this translation helpful? Give feedback.
-
in my case, I change Here's my code :
Hope it helps! |
Beta Was this translation helpful? Give feedback.
hey smarth, i also ran into same problem.
gasCost = gasUsed.mul(effectiveGasPrice)
to this
const gasCost = gasUsed * effectiveGasPrice
after making those changes. If you get an error like this