Token Factory
The Token Factory module on Stargaze enables the creation of native fungible tokens. The feature allows projects to use the functions provided by the Cosmos SDK Bank Module for token distribution. The tokens are denominated as factory/{creator_address}/{subdenom}
and a single account can create multiple tokens, by providing a unique subdenom for each created token. Once a token is created, the original creator is given "admin" privileges over the asset. The creator can mint and burn tokens or transfer the admin privileges to another address.
Token Factory Denom Restrictions
Token Factory denoms are of form
factory/{creator_address}/{subdenom}
The maximum
subdenom
length is 44 charactersThe maximum
creator_address
length is 75 characters
Interacting with the Token Factory module
Prerequisites
Building the starsd binary
Creating or Importing a wallet account
You may create a new wallet account with the following command
or import an existing one with
Configuring RPC Endpoint and Chain ID
Testnet Configuration
Mainnet Configuration
Checking your account balance
You may check your wallet balance with the following command:
Creating a new token denom costs 10000 STARS + fees. The following transactions may fail if the wallet balance is not sufficient to cover the required cost and fees.
You may join our Discord server and request testnet STARS on the #faucet channel.
Creating a New Token
Executing the following command will create a token with the following denom: factory/<local_wallet_address>/<token_subdenom>
The result of the transaction can be queried using the transaction hash received as follows:
The following blockchain explorers can also be utilized to follow transaction results:
Testnet Explorer: https://testnet-explorer.publicawesome.dev/stargaze/
Mainnet Explorer: https://dev.mintscan.io/stargaze/
Checking the tokens created by an account
To see a list of tokens created by a specific account, you may use the following command:
Minting Tokens
You may use the following command to mint tokens of a denom you created to your wallet:
Burning Tokens
You may burn tokens of a denom you created from your wallet with the following command:
Transferring Tokens
You may utilize the Bank module as follows to distribute tokens after minting them:
Changing the admin for a token
You may transfer the admin privileges to another address for a token you previously created as follows:
Querying the admin for a token
You may query the address that holds the admin privileges over a token as follows:
Last updated