Injective | Documentation
InjectiveGithub
Injective | Documentation
Injective | Documentation
  • About Injective
  • DeFi
    • Wallet
      • Create a wallet
      • Accounts
    • Trading
      • Order Types
      • Trading Fees and Rebates
      • Margin Trading
      • Liquidation
      • Funding Rates
      • Performing Liquidations
      • Derivatives
      • Perpetuals
      • Expiry Futures
      • Pre-Launch Futures
      • Index Perpetual Futures
      • iAssets
    • Token Standards
      • INJ coin
      • Token Factory
      • CW20 Standard
    • Bridge
      • From Ethereum
      • From Solana
      • Using Wormhole
      • Using IBC
    • Staking
    • Governance
    • Auction
    • Transactions
    • Transaction Gas and Fees
    • Open Liquidity Program
      • Introduction
      • Rewards
      • Epochs
      • Eligibility
      • Program Details
      • Scoring Formula/Methodology
      • Formula Parameters
      • Reward Allocations
      • Flexible Reward Allocations
      • Eligible Markets
      • Legacy Reward Allocations
      • Reward Disbursements
      • Performance Tracking
      • Volatility Response Modifications
      • Fee Tiers
    • Injective Hub
    • Injective Explorer
  • Infrastructure
    • Command Line Node Interaction
    • gRPC Node Interaction
    • Go Node Interaction
    • REST Node Interaction
    • Run Node
    • Set up Keyring
    • Join Network
    • Cosmovisor
    • Upgrade Node
    • Mainnet Validator
      • Peggo
      • Canonical Chain Upgrades
      • v1.16.2
      • v1.16.1
      • v1.16.0
      • v1.15.0
      • v1.14.1
      • v1.14.0
      • v1.13.3
      • v1.13.2
      • v1.13.0 - Altaris
      • v1.12.1
      • v1.12.0 - Volan
      • v1.11.0
      • v1.10.0
      • 10009
      • 10008 - Camelot
      • 10007-rc1
      • 10006-rc1
      • 10005-rc1
      • 10004-rc1-patch
      • 10004-rc1
      • 10003-rc1
      • 10002-rc2
      • 10002-rc1
    • Testnet Validator
      • Peggo
    • Public Endpoints
    • Premium Endpoints
    • Archival Setup
    • Indexer API Reference
  • Developers
    • Convert addresses
    • Network Information
    • injectived
      • Install injectived
      • Using injectived
      • injectived Commands
      • Testnet Proposals
    • Concepts
      • Sentry Node
      • Indexer API
      • Trading Account
      • gRPC and Protobuf
      • Token Factory
      • Market min price tick size calculation
      • Market min quantity tick size calculation
      • CosmJs Support
      • Networks
    • Assets
      • Denom
      • Token Metadata
      • Injective List
      • Creating Tokens
    • dApps
      • Nuxt configuration
      • React configuration
      • Running examples
      • Smart contract examples
      • DEX examples
      • Webpack examples
    • Testnet Faucet
    • Chain API Reference
    • Injective TypeScript SDK
    • Injective Go SDK
    • Injective Python SDK
    • Injective CosmWasm SDK
    • Injective Rust SDK
    • The Graph
  • EVM Developers
    • EVM Network Information
    • Your First EVM Smart Contract
      • Compile with Hardhat
      • Test with Hardhat
      • Deploy with Hardhat
      • Verify with Hardhat
      • Interact with Hardhat
      • Compile with Foundry
      • Test with Foundry
      • Deploy with Foundry
      • Verify with Foundry
      • Interact with Foundry
    • Your First EVM dApp
      • Connect with MetaMask
      • Connect with WalletConnect
    • EVM Equivalence
    • MultiVM Token Standard
    • Precompiles
    • Bank Precompile
    • Exchange Precompile
    • ERC20 Module
    • Infrastructure & Tooling
    • EVM Testnet Faucet
    • EVM Testnet Explorer
  • Cosmwasm Developers
    • CosmWasm Smart Contracts
      • Your First CosmWasm Smart Contract
      • Injective Name Service
      • NeptuneService
      • CW20 to Bank & Market Order in One Transaction
    • Local Development Guide
    • Mainnet Deployment Guide
    • Whitelisting Deployment Address Guide
    • Create your Swap Contract Guide
    • Creating UIs Guide
    • Using Injective Queries and Messages
    • CW20 Adapter
    • Injective Test Tube
  • DeFi Developers
    • Min Price Tick Size Calculation
    • Min Quantity Tick Size Calculation
    • Testnet Faucet Integration
    • Launch a Token
    • Launch a Market
    • Denom Metadata
    • Provider Oracle
    • Build a DEX
    • Exchange API Reference
  • Native Developers
    • Wallets
      • Accounts
      • Connections
      • Strategy
      • Offchain Data
    • Bridges
      • Ethereum Bridge
    • Transactions
      • Cosmos Transaction
      • Ledger through Keplr Wallet Transaction
      • Ethereum Transaction
      • Ledger through Keplr Wallet Transaction
      • MsgBroadcaster Transaction
      • Private Key Transaction
      • Web3 Gateway Transaction
    • Transaction Examples
      • Auction
      • AuthZ
      • Bank
      • Distribution
      • Exchange
      • Fee Grant
      • Governance
      • IBC
      • Insurance
      • Peggy
      • Permissions
      • Staking
      • Token Factory
      • Wasm
    • Querying the Chain
      • Auction
      • Auth
      • Bank
      • Distribution
      • Exchange
      • Governance
      • IBC
      • Mint
      • Insurance Fund
      • Oracle
      • Peggy
      • Permissions
      • Staking
      • Tendermint
      • Wasm
      • WasmX
      • Token Factory
    • Querying the Indexer
      • Account
      • Auction
      • Derivatives
      • Explorer
      • Insurance Funds
      • Markets
      • Leaderboard
      • Mito
      • Oracle
      • Portfolio
      • Spot
      • Web3 Gateway Transactions
    • Streaming the Indexer
      • Account
      • Auction
      • Derivatives
      • Oracle
      • Portfolio
      • Spot
      • Explorer
    • Querying Ethereum with GraphQL
    • Injective Modules
      • Auction
        • State
        • Messages
        • EndBlock
        • Events
        • Params
        • Errors
      • Exchange
        • Derivative Markets Concepts
        • Spot Markets Concepts
        • Binary Option Markets Concepts
        • Other Concepts
        • State
        • State Transitions
        • Messages
        • Proposals
        • BeginBlock
        • EndBlock
        • Events
        • Params
        • MsgPrivilegedExecuteContract
        • Errors
      • ERC20
        • Concepts
        • State
        • Messages
        • Events
      • EVM
        • Concepts
        • State
        • State Transitions
        • Transactions
        • ABCI
        • Hooks
        • Events
        • Params
        • Client
      • Insurance
        • State
        • State Transitions
        • Messages
        • EndBlock
        • Events
        • Params
        • Improvements
        • Errors
      • OCR
        • Concepts
        • State
        • Messages
        • Proposals
        • BeginBlock
        • Hooks
        • Events
        • Params
        • Errors
      • Oracle
        • State
        • Keeper
        • Messages
        • Proposals
        • Events
        • Improvements
        • Errors
      • Peggy
        • Definitions
        • Workflow
        • State
        • Messages
        • Slashing
        • EndBlock
        • Events
        • Params
        • Relay Semantics
        • Improvements
        • Errors
      • Permissions
        • Concepts
        • State
        • State Transition
        • Errors
      • TokenFactory
        • Concepts
        • State
        • Messages
        • Events
        • Params
        • Errors
      • WasmX
        • Concepts
        • Data
        • Proposals
        • Messages
        • Params
        • Errors
      • Lanes
      • TxFees
    • Core Modules
      • Auth
      • AuthZ
      • Bank
      • Consensus
      • Crisis
      • Distribution
      • Evidence
      • Feegrant
      • Gov
      • Group
      • Mint
      • NFT
      • Params
      • Slashing
      • Staking
      • Upgrade
      • Circuit
      • Genutil
  • FAQ
  • Glossary
  • References
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. DeFi Developers

