Skip to main content
The TokenFactory module enables any account to create a new token with the following naming convention: factory/{creator address}/{subdenom}. By namespace-separating tokens with the creator’s address, token minting becomes permissionless, eliminating the need to resolve name collisions. A single account can create multiple denominations by providing a unique subdenom for each new denomination. Upon creation, the original creator is granted “admin” privileges over the asset. This allows them to:
  • Minting the token to any account
  • Burning the token from any account
  • Transferring the token between any two accounts
  • Changing the admin (in the future, more admin capabilities may be added)

Tutorial

Create Token Denom

Creates a token denom in the format factory/{creator address}/{subdenom} with the specified creator address and subdenom. Subdenoms can only contain the characters [a-zA-Z0-9./].
minitiad tx tokenfactory create-denom [sub-denom] \
    --from test-account \
    --gas auto --gas-adjustment 1.5 \
    --gas-prices [gas-price] \
    --node [rpc-url]:[rpc-port] \
    --chain-id [chain-id]

Mint

Minting is the process of creating new tokens for a specific denom and assigning them to a specified address. Only the current admin can mint tokens for that denom. By default, the creator of the denom is its first admin.
minitiad tx tokenfactory mint [amount] [to-address] \
    --from test-account \
    --gas auto --gas-adjustment 1.5 \
    --gas-prices [gas-price] \
    --node [rpc-url]:[rpc-port] \
    --chain-id [chain-id]
    
# amount example
# 10000factory/init1.../udenom

Burn

Burning is the process of permanently removing tokens from circulation by destroying them. Only the current admin can burn a specific denom.
minitiad tx tokenfactory burn [amount] [burn-from-address] \
    --from test-account \
    --gas auto --gas-adjustment 1.5 \
    --gas-prices [gas-price] \
    --node [rpc-url]:[rpc-port] \
    --chain-id [chain-id]

# amount example
# 10000factory/init1.../udenom

Change Admin

The change-admin command allows the current admin to transfer admin privileges for the denom to another account.
minitiad tx tokenfactory change-admin [denom] [new-admin] \
    --from test-account \
    --gas auto --gas-adjustment 1.5 \
    --gas-prices [gas-price] \
    --node [rpc-url]:[rpc-port] \
    --chain-id [chain-id]

# denom example
# factory/init1.../udenom