Skip to main content

Minting Tokens

Now that you've got your tokens created, it's time to start minting them into player wallets as they are earned.

We call this "Play-to-Mint," giving players the power to create tokens themselves, which feels more rewarding.

Plus, it keeps your processes more efficient by delivering tokens right to players' wallets without any unnecessary transfer transactions.

What you'll need:
  • Some Enjin Coin on Enjin Matrixchain to pay for Transaction Fees and a deposit of 0.01 ENJ is required for the Token Account Deposit, for each new token holder.
    If the token has ENJ Infusion, each new unit minted will require the same amount of ENJ to be infused.
    You can obtain cENJ (Canary ENJ) for testing from the Canary faucet.
  • An Enjin Platform Account.
  • A Collection and a Token to mint.

There are two ways to use the Create Asset functionalities:

  1. Using the Enjin Dashboard
  2. Using the GraphQL API & SDKs

Option A. Using the Enjin Dashboard

In the Platform menu, navigate to "Tokens".
Locate the token you wish to mint, click the 3 vertical dots () to it's right, then click the "Mint" button.

Minting a Token

Set the recipient and the amount in the corresponding fields, and Click on "Mint"

Mint Token Form

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

Mint Transaction Request Banner

Pending Mint 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.

Option B. Using the Enjin API & SDKs

The BatchMint mutation enables you to efficiently create multiple tokens within a single blockchain transaction. This process, known as batch minting, simplifies the minting of multiple tokens, reducing transaction fees and processing time.

mutation BatchMint {
BatchMint(
collectionId: "7154" #Specify the collection ID
recipients: [
{
account: "0xaa89f9099742a928051c41eadba188ad4e863539ff96f16722ae7850271c2921" #The recipient of the mint
mintParams: {
amount:1 #Amount to mint
tokenId: {integer: 6533} #Token ID to mint
}
}
]
) {
id
method
state
}
}

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

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 the ability to sign using a managed wallet with the signingAccount argument, or batch create tokens instead of minting existing ones with the createParams argument.

You've minted a token!

What if you need to transfer a token? proceed to Transferring Tokens.