Terraport
Launch Terraport
  • Welcome to Terraport
  • Terraport FAQ
  • How To
    • Swap
    • Liquidity Providing
    • Staking
    • Liquid Staking
    • Farming
    • Leaderboard
      • Points
    • Launchpad
  • GOVERNANCE
    • Introduction
    • Proposal
    • Voting
  • SAFETY AND SECURITY
    • Audit
    • KYC
    • Bug Bounty
    • Safety and Risk Advice
      • Regulatory Advice
      • Terraport Advanced Products
      • Specific Risks of Cryptoassets
  • Developers
    • Mint Your CW20 Token
    • Create Your Own Pair
    • Query
  • Resources
    • Contracts
    • API
    • Roadmap
  • Sponsorship
    • Banner
  • Contact Us
    • Social Account & Communities
Powered by GitBook
On this page
  • Introduction
  • How to Mint

Was this helpful?

  1. Developers

Mint Your CW20 Token

Introduction

This token contract is implemented under the CW20 standard and it fully supports Terraport features. Except for any function of your token itself, we recommend minting your own token by instantiating this binary that is fully audited by CertiK, rather than developing your own.

NOTE

We strongly encourage you to create using the pre-stored binary. There are some advantages below:

  • The token and pair contract codes are throughly audited by CertiK, so you do not need to have an additional Audit for this code.

  • You don’t have to migrate your contract whenever the Terra network performs an upgrade. Terraport will help you to migrate so that you don’t have to take any action.

  • You can find the token id in contracts section.

How to Mint

1. Using Deployed Token Factory (Recommended)

The standard CW20 token is already stored in Terra Classic network.

You may instantiate your own token using the JSON as follows:

{
    "name": "your_token_name",
    "symbol": "SYMBOL",
    "decimals": 6,
    "initial_balances": [
        {
            "address": "terraaddress0001asdfsdfbqwer...",
            "amount": "10000"
        },
        {
            "address": "terraaddress0002asdfsdfbqwer...",
            "amount": "10000"
        },
        ...
    ]
}

Then, the CLI reads:

terrad tx wasm instantiate <token_bin_code> '{"name": "yout_token_name", "symbol": "SYMBOL", "decimals": 3, ... }' --from your_key

After confirmation, your token is minted on the Terra Classic network!

With your tx hash, you may query the tx:

terrad query tx EF2REFAWE234A2EFV....

Then, you may find the address of your contract from:

{
    "key": "contract_address",
    "value": "terra18vd8fpwxzck93qlwghaj6arh4p7c5n896xzem5"
}

NOTE


PreviousSpecific Risks of CryptoassetsNextCreate Your Own Pair

Last updated 7 months ago

Was this helpful?

You can easily try it on , too! Search by the contract address, input the organized JSON, and execute!

Station web application