One thing I’ve noticed with the minting of, and other transactions involving native tokens, is that we only deal with integers.
This is well taken care of in the case of ADA and Lovelace… but how do we effectively and gracefully handle transactions involving fractions of native tokens?
What if we have existing assets from other blockchains that want to have cross-chain operations with Cardano and they want to preserve their overall total supply?
Many (if not all) of those assets allow for fractional holdings and not just whole units.
It would be weird and funny if for example, we have “TomatoCoin” that is supposed to have only 1,000 units in total circulating supply; and when we have to migrate some of the existing holders’ balances here in Cardano, their 0.1 TomatoCoin will suddenly have to be represented by 100,000 native tokens named “NativeTomatoCoin”…
…then we will just have to explain to them that they will have to divide that by 1,000,000 in order to get the correct equivalent of the original TomatoCoin.
I know this topic is a litlte old, but I wanted to clarify a question on decimals. If I mint a token , do I account for the decimals at minting or after using the metadata…say I mint 1000 tokens which need 6 decimals, do I mint 1000 and then do the 6 decimals in the meta data later, or must I mint 1,000,000,000 and then enter the metadata in the registry as 6 decimals?
That issue cost me a bunch of time as I was not able to display the correct quantity of a minted token. Some tokens had no entries at all so the quantity is already given as presented. Others, I call them correct ones had a meta decimal entry specifying the decimal places. This showed again what a mess lives on the blockchain as well