From b98c07abbbbfe166c47892f52f0a910d5c3718ff Mon Sep 17 00:00:00 2001 From: Zhiqiang Zhang <745124335@qq.com> Date: Fri, 24 Sep 2021 11:06:28 +0800 Subject: [PATCH] Add farm module command docs (#2667) * add command docs * apply comments from github Co-authored-by: vincent --- docs/cli-client/farm.md | 113 +++++++++++++++++++++++++++++++++++++ docs/zh/cli-client/farm.md | 113 +++++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 docs/cli-client/farm.md create mode 100644 docs/zh/cli-client/farm.md diff --git a/docs/cli-client/farm.md b/docs/cli-client/farm.md new file mode 100644 index 0000000000..5d24d6e409 --- /dev/null +++ b/docs/cli-client/farm.md @@ -0,0 +1,113 @@ +# Farm + +Farm module allows you to easily create farm activities on irishub. + +## Available Commands + +| Name | Description | +| --------------------------------- | ----------------------------------------------------- | +| [create](#iris-tx-farm-create) | Create a new farm pool | +| [adjust](#iris-tx-farm-adjust) | Adjust farm pool parameters | +| [destroy](#iris-tx-farm-destroy) | Destroy the farm pool and get back the invested bonus | +| [stake](#iris-tx-farm-stake) | Deposit liquidity token | +| [harvest](#iris-tx-farm-harvest) | Get back the bonus for participating in the farm pool | +| [farmer](#iris-query-farm-farmer) | Query farmer information | +| [pool](#iris-query-farm-pool) | Query the current status of a farm pool | +| [pools](#iris-query-farm-pools) | Query farm pool information by page | +| [params](#iris-query-farm-params) | Query the management parameters of the farm module | + +## iris tx farm create + +Create a new farm pool and pay the handling fee and bonus. + +```bash +iris tx farm create [flags] +``` + +**Flags:** + +| Name, shorthand | Required | Default | Description | +| ------------------ | -------- | ------- | -------------------------------------------------------- | +| --lp-token-denom | true | | The liquidity token accepted by farm pool | +| --reward-per-block | true | | The reward per block,ex: 1iris,1atom | +| --total-reward | true | | The Total reward for the farm pool | +| --description | false | "" | The simple description of a farm pool | +| --start-height | true | | The start height the farm pool | +| --editable | false | false | Is it possible to adjust the parameters of the farm pool | + +### iris tx farm adjust + +Adjust the parameters of the pool before the farm pool ends, such as `reward-per-block`, `total-reward`. + +```bash +iris tx farm adjust [flags] +``` + +**Flags:** + +| Name, shorthand | Required | Default | Description | +| ------------------- | ----------------------------------------- | ------- | ------------------------------------ | +| --additional-reward | And `--reward-per-block` must choose one | "" | Bonuses added to the farm pool | +| --reward-per-block | And `--additional-reward` must choose one | "" | The reward per block,ex: 1iris,1atom | + +## iris tx farm destroy + +Destroy the farm pool and get back the invested bonus.The rewards earned by the user farm ends at this moment, requiring the user to manually retrieve the income and the liquidity of the deposit. + +```bash +iris tx farm destroy [flags] +``` + +### iris tx farm stake + +The farmer participates in farm activities by staking the liquidity tokens specified by the pool. The rewards obtained by participating in the activities are related to the number of staking tokens and farm pool parameters. + +```bash +iris tx farm stake [flags] +``` + +### iris tx farm harvest + +The farmer withdraws his rewards back. + +```bash +iris tx farm harvest +``` + +### iris query farm farmer + +Query farmer's information, including unclaimed rewards, mortgage liquidity, etc. + +```bash +iris query farm farmer --pool-name +``` + +**Flags:** + +| Name, shorthand | Required | Default | Description | +| --------------- | -------- | ------- | ------------------ | +| --pool-name | false | "" | the farm pool name | + +### iris query farm pool + +Query related information of a farm pool by name + +```bash +iris query farm pool +``` + +### iris query farm pools + +Paging query farm pool + +```bash +iris query farm pools +``` + +### iris query farm params + +Paging query farm pool + +```bash +iris query farm params +``` diff --git a/docs/zh/cli-client/farm.md b/docs/zh/cli-client/farm.md new file mode 100644 index 0000000000..d0a5bf4f23 --- /dev/null +++ b/docs/zh/cli-client/farm.md @@ -0,0 +1,113 @@ +# Farm + +Farm 模块允许您在`irishub`上轻松创建`Farm`活动。 + +## 可用命令 + +| 名称 | 描述 | +| ------------------------------------------ | ---------------------------- | +| [创建 Pool](#iris-tx-farm-create) | 创建一个新的`Farm`池 | +| [调整 Pool 参数](#iris-tx-farm-adjust) | 调整`Farm`池参数 | +| [销毁 Pool](#iris-tx-farm-destroy) | 销毁`Farm`池并取回投入的奖金 | +| [抵押流动性](#iris-tx-farm-stake) | 抵押流动性代币 | +| [取回奖励](#iris-tx-farm-harvest) | 取回参与`Farm`池而获取的奖金 | +| [查询 Farmer](#iris-query-farm-farmer) | 查询 Farmer 信息 | +| [查询`Farm`池](#iris-query-farm-pool) | 查询`Farm`池的当前状态 | +| [分页查询`Farm`池](#iris-query-farm-pools) | 按页查询`Farm`池信息 | +| [查询可治理参数](#iris-query-farm-params) | 查询`Farm`模块的可治理参数 | + +## iris tx farm create + +创建一个新的`Farm`池 并支付手续费和奖金。 + +```bash +iris tx farm create [flags] +``` + +**标志:** + +| 名称,速记 | 是否必须 | 默认 | 描述 | +| ------------------ | -------- | ----- | ------------------------- | +| --lp-token-denom | 是 | |`Farm`池可接受的流动性代币 | +| --reward-per-block | 是 | | 每个区块的奖励 | +| --total-reward | 是 | | 总奖励 | +| --description | 否 | "" |`Farm`池的简要描述 | +| --start-height | 是 | |`Farm`池的开始高度 | +| --editable | 否 | false |`Farm`池是否可编辑 | + +### iris tx farm adjust + +在`Farm`池结束前调整池的参数,例如`reward-per-block`、`total-reward`。 + +```bash +iris tx farm adjust [flags] +``` + +**标志:** + +| 名称,速记 | 是否必须 | 默认 | 描述 | +| ------------------- | ----------------------------- | ---- | -------------------- | +| --additional-reward | 和`--reward-per-block`二选一 | "" | 向`Farm`池追加的奖金 | +| --reward-per-block | 和`--additional-reward`二选一 | "" | 每个区块的奖励 | + +## iris tx farm destroy + +销毁`Farm`池,取回投入的奖金。此时用户农场获得的奖励结束,需要用户手动取回奖励和流动性代币。 + +```bash +iris tx farm destroy [flags] +``` + +### iris tx farm stake + +Farmer 通过抵押`Farm`池指定的流动性代币来参与`Farm`活动。参与活动获得的奖励与质押代币数量和`Farm`池参数有关。 + +```bash +iris tx farm stake [flags] +``` + +### iris tx farm harvest + +Farmer 取回奖励。 + +```bash +iris tx farm harvest [flags] +``` + +### iris query farm farmer + +查询 Farmer 信息,包括待领取的奖励、抵押的流动性等。 + +```bash +iris query farm farmer --pool-name +``` + +**标志:** + +| 名称,简写 | 必填 | 默认 | 说明 | +| ----------- | ---- | ---- | ----------- | +| --pool-name | 否 | "" |`Farm`池名称 | + +### iris query farm pool + +按名称查询`Farm`池的相关信息 + +```bash +iris query farm pool +``` + +### iris query farm pools + +分页查询`Farm`池 + +```bash +iris query farm pools +``` + +### iris query farm params + +查询`Farm`模块的可治理的参数 + +```bash +iris query farm params +```