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
If you look at Ethereum's ERC20 tokens, they all have a field called decimal which describes how many places the decimal should be moved over for display purposes.
In ERTP, the extents are the smallest denomination of digital asset such that it is always a natural number. We don't currently have a place to put information about how it should be represented to the user, like decimal but we do need it.
I imagine a good place for this could be the mint configuration. It's not clear to me how exactly yet
But it could take the form of a stringify function that takes units as argument and would return a string representing the units. Example: units representing dollars would be an object with the extent expressed as cents (like the number 1234 for $12.34) and the stringify function would return the string 12.34
The text was updated successfully, but these errors were encountered:
I've used it only a little, but i've had a really good experience with it
That said, i'm not sure this is directly relevant to the problem of this issue
This issue is about the fact that if you create a currency with ERTP, you represent it only with natural numbers (like cents for dollars or satoshi for bitcoins), but ERTP does not allow to configure what a canonical string representation for the currency would be. This is where allowing mint authors to provide a stringify function would come handy
Where i see the connection is that it can be recommanded to mint authors to use Intl/NumberFormat to write their formatting functions. But ERTP still needs to provide a way to share the stringify function so that an application knows how to represent a payment or purse object
katelynsills
changed the title
[ERTP] Representing non-natural number currencies
[ERTP] Add a stringify function to ERTP for UI representation of extents
Jan 10, 2020
katelynsills
changed the title
[ERTP] Add a stringify function to ERTP for UI representation of extents
[ERTP] Add a stringify function for UI representation / decimal property
Oct 21, 2020
follow up to Agoric/documentation#65 (comment)_
I imagine a good place for this could be the mint configuration. It's not clear to me how exactly yet
But it could take the form of a
stringify
function that takes units as argument and would return a string representing the units. Example: units representing dollars would be an object with the extent expressed as cents (like the number1234
for $12.34) and the stringify function would return the string12.34
The text was updated successfully, but these errors were encountered: