I have a project in react.js
The next code
console.log(ethers.utils.parseEther('100'.toString()))
Give me the next result in the console
BigNumber {_hex: '0x056bc75e2d63100000', _isBigNumber: true}
I want only giveme the hex value 0x056bc75e2d63100000
i try use '100'.toHexString()
but giveme the next error
Unhandled Runtime Error
TypeError: '100'.toHexString is not a function
If your value is a number, you can cast it as a hex string with
toString
method.If your value is not a number, cast it as one first.