In the Plutus docs, there are references to currencySymbol
and tokenName
. In the cardano docs there are references to policyId
and assetName
. Are policyId
and currencySymbol
the same thing? Are tokenName
and assetName
the same thing? If they are the same, when is one used instead of the other?
1 Answer
They represent the same from my understanding too. There are a few terms that are associated with the "Tokens" in Cardano. They are
1. Currency Symbol - Hexadecimal Number - PolicyId
2. Token Name - Text - AssetName
The currency symbol is kept in hexadecimal form since it is actually the signed hash of minting policy.
The policy generated from the mining policy is the current Symbol of the Native Asset. For ADA both Currency Symbol and Token Name are "". I guess the difference has accommodated the manner in which it is being used. "CurrencySymbol" and "TokenName" are primarily used in Plutus Documentation and "PolicyId" and "assetName" are used in Native Token minting through cardano-cli.
-
Yes, I think thats also true. There is also a type called AssetClass, which is the combination of the CurrencySymbol and A TokenName. The AssetClass can also hold a Value, which is basically an Int. Source: marlowe-playground-staging.plutus.aws.iohkdev.io/doc/haddock/…– retoenCommented Nov 15, 2021 at 9:26
-
1Be careful, I don't what do you mean by Text but if you are referring to the Haskell type Text, it has nothing to do with Tokens. It is used in Haskell outside of Plutus Commented Nov 18, 2021 at 14:23