1

I am using ethers.js and not sure why this is returning an overflow error.

const data = {
  price: ethers.utils.parseEther("2.0") * 
}

error

Unhandled Rejection (Error): overflow [ See: https://links.ethers.org/v5-errors-NUMERIC_FAULT-overflow ] (fault="overflow", operation="BigNumber.from", value=12000000000000000000, code=NUMERIC_FAULT, version=bignumber/5.7.0)

1 Answer 1

1

This statement works fine on my end?

ethers.utils.parseEther("2.0");

Does it also look like you might not have the entire code example posted here?

2
  • the issue was that i was multiply by another integer . I had to convert it to a bigNumber
    – 0xsegfault
    Commented Aug 30, 2022 at 6:25
  • yeah that makes sense Commented Aug 30, 2022 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.