Replies: 1 comment
-
I would recommend storing them as You can also just pass in that value to a BigNumber, i.e. this works: > BigNumber.from({ _hex: "0x01", _isBigNumber:true })
BigNumber { value: "1" } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All
We're storing some of our data generated by ethers into a database and we call it back via the API.
We've got a lot of nested objects that are Ethers BigNumbers, but JSON.parse does not handle them due to the object construction
Ethers BigNumbers are constructed like this, using keys _hex & _isBigNumber:
{ _hex: "0x01", _isBigNumber:true }
Has anyone come up with a reasonable solution to parsing or storing objects that contain big numbers generated by Ethers library?
Thanks
Joe
Beta Was this translation helpful? Give feedback.
All reactions