Launch a Token

PreviousTestnet Faucet IntegrationNextLaunch a Market

Last updated 1 month ago

CtrlK
  • Bridging
  • Creating a New Token
  • Using Injective Hub
  • Using TokenStation​
  • Using DojoSwap​
  • Programmatically

Within this document, we'll explain how to launch a token on Injective.

There are two options for launching a token on Injective: bridging an existing token or creating a new token.

Bridging

The easiest way to launch a token on Injective is by bridging your existing assets from one of the supported networks that Injective is interoperable with. There are guides in the Bridge sections that you can reference to bridge assets from other networks to Injective.

Once the bridging process is completed, a token will be created on Injective, which you can then use to Launch a Market.

Creating a New Token

You can also create a new token on Injective using the TokenFactory module. There are multiple ways on how to achieve this.

Using Injective Hub

The Injective Hub web app provides you the ability to create and manage tokens seamlessly, creating a market on Injective's native orderbook, etc.

Using TokenStation​

The TokenStation web app provides you the ability to create and manage tokens seamlessly, creating a market on Injective's native orderbook, launching an airdrop, and much more.

Using DojoSwap​

Similar to above, you can utilize DojoSwap's Market Creation module to create, manage, and list your token, along with several other useful features.

Programmatically

Using TypeScript

