Token

Token module allows you to manage assets on IRIS Hub

Available Commands

NameDescription
issueIssue a new token
editEdit an existing token
transferTransfer the ownership of a token
mintMint tokens to a specified address
burnBurn some tokens
swap-feeSwap one token with another token
swap-from-erc20Swap native token from the corresponding ERC20 at 1:1
swap-to-erc20Swap native token to the corresponding ERC20 at 1:1
tokenQuery a token by symbol
tokensQuery tokens by owner
feeQuery the token related fees
paramsQuery the token related params
total-burnQuery the total amount of all burn tokens
balancesQuery all the balances of an owner in special denom

iris tx token issue

Issue a new token

iris tx token issue [flags]

Flags:

Name, shorthandTypeRequiredDefaultDescription
--namestringYesName of the newly issued token, limited to 32 unicode characters, e.g. "IRIS Network"
--symbolstringYesThe symbol of the token, length between 3 and 8, alphanumeric characters beginning with alpha, case insensitive
--initial-supplyuint64YesThe initial supply of this token. The amount before boosting should not exceed 100 billion.
--max-supplyuint641000000000000The hard cap of this token, total supply can not exceed max supply. The amount before boosting should not exceed 1000 billion.
--min-unitstringThe alias of minimum uint
--scaleuint8YesA token can have a maximum of 18 digits of decimal
--mintablebooleanfalseWhether this token could be minted(increased) after the initial issuing

Issue a token

iris tx token issue \
    --name="Kitty Token" \
    --symbol="kitty" \
    --min-unit="kitty" \
    --scale=0 \
    --initial-supply=100000000000 \
    --max-supply=1000000000000 \
    --mintable=true \
    --from=<key-name> \
    --chain-id=<chain-id> \
    --fees=<fee>

Send tokens

You can send any tokens you have just like sending iris

Send tokens

iris tx bank send [from_key_or_address] [to_address] [amount] [flags]

iris tx token edit

Edit an existing token

iris tx token edit [symbol] [flags]

Flags:

NameTypeRequiredDefaultDescription
--namestringThe token name, e.g. IRIS Network
--max-supplyuint640The max supply of the token
--mintableboolfalseWhether the token can be minted, default to false

max-supply should not be less than the current total supply

Edit Token

iris tx token edit <symbol> --name="Cat Token" --max-supply=100000000000 --mintable=true --from=<key-name> --chain-id=<chain-id> --fees=<fee>

iris tx token transfer

Transfer the ownership of a token

iris tx token transfer [symbol] [flags]

Flags:

NameTypeRequiredDefaultDescription
--tostringYesThe new owner address

Transfer Token Owner

iris tx token transfer <symbol> --to=<to> --from=<key-name> --chain-id=<chain-id> --fees=<fee>

iris tx token mint

Mint tokens to a specified address

iris tx token mint [symbol] [flags]

Flags:

NameTypeRequiredDefaultDescription
--tostringAddress to which the token will be minted, default to the owner address
--amountuint64Yes0Amount of the tokens to be minted

iris tx token swap-fee

Swap one token with another token. For example, this feature can be used to exchange IRIS for ERIS.

iris tx token swap-fee [fee_paid] --to [reciever]

Flags:

NameTypeRequiredDefaultDescription
--tostringYesAddress to which the token will be swaped

Mint Token

iris tx token mint <symbol> --amount=<amount> --to=<to> --from=<key-name> --chain-id=<chain-id> --fees=<fee>

iris tx token burn

Burn some tokens

iris tx token burn [symbol] [flags]

Flags:

NameTypeRequiredDefaultDescription
--amountuint64Yes0Amount of the tokens to burnt

Burn Token

iris tx token burn <symbol> --amount=<amount> --from=<key-name> --chain-id=<chain-id> --fees=<fee>

iris tx token swap-from-erc20

Swap native token from the corresponding ERC20 at 1:1

iris tx token swap-from-erc20 [wanted_amount] [flags]

Flags:

NameTypeRequiredDefaultDescription
--tostringfalse""Eth address to which the token is to be received

Swap native token from erc20

iris tx token swap-from-erc20 <wanted_amount> --to=<eth_address> --from=<key-name> --chain-id=<chain-id> --fees=<fee>

iris tx token swap-to-erc20

Swap native token to the corresponding ERC20 at 1:1

iris tx token swap-to-erc20 [paid_amount] [flags]

Flags:

NameTypeRequiredDefaultDescription
--tostringfalse""Eth address to which the token is to be received

Swap native token to erc20

iris tx token swap-to-erc20 <paid_amount> --to=<eth_address> --from=<key-name> --chain-id=<chain-id> --fees=<fee>

iris query token token

Query a token by symbol

iris query token token [denom] [flags]

Query a token

iris query token token <denom>

iris query token tokens

Query tokens by the owner which is optional

iris query token tokens [owner] [flags]

Query all tokens

iris query token tokens

Query tokens with the specified owner

iris query token tokens <owner>

iris query token fee

Query the token related fees, including token issuance and minting

iris query token fee [symbol] [flags]

Query fees of issuing and minting a token

iris query token fee kitty

iris query token params

Query token module params

iris query token params [flags]

Query token module params

iris query token params

iris query token total-burn

Query the total amount of all burn tokens

iris query token total-burn [flags]

Query the total amount of all burn tokens

iris query token total-burn

iris query token balances

Query all the balances of an owner in special denom

iris query token balances [addr] [denom] [flags]

Query all the balances of an owner in special denom

iris query token balances <owner> <denom>