You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to #340 we represented token amounts as a bigint quantity of filecoin. #340 involved representing token quantities in attofilecoin (10**-18) (and serializing them in scientific notation, but that's not important here). Any time token amounts are written to or parsed from strings they are done so as units of filecoin, not attofilecoin. Obviously, that loses precision so this is a temporary thing. We'll need to teach token amounts to stringify to and parse from an ergonomic string representation.
Where to start:
Change AttoFIL.String() to stringify to the number of attofilecoin, not filecoin, and AttoFIL's (un)marshaljson to see call sites
What's required is a way to print and parse quantities of attofilecoin that are user-friendly. For example print them as fixed point decimal number of filecoin with up to 18 digits after the point, but without needless precision.
The text was updated successfully, but these errors were encountered:
Prior to #340 we represented token amounts as a bigint quantity of filecoin. #340 involved representing token quantities in attofilecoin (10**-18) (and serializing them in scientific notation, but that's not important here). Any time token amounts are written to or parsed from strings they are done so as units of filecoin, not attofilecoin. Obviously, that loses precision so this is a temporary thing. We'll need to teach token amounts to stringify to and parse from an ergonomic string representation.
Where to start:
AttoFIL.String()
to stringify to the number of attofilecoin, not filecoin, and AttoFIL's (un)marshaljson to see call sitesWhat's required is a way to print and parse quantities of attofilecoin that are user-friendly. For example print them as fixed point decimal number of filecoin with up to 18 digits after the point, but without needless precision.
The text was updated successfully, but these errors were encountered: