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

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

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


Last updated

Was this helpful?