# Creating Fungible Tokens (Nibiru CLI)
The TokenFactory (tf) module on Nibiru Chain enables any account to create a new token with a specific format that includes the creator's address and a subdenomination. This method enables token creation without requiring permission and prevents problems related to name conflicts.
See "Nibid Setup" for instructions on installing nibid
.
By using this module, a single account can create multiple denominations by providing a unique subdenomination for each one. Once a denomination is created, the original creator gains "admin" privileges over the token
Using the Nibiru CLI, users can create denominations mint, burn, and change admins for created tokens.
# Understanding the denomination format
The Nibiru Token Factory denomination format is in tf/{creator-address}/{subdenom}
. Tokens created through the x/tokenfactory module are native to our chain and are prefixed with "tf," similar to the "ibc" prefix used for IBC assets. This prefixing convention helps avoid conflicts in naming.
In the tokenfactory/.../state.proto
file, the TFDenom message defines a token factory (TF) denomination. Its standard representation is tf/{creator-address}/{subdenom}
where {creator-address}
is the Bech32 address of the creator of the denomination, and {subdenom}
is a unique suffix specific to the creator, used during a token factory "Mint" operation.
# Creating a Denomination
Before running, ensure that you have configured the correct chain as explained in Nibiru Networks.
To verify denoms are created correctly, run a query on the creator address and ensure that the new subdenom is listed:
# Minting & Burning Tokens
To mint, esure that you have the correct denomaination format setup:
To burn token, you also need the same denomaination format:
To verify, you can check the receipient address's balance:
# Change Token Admin
To verify, you can query the denom information: