Skip to main content

Creating Tokens

"Token

s" are digital assets that can be traded, sold, or used on the Enjin Blockchain.

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 Multi-Unit Tokens These tokens are identical in value and function, and therefore, they all share the same Token ID. This commonality in ID reflects their interchangeable nature. For instance, all units of a specific cryptocurrency like Bitcoin would have the same identification as they hold the same value and are indistinguishable from one another in terms of usage and worth.
  • For Non-Fungible Tokens (NFTs): Every NFT has a unique Token ID that sets it apart from other tokens, even within the same collection. This unique ID is crucial for establishing the individuality and provenance of each NFT, which could represent anything from digital art to ownership rights over a virtual asset.
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

In the Platform menu, navigate to "Tokens". Then, click the "Create Token" button.

Creating Token

From here, you can customize your collection's Mint Policy, Market Policy, and Attributes.

  • Create Token Section - Basic token options. Make sure to select the Collection ID you wish to mint the token in, the token ID, and the recipient in the corresponding fields.
    Make sure to check out the TokenID Structure Best Practices.
  • Cap - The token cap (if required).
    • The Infinite supply type is the most flexible. With this model, there is no limit to how many tokens can be minted or be in circulation. The collection owner can always mint additional units, making it ideal for use cases that require an ever-expanding token supply.
    • The Fixed supply type offers a balanced approach between flexibility and control. This model allows the collection owner to mint new tokens as long as the circulating supply does not exceed the predetermined max supply. Burned tokens can be re-minted, ensuring the total supply remains constant.
    • The Collapsing supply type is the most strict. This supply type allows the collection owner to mint new tokens as long as the circulating supply does not exceed the max supply. However, burning tokens reduces the max supply, meaning burned tokens cannot be re-minted. This ensures a non-increasing supply, suitable for use cases that require strict control over the token's total amount in circulation.
  • Token Royalty Settings - The market behavior for the token.
  • Attributes - Set the token details which are details stored in pairs, like a title and its content. Certain attributes, such as the URI, name, and description, have special roles that are understood by many platforms and marketplaces. If you're new, simply link to a JSON file that lists all the token's details. Make sure to check out the Metadata Standard page.

Once you're satisfied with the options, click on the "Create" button at the bottom right corner to create the request.

The Transaction Request will then appear in the "Transactions" menu.

Create Token Transaction Request Banner

Pending Create Token Transaction

Since this request requires a Transaction

, it'll need to be signed with your Wallet.

  • If a Wallet Daemon is running and configured, the transaction request will be signed automatically.
  • If a wallet is connected such as the Enjin Wallet or Polkadot.js, the transaction must be signed manually by clicking the "Sign" button and approving the signature request in your wallet.

Once your token is created, lets give it a new look by Adding Metadata

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.

mutation CreateToken{
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
) {
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.