Skip to main content

Creating a Currency Token

Similarly to Tokens, "Currency Tokens" are also digital assets that can be traded, sold, or used on the Enjin Blockchain. However, unlike standard tokens, currency tokens support fractional values, allowing them to be divided into smaller units, just like traditional currencies.

What you'll need:
  • Some Enjin Coin on Enjin Matrixchain to process transactions and at least 0.01 ENJ for the Token Account Deposit.
    You can obtain cENJ (Canary ENJ) for testing from the Canary faucet.
  • An Enjin Platform Account.
  • A Collection to place the tokens in.

Enjin Blockchain allows you to create customized Token ID

structures. This flexibility enables you to organize your tokens in various ways that suit your needs.

For the currency token options, configure the metadata parameter, which consists of 3 values:

  • Name: The token name (e.g. Gold Coins).
  • Symbol: A short symbol that represents the token (e.g. GOLD).
  • Decimals: Max amount of decimals supported for this token (e.g. 2 would mean the token can support up to 2 decimals, like 5.75 Gold Coins).
Important Note on Decimals Support

The decimalCount property specifies how token balances should be displayed in applications, but it does not allow for actual fractional values on the Enjin Blockchain.
This means that for a token with "Decimals: 2", the balance should be divided by 100 (10^2) when displayed in applications.
For example, for the Gold Coins token example mentioned above, a balance of 1,575 Gold Coins should be shown as 15.75 (1,575/100) in apps.
Similarly, when minting tokens, to mint 4.80 Gold Coins, the minted supply parameter should be set to 480 (4.8 * 10^2).

Token ID Structure Best Practices

Before minting the Mainnet versions of your Tokens, that will be used in your live economy. Make sure to take a look at the best practices for Token ID structure.

There are two ways to use the Create Asset functionalities:

Option A. Using the Enjin Dashboard

Unavailable via the User Interface

The option to create a currency token via the user interface is currently being developed.
For the time being, you can create currency token via Option B. Using the Enjin API & SDKs.

Option B. Using the Enjin API & SDKs

CreateToken mutation enables you to create a new token within an existing collection. This operation is essential for introducing new digital assets, and it allows you to define various attributes and characteristics for the newly created token.
For the currency token options, configure the metadata parameter, which consists of name, symbol and decimals

mutation CreateCurrencyToken{
CreateToken(
recipient: "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f" #The recipient of the initial supply
collectionId: 2406 #Set the collection ID
params:{
tokenId: {integer: 0} #Set the token ID
initialSupply: 1 #Mint initial supply
cap: {type: INFINITE} #Define supply type
metadata: {name: "Gold Coins", symbol: "GOLD", decimalCount: 2} #Define currency configuration here
}
) {
id
method
state
}
}

A WebSocket event will also be fired so you can pick up the changes in real-time by listening to the app channel on the WebSocket.

tip

For Token ID management, head to Best Practices > TokenID Structure

Explore More Arguments

For a comprehensive view of all available arguments for queries and mutations, please refer to our API Reference. This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API.
For instance, you'll find settings such as adding attributes/royalties/supply type and much more with the CreateTokenParams argument, or the ability to sign using a managed wallet with the signingAccount argument.

What's next?

To add metadata to your token, go to the Adding Metadata tutorial.