Learn more about launching a token.

Using Injective CLI

You have to have injectived installed locally before proceeding with this tutorial. You can learn more about it on the injectivedpage.

Once you have injectived installed and a key added, you can use the CLI to launch your token:

  1. Create a TokenFactory denom

The fee for creating a factory denom is 0.1 INJ.

injectived tx tokenfactory create-denom [subdenom] [name] [symbol] [decimals] --from=YOUR_KEY --chain-id=injective-888 --node=https://testnet.tm.injective.network:443 --gas-prices=500000000inj --gas 1000000

Tokens are namespaced by the creator address to be permissionless and avoid name collision. In the example above, the subdenom is ak but the denom naming will be factory/{creator address}/{subdenom}.

  1. Submit token metadata

To get your token visible on Injective dApps, you have to submit its metadata.

injectived tx tokenfactory set-denom-metadata "My Token Description" 'factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/ak' AKK AKCoin AK '' '' '[
{"denom":"factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/ak","exponent":0,"aliases":[]},
{"denom":"AKK","exponent":6,"aliases":[]}
]' 6 --from=YOUR_KEY --chain-id=injective-888 --node=https://testnet.sentry.tm.injective.network:443 --gas-prices=500000000inj --gas 1000000

This command expects the following arguments:

injectived tx tokenfactory set-denom-metadata [description] [base] [display] [name] [symbol] [uri] [uri-hash] [denom-unit (json)] [decimals]
  1. Mint tokens

Once you have created your token and submitted the token metadata, it's time to mint your tokens.

injectived tx tokenfactory mint 1000000factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/ak --from=gov --chain-id=injective-888 --node=https://testnet.sentry.tm.injective.network:443 --gas-prices=500000000inj --gas 1000000

This command will mint 1 token, assuming your token has 6 decimals.

  1. Burn tokens

The admin of the token, can also burn the tokens.

injectived tx tokenfactory burn 1000000factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/ak --from=gov --chain-id=injective-888 --node=https://testnet.sentry.tm.injective.network:443 --gas-prices=500000000inj --gas 1000000
  1. Change admin

It's recommended once you have minted the initial supply to change admin to the null address to make sure that the supply of the token cannot be manipulated. Once again, the admin of the token can mint and burn supply anytime. The NEW_ADDRESS, as explained above in most of the cases should be set to inj1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqe2hm49.

injectived tx tokenfactory change-admin factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/ak NEW_ADDRESS --from=gov --chain-id=injective-888 --node=https://testnet.sentry.tm.injective.network:443 --gas-prices=500000000inj --gas 1000000

The examples above are for testnet. If you want to run them on mainnet, do the following changes:

