Skip to content

Commit

Permalink
Merge branch 'master' into refactor-code
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq authored Jun 5, 2024
2 parents 009f068 + b7c09e2 commit da3e0e7
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 16 deletions.
12 changes: 12 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:alpine AS builder
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
RUN yarn run build

FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /app/.vuepress/dist /usr/share/nginx/html/docs
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
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 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

```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 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
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>
```

0 comments on commit da3e0e7

Please sign in to comment.