Creating your first Blockchain Token
Learn how to create your first NFT using GraphiQL Playground.
Now that you have already learned how to create your Enjin Platform collection, player, and link your account to your Enjin Wallet, it's time to create your first blockchain token.

What is a Blockchain Token?

Tokens, also known as blockchain assets, are used to represent the identity of your items on the blockchain.

Fungible Tokens (FT):

Traditional currencies and cryptocurrencies are fungible; they are identical, interchangeable, and divisible. For currencies to work as a standard payment method, fungibility is essential.
Fungible tokens do not have a unique serial number or history; there is nothing to distinguish one from the next. For example, every $5 note is exactly the same and holds the same value. Every half of one fungible token is equal to two-quarters of another.
Fungible tokens are useful for things like currency, reward points, discounts, and promotional materials—any item that doesn't require a unique identity.

Non-Fungible Tokens (NFT):

A non-fungible token is a unique asset.
Non-fungible tokens are not divisible and are stored in the Enjin Wallet as separate tokens with individual data. However, non-fungible tokens are not always 100% unique. For example, a set of tokens may share the same name, description, and image, but they can still be non-fungible if they possess unique, distinguishing properties (identity, history, and metadata).
Non-fungible tokens are suitable for things like identification, certificates, rare items, collectibles, gaming characters—any asset that requires its own unique identity.
There are two types of data that can be attached to each token.
  • Blockchain Data is committed permanently to the blockchain. The defining properties of a token, including its identity, settings, and ENJ-backed value can impact the demand for a token drastically. Therefore, much of this data can never be changed once committed to the blockchain. While some token settings can be updated by replacing old data with new data, the previous token settings will remain on record, viewable in the transaction history on the blockchain.
  • Metadata is the human-readable information that your users will be able to see in your game or app and any other platform where they can see your token. This data can be updated at any time.
Blockchain Data: Changeable
Blockchain Data
Changeable
Metadata URI
The metadata URI allows you to add a URL that contains a JSON that describes the properties of your item, including images.
Transferable
Determines if items are able to be traded, or are bound to their owners (i.e. non-tradable).
  • Permanent: Item is always able to be traded with others. This setting is not changeable once committed to a token.
  • Bound: The item is always bound to the owner of the item.
  • Temporary: The item is currently tradable, but the creator can make it non-tradable at a future date.
transferFeeSettings: value
If using ENJ, multiply the value by 10^18 to include 18 decimals. When you first set a transfer fee, that setting becomes the maximum fee you can charge. However, you can lower a transfer fee at any time, at which point, you can then raise it back to the amount you initially set.

Blockchain Data: Permanent

Blockchain Data
Permanent
totalSupply:
This is how many of the items you want to exist. This limit can be broken or mean different things depending on the supply model you use above.
initialReserve:
This is how many items you want to pre-pay & Reserve to mint as part of the initial create operation by locking a bit of ENJ on it. Minting items will be deducted from this balance until it is exhausted. You have to pay for at least one item on creation. Having an initial reserve allows you to create your item without having to spend all the ENJ for your total supply upon creation.
transferFeeSettings:type
Indicate if a fee (in ENJ or crypto items) will be charged to the sender when they send this asset to another address. This fee will be sent to the asset creator.
  • None: No Transfer fees are charged when this item changes hands.
  • Per_Crypto_Item: This refers to the transfer fee per asset in ENJ, which is cumulative based on the number of assets that are being sent.
  • Per_Transfer: This refers to the transfer fee, per transfer, in ENJ. For example, if an Apple has a 0.1 ENJ fee per transfer and Simon sends 10 apples to user1, Simon would be charged 0.1 ENJ for the transaction that would go to the creator of the apple asset.
  • Ratio_Cut: Note, to use ratio_cut, only fungible assets are allowed. A % cut of the total items is subtracted from the total for the creator, with the sender paying the total price.
  • Ratio_Extra: Note, to use ratio_extra, only fungible assets are allowed. A tax that is charged ON TOP of everything.
transferFeeSettings:
The token ID of the token you want to use as the transfer fee. Use 0 if you want your users to pay you in Enjin Coin.
meltValue
The amount of ENJ you want to use per unit of the item you are creating. The more items of one type you are making, the less ENJ you need per unit of item. It's, also important to note that you would need to set a value by multiplying the value by 10^18 to include 18 decimals. The minimum amount of ENJ backing can be calculated using this formula: 0.1 * Math.sqrt(initialReserve)/ initialReserve
supplyModel:
This is how the item pool behaves with respect to minting and melting.
The following are our current supply types:
  • Fixed: You can have up to a TOTAL SUPPLY number of items in circulation at one time.
  • Settable: This allows you to edit the total supply at any time.
  • Infinite: You can mint as many items as you want, exceeding TOTAL SUPPLY.
  • Collapsing: Once melted the items cannot be re-minted as this decreases the total supply of the token.
meltFeeRatio
This is the current percentage of ENJ that the player will receive upon melting the item. The remaining ENJ goes to the creator.
nonFungible
Whether the item is Non-Fungible or Fungible, a Boolean value.

Creating your first Blockchain Token

Now that you are familiarized with the possible parameters when creating your blockchain tokens, it's time for us to learn how to create it!
If you wish to learn how to create your tokens using our minting panel, our amazing support team has created a series of guides in our help center here.
First, make sure that your wallet is linked to your player wallet and that you have enough KENJ and KETH if you are using a Testnet environment. It's also important to make sure that your wallet has developer mode enabled, if not, this guide here should assist.
First, head over to the GraphQL Playground and select the Project Schema of your collection, this is the mutation that we are going to run to create our first token template, you can set the parameters accordingly to your needs -
mutation {
CreateAsset(
name: "NFT Test"
totalSupply: "1"
initialReserve: "1"
supplyModel: COLLAPSING
meltValue: "1000000000000000000"
meltFeeRatio: 0
transferable: PERMANENT
transferFeeSettings: {type:NONE}
nonFungible: true
wallet: "0xCc5e715008aceD612C00c0a4066AB7Da287cF0bB"
) {
value
id
title
state
project{name}
}
}
After hitting the play button on the playground, if all of your parameters are correct, this is the expected response that you should get from the platform.
{
"data": {
"CreateAsset": {
"value": "1",
"id": 98420,
"title": "NFT Test",
"state": "PENDING",
"project": {
"name": "Documentation Project Test"
}
}
}
}
The request is now pending approval in the wallet, to approve it, we must head to the requests tab in the Enjin Wallet and approve the create request as shown here.
Once the request has been approved, we can run this specific query to check on the current status of the request with the id from our previous create asset response -
query {
GetTransaction(id:98420) {
id
transactionId
title
type
value
state
projectWallet
asset{id, name}
}
}
After hitting the play button on the playground, if all of your parameters are correct, this is the expected response that you should get from the platform.
{
"data": {
"GetTransaction": {
"id": 98420,
"transactionId": "0x5e0790f6f253e11dae566a23760da161931ab6305b863289e3bbe2725536abfb",
"title": "NFT Test",
"type": "CREATE",
"value": "1",
"state": "EXECUTED",
"projectWallet": true,
"asset": {
"id": "70800000000029b7",
"name": "NFT Test"
}
}
}
}
The information that we will need to keep from this request is important for us to proceed with our next guide, in this case, make sure to keep the asset id close at heart as that will be necessary for us to set the asset metadata and mint the NFT to your Enjin Wallet.
Export as PDF
Copy link
On this page
What is a Blockchain Token?
Fungible Tokens (FT):
Non-Fungible Tokens (NFT):
Blockchain Data: Permanent
Creating your first Blockchain Token