injective-888 > injective-1

https://testnet.sentry.tm.injective.network:443 > http://sentry.tm.injective.network:443

Using Cosmwasm

To create and manage a bank token programmatically via a smart contract, one can use the following messages found in the injective-cosmwasm package:

create_new_denom_msg

pub fn create_new_denom_msg(sender: String, subdenom: String) -> CosmosMsg<InjectiveMsgWrapper> {
    InjectiveMsgWrapper {
        route: InjectiveRoute::Tokenfactory,
        msg_data: InjectiveMsg::CreateDenom { sender, subdenom },
    }
    .into()
}

Purpose: Creates a message to create a new token denomination using the tokenfactory module.

Parameters:

  • sender: The address of the account initiating the creation.

  • subdenom: The sub-denomination identifier for the new token.

Returns: A CosmosMsg wrapped in an InjectiveMsgWrapper, ready to be sent to the Injective blockchain.

Example:

let new_denom_message = create_new_denom_msg(
    env.contract.address,  // Sender's address
    "mytoken".to_string(), // Sub-denomination identifier
);

create_set_token_metadata_msg

pub fn create_set_token_metadata_msg(denom: String, name: String, symbol: String, decimals: u8) -> CosmosMsg<InjectiveMsgWrapper> {
    InjectiveMsgWrapper {
        route: InjectiveRoute::Tokenfactory,
        msg_data: InjectiveMsg::SetTokenMetadata {
            denom,
            name,
            symbol,
            decimals,
        },
    }
    .into()
}

Purpose: Creates a message to set or update metadata for a token.

Parameters:

  • denom: The denomination identifier of the token.

  • name: The full name of the token.

  • symbol: The symbol of the token.

  • decimals: The number of decimal places the token uses.

Returns: A CosmosMsg wrapped in an InjectiveMsgWrapper, ready to be sent to the Injective blockchain.

Example:

let metadata_message = create_set_token_metadata_msg(
    "mytoken".to_string(),         // Denomination identifier
    "My Custom Token".to_string(), // Full name
    "MYT".to_string(),             // Symbol
    18,                            // Number of decimals
);

create_mint_tokens_msg

pub fn create_mint_tokens_msg(sender: Addr, amount: Coin, mint_to: String) -> CosmosMsg<InjectiveMsgWrapper> {
    InjectiveMsgWrapper {
        route: InjectiveRoute::Tokenfactory,
        msg_data: InjectiveMsg::Mint { sender, amount, mint_to },
    }
    .into()
}

Purpose: Creates a message to mint new tokens. The token must be a tokenfactory token and the sender must be the token admin.

Parameters:

  • sender: The address of the account initiating the mint operation.

  • amount: The amount of tokens to mint.

  • mint_to: The recipient address where the newly minted tokens should be sent.

Returns: A CosmosMsg wrapped in an InjectiveMsgWrapper, ready to be sent to the Injective blockchain.

Example:

let mint_message = create_mint_tokens_msg(
    env.contract.address,                                   // Sender's address
    Coin::new(1000, "factory/<creator-address>/mytoken"),   // Amount to mint
    "inj1...".to_string(),                                  // Recipient's address
);

create_burn_tokens_msg

pub fn create_burn_tokens_msg(sender: Addr, amount: Coin) -> CosmosMsg<InjectiveMsgWrapper> {
    InjectiveMsgWrapper {
        route: InjectiveRoute::Tokenfactory,
        msg_data: InjectiveMsg::Burn { sender, amount },
    }
    .into()
}

Purpose: Creates a message to burn tokens. The token must be a tokenfactory token and the sender must be the token admin.

Parameters:

  • sender: The address of the account initiating the burn operation.

  • amount: The amount of tokens to burn.

Returns: A CosmosMsg wrapped in an InjectiveMsgWrapper, ready to be sent to the Injective blockchain.

Example:

let burn_message = create_burn_tokens_msg(
    env.contract.address,                                    // Sender's address
    Coin::new(500, "factory/<creator-address>/mytoken"),     // Amount to burn
);