Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update token command docs #2940

Merged
merged 2 commits into from
May 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 74 additions & 16 deletions docs/cli-client/token.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ Token module allows you to manage assets on IRIS Hub

## Available Commands

| Name | Description |
|--------------------------------------------|--------------------------------------------|
| [issue](#iris-tx-token-issue) | Issue a new token |
| [edit](#iris-tx-token-edit) | Edit an existing token |
| [transfer](#iris-tx-token-transfer) | Transfer the ownership of a token |
| [mint](#iris-tx-token-mint) | Mint tokens to a specified address |
| [burn](#iris-tx-token-burn) | Burn some tokens |
| [swap-fee](#iris-tx-token-swap-fee) | Swap one token with another token |
| [token](#iris-query-token-token) | Query a token by symbol |
| [tokens](#iris-query-token-tokens) | Query tokens by owner |
| [fee](#iris-query-token-fee) | Query the token related fees |
| [params](#iris-query-token-params) | Query the token related params |
| [total-burn](#iris-query-token-total-burn) | Query the total amount of all burn tokens. |
| Name | Description |
| ------------------------------------------------- | ----------------------------------------------------- |
| [issue](#iris-tx-token-issue) | Issue a new token |
| [edit](#iris-tx-token-edit) | Edit an existing token |
| [transfer](#iris-tx-token-transfer) | Transfer the ownership of a token |
| [mint](#iris-tx-token-mint) | Mint tokens to a specified address |
| [burn](#iris-tx-token-burn) | Burn some tokens |
| [swap-fee](#iris-tx-token-swap-fee) | Swap one token with another token |
| [swap-from-erc20](#iris-tx-token-swap-from-erc20) | Swap native token from the corresponding ERC20 at 1:1 |
| [swap-to-erc20](#iris-tx-token-swap-to-erc20) | Swap native token to the corresponding ERC20 at 1:1 |
| [token](#iris-query-token-token) | Query a token by symbol |
| [tokens](#iris-query-token-tokens) | Query tokens by owner |
| [fee](#iris-query-token-fee) | Query the token related fees |
| [params](#iris-query-token-params) | Query the token related params |
| [total-burn](#iris-query-token-total-burn) | Query the total amount of all burn tokens |
| [balances](#iris-query-token-balances) | Query all the balances of an owner in special denom |

## iris tx token issue

Expand Down Expand Up @@ -130,11 +133,12 @@ Swap one token with another token. For example, this feature can be used to exch
```bash
iris tx token swap-fee [fee_paid] --to [reciever]
```

**Flags:**

| Name | Type | Required | Default | Description |
| -------- | ------ |----------| ------- |-------------------------------------------|
| --to | string | Yes | | Address to which the token will be swaped |
| Name | Type | Required | Default | Description |
| ---- | ------ | -------- | ------- | ----------------------------------------- |
| --to | string | Yes | | Address to which the token will be swaped |

### Mint Token

Expand Down Expand Up @@ -162,6 +166,46 @@ iris tx token burn [symbol] [flags]
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

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

**Flags:**

| Name | Type | Required | Default | Description |
| ---- | ------ | -------- | ------- | ------------------------------------------------ |
| --to | string | false | "" | Eth address to which the token is to be received |

### Swap native token from erc20

```bash
iris tx token burn <symbol> --amount=<amount> --from=<key-name> --chain-id=<chain-id> --fees=<fee>
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved
```

## iris tx token swap-to-erc20

Swap native token to the corresponding ERC20 at 1:1

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

**Flags:**

| Name | Type | Required | Default | Description |
| ---- | ------ | -------- | ------- | ------------------------------------------------ |
| --to | string | false | "" | Eth address to which the token is to be received |

### Swap native token to erc20

```bash
iris tx token burn <symbol> --amount=<amount> --from=<key-name> --chain-id=<chain-id> --fees=<fee>
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved
```

## iris query token token
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved

Query a token by symbol
Expand Down Expand Up @@ -237,3 +281,17 @@ iris query token total-burn [flags]
```bash
iris query token total-burn
```

## iris query token balances

Query all the balances of an owner in special denom

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

### Query all the balances of an owner in special denom

```bash
iris query token balances <owner> <denom>
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved
```
Loading