Replies: 1 comment
-
This is the purpose of hexValue in v5 and toQuantity in v6. The logic is a little more complex than just trimming leading zeros, since the value |
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.
-
Describe the Feature
The JSON RPC spec does not allow leading zeros, however
BigNumber.toHexString()
returns a hexadecimal string that is formatted with leading zeroes. It'll be helpful to add a booleanwithLeadingZeros
totoHexString()
that defaults to true(i.e. the existing behaviour), but allow for devs to get the hex string without the leading zeros.Code Example
Beta Was this translation helpful? Give feedback.
All reactions