-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Dec()
and PrettyDec()
properly
#129
Comments
There should be two methods:
ps, func (z *Int) Dec() string {
return z.ToBig().String()
} |
Erm, it does not exist? |
Ah, sry, when I backported the log change from my PR I didn't backport bumping the uint256 lib version. |
I'll reopen this, we should still implement it "properly" without going via big |
holiman
changed the title
ToDecimal or similar?
Implement Mar 21, 2023
Dec()
and PrettyDec()
properly
Fixed by #130 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When printing ints in logs or console, it's usually better to print as a decimal vs hex. But there's no way to flatten a uint256 Int currently into a decimal string. It feels a bit wonky to do
uint256.Int.ToBig().String()
The text was updated successfully, but these errors were encountered: