2

I am minting some tokens on the testnet by following the instructions in at this document. https://docs.google.com/document/d/1gyIOEjxhGhlXsgPtM35DsY3QX02jxLwZSpek7zO4q7M/edit Everything is working fine and i am able to do the transaction to my daedalus wallet which is running in my local system.

I have minted a token count of 1000 I am able to sent the token of

1.12(Two decimeal places)

What i want to do is this I want to sent a token count of

1.123456 (Six decimal places after the dot)

I am not sure how can i achive this. Any idea?

1 Answer 1

3

Not quite finalised, but CIP 38 is probably what you're looking for. You define the "decimals" value on-chain in your minting tx metadata.

See: https://github.com/cardano-foundation/CIPs/pull/137

The way its achieve before this is off-chain by registering your token with that information here in the token registry:

https://github.com/cardano-foundation/cardano-token-registry

In general there is technically no difference between tokens with and without decimals (except for the amount in existance), it's only a matter of interpretation - so its really just about educating the consumer of the tokens about how many digits to interpret as decimals.

4
  • I need to test this before working on mainnet do the above mentioned stuffs will work for test net as well?
    – arunwebber
    May 11 at 9:30
  • Yes, here's the off-chain registry for testnet: github.com/input-output-hk/metadata-registry-testnet
    – sean
    May 11 at 11:45
  • if i specify decimal places here will i be able to sent 1.123456(Six decimal) Tokens from wallet?
    – arunwebber
    May 11 at 16:03
  • Yes. Technically you'd be sending 1123456 tokens - just like 1 Ada is sent as "1000000 Lovelace". It's up to the wallet to implement your token decimals in the user interface, but most wallets will respect this no problem. Nami for example will.
    – sean
    May 11 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.