Skip to content

Commit

Permalink
merge doc change from master (#2887)
Browse files Browse the repository at this point in the history
* chore: fix doc

* chore: fix doc

* update docs to append mandatory cmd options (#2862)

* Update nft.md

* Update distribution.md

* Update mt.md

* Update service.md

* Update state-sync.md (#2861)

replace IP with domain name, sentry-0.mainnet.irisnet.org and sentry-1.mainnet.irisnet.org

Co-authored-by: Dreamer <[email protected]>

* fix dependabot alerts

* update package-lock.json

---------

Co-authored-by: aofengli <[email protected]>
Co-authored-by: XB <[email protected]>
Co-authored-by: Dreamer <[email protected]>
Co-authored-by: jinbiao-bianjie <[email protected]>
  • Loading branch information
5 people authored Dec 6, 2023
1 parent 96af9ec commit 927a1cc
Show file tree
Hide file tree
Showing 10 changed files with 4,736 additions and 25,578 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 26 additions & 21 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const glob = require("glob");
const markdownIt = require("markdown-it");
const meta = require("markdown-it-meta");
const fs = require("fs");
const _ = require("lodash");

import glob from 'glob';
import markdownIt from 'markdown-it'
import meta from 'markdown-it-meta'
import fs from 'fs'
import _ from 'lodash'
import { searchPlugin } from '@vuepress/plugin-search'
const sidebar = (directory, array) => {
return array.map(i => {
const children = _.sortBy(
Expand All @@ -20,22 +20,27 @@ const sidebar = (directory, array) => {
.filter(f => f.order !== false),
["order", "path"]
)
.map(f => f.path)
.map(f => f.path.slice(1))
.filter(f => !f.match("README"));

return {
title: i[0],
children
text: i[0],
children,
collapsible:true
};
});
};

module.exports = {
import{defineUserConfig } from 'vuepress'
import { defaultTheme } from 'vuepress'
export default defineUserConfig( {
base: "/docs/",
plugins: [
['@vuepress/search', {
searchMaxSuggestions: 10
}]
searchPlugin({
locales: {
'/': {
placeholder: 'Search',
},
}
}),
],
locales: {
"/": {
Expand All @@ -44,16 +49,16 @@ module.exports = {
description: "IRISnet Documents",
}
},
themeConfig: {
theme: defaultTheme({
repo: "irisnet/irishub",
docsDir: "docs",
editLinks: true,
docsBranch: "master",
docsBranch: "main",
editLinkText: 'Help us improve this page!',
locales: {
"/": {
editLinkText: 'Help us improve this page!',
nav: [
navbar: [
{
text: 'Back to IRISnet',
link: 'https://www.irisnet.org'
Expand All @@ -69,8 +74,8 @@ module.exports = {
["Tools", "tools"],
["Migration", "migration"],
["Resources", "resources"]
])
]),
}
},
}
};
}),
});
2 changes: 1 addition & 1 deletion docs/features/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ By default, the reward will be paid to the wallet address which send the delegat
The delegator could set a new wallet as reward paid address. To set another wallet(marked as `B`) as the paid address, delegator need to send another transaction from wallet `A`.

```bash
iris tx distribution set-withdraw-addr [withdraw-addr] [flags]
iris tx distribution set-withdraw-addr [withdraw-addr] [flags] --from=<key-name> --chain-id=<chain-id> --fees=<fee>
```

### Withdraw rewards
Expand Down
4 changes: 2 additions & 2 deletions docs/features/mint.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ AnnualInflationAmount = inflationBasement * inflationRate
blockInflationAmount = AnnualInflationAmount * blockCostTime / (year)
```

The value of `inflationBasement` is specified in genesis file. By default its value `2000000000iris`(2 billion iris, `1 iris` equals `1*10^18 uiris`), and its value will never be changed.
Suppose `blockCostTime` is 5000 millisecond, and `inflationRate` is `4%`, then the inflation amount will be `12675235125611580094uiris` (`12.675235125611580094iris`)
The value of `inflationBasement` is specified in genesis file. By default its value `2000000000iris`(2 billion iris, `1 iris` equals `1*10^6 uiris`), and its value will never be changed.
Suppose `blockCostTime` is 5000 millisecond, and `inflationRate` is `4%`, then the inflation amount will be `12683917uiris` (`12.683917iris`)

## Impact to users

Expand Down
14 changes: 7 additions & 7 deletions docs/features/mt.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ An asset class can be created by specifying the DenomName and the creator.
`CLI`

```plain
iris tx mt issue --name=<denom-name> --from=<sender-address>
iris tx mt issue --name=<denom-name> --from=<sender-address> --chain-id=<chain-id> --fees=<fee>
```

### Production
Expand All @@ -36,7 +36,7 @@ After issuing an asset class, a specific asset of that class can be created, dur
`CLI`

```plain
iris tx mt mint <denom-id> --amount=<amount> --data=<data> --from=<sender-address> --recipient=<recipient-address>
iris tx mt mint <denom-id> --amount=<amount> --data=<data> --from=<sender-address> --recipient=<recipient-address> --chain-id=<chain-id> --fees=<fee>
```

### Increase of Issuance
Expand All @@ -46,7 +46,7 @@ After issuing a specific asset, the owner of the asset class can also choose to
`CLI`

```plain
iris tx mt mint <denom-id> --mt-id=<mt-id> --amount=<amount> --from=<sender-address> --recipient=<recipient-address>
iris tx mt mint <denom-id> --mt-id=<mt-id> --amount=<amount> --from=<sender-address> --recipient=<recipient-address> --chain-id=<chain-id> --fees=<fee>
```

### Editing
Expand All @@ -56,7 +56,7 @@ Updates can be made to the metadata of a specified asset.
`CLI`

```plain
iris tx mt edit <denom-id> <mt-id> --data=<data> --from=<sender-address>
iris tx mt edit <denom-id> <mt-id> --data=<data> --from=<sender-address> --chain-id=<chain-id> --fees=<fee>
```

### Transfer
Expand All @@ -67,7 +67,7 @@ Assets can be transferred. The amount of assets to be transferred can be specifi
`CLI`

```plain
iris tx mt transfer <sender> <recipient> <denom-id> <mt-id> <amount>
iris tx mt transfer <sender> <recipient> <denom-id> <mt-id> <amount> --chain-id=<chain-id> --fees=<fee>
```

### Burn
Expand All @@ -77,7 +77,7 @@ Assets can be burned. The amount of assets to be burned can be specified.
`CLI`

```plain
iris tx mt burn <denom-id> <mt-id> <amount> --from=<sender-address>
iris tx mt burn <denom-id> <mt-id> <amount> --from=<sender-address> --chain-id=<chain-id> --fees=<fee>
```

### Query a specified asset class
Expand Down Expand Up @@ -138,4 +138,4 @@ Query all assets in a specified asset class through the DenomID.

```plain
iris query mt tokens <denom-id>
```
```
6 changes: 3 additions & 3 deletions docs/features/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Specify the nft Denom (nft classification) and metadata JSON Schema to issue nft
`CLI`

```bash
iris tx nft issue <denom-id> --from=<key-name> --name=<denom-name> --schema=<schema-content or path/to/schema.json> --symbol=<denom-symbol> --mint-restricted=<mint-restricted> --update-restricted=<update-restricted> --chain-id=<chain-id> --fees=<fee>
iris tx nft issue <denom-id> --name=<denom-name> --schema=<schema-content or path/to/schema.json> --symbol=<denom-symbol> --mint-restricted=<mint-restricted> --update-restricted=<update-restricted> --from=<key-name> --chain-id=<chain-id> --fees=<fee>
```

### transfer denom
Expand All @@ -51,7 +51,7 @@ The owner of the NFT classification can transfer the ownership of the NFT classi
`CLI`

```bash
iris tx nft transfer-denom <recipient> <denom-id>
iris tx nft transfer-denom <recipient> <denom-id> --from=<key-name> --chain-id=<chain-id> --fees=<fee>
```

### Additional issuance
Expand Down Expand Up @@ -81,7 +81,7 @@ Transfer designated nft.
`CLI`

```bash
iris tx nft transfer <recipient-address> <denom-id> <token-id>
iris tx nft transfer <recipient-address> <denom-id> <token-id> --from=<key-name> --chain-id=<chain-id> --fees=<fee>
```

### Destroy
Expand Down
32 changes: 16 additions & 16 deletions docs/features/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Any user can define services on the blockchain. The interface of a service must

```bash
# create a new service definition
iris tx service define --name=<service-name> <schemas-json or path/to/schemas.json> --description=<service-description> --author-description=<author-description> --tags=<tag1,tag2,...>
iris tx service define --name=<service-name> <schemas-json or path/to/schemas.json> --description=<service-description> --author-description=<author-description> --tags=<tag1,tag2,...> --from=<key-name> --chain-id=<chain-id>

# query service definition
iris q service definition <service-name>
Expand Down Expand Up @@ -112,22 +112,22 @@ Service bindings can be updated at any time by their owners to adjust pricing, i

```bash
# create a new service binding
iris tx service bind <service-name> <provider-address> --deposit=<deposit> --qos=<qos> --pricing=<pricing-json or path/to/pricing.json>
iris tx service bind <service-name> <provider-address> --deposit=<deposit> --qos=<qos> --pricing=<pricing-json or path/to/pricing.json> --from=<key-name> --chain-id=<chain-id>

# update a service binding
iris tx service update-binding <service-name> <provider-address> --deposit=<added-deposit> --qos=<qos> --pricing=<pricing-json or path/to/pricing.json>
iris tx service update-binding <service-name> <provider-address> --deposit=<added-deposit> --qos=<qos> --pricing=<pricing-json or path/to/pricing.json> --from=<key-name> --chain-id=<chain-id>

# enable an inactive service binding
iris tx service enable <service-name> <provider-address> --deposit=<added-deposit>
iris tx service enable <service-name> <provider-address> --deposit=<added-deposit> --from=<key-name> --chain-id=<chain-id>

# disable an active service binding
iris tx service disable <service-name> <provider-address>
iris tx service disable <service-name> <provider-address> --from=<key-name> --chain-id=<chain-id>

# request refund of service binding deposit
iris tx service refund-deposit <service-name> <provider-address>
iris tx service refund-deposit <service-name> <provider-address> --from=<key-name> --chain-id=<chain-id>

# list all the bindings of a service
iris tx service bindings <service-name>
iris tx service bindings <service-name> --from=<key-name> --chain-id=<chain-id>

# list all the bindings of a service, owned by a given account
iris q service bindings service bindings <service-name> --owner <address>
Expand Down Expand Up @@ -181,19 +181,19 @@ When a request context is successfully created, a `context id` is returned to th

```bash
# create a repeated request context, with no callback
iris tx service call --service-name=<service name> --data=<request input> --providers=<provider list> --service-fee-cap=1iris --timeout 50 --repeated --frequency=50 --total=100
iris tx service call --service-name=<service name> --data=<request input> --providers=<provider list> --service-fee-cap=1iris --timeout 50 --repeated --frequency=50 --total=100 --from=<key-name> --chain-id=<chain-id>

# update an existing request context
iris tx service update <request-context-id> --frequency=20 --total=200
iris tx service update <request-context-id> --frequency=20 --total=200 --from=<key-name> --chain-id=<chain-id>

# pause a running request context
iris tx service pause <request-context-id>
iris tx service pause <request-context-id> --from=<key-name> --chain-id=<chain-id>

# start a paused request context
iris tx service start <request-context-id>
iris tx service start <request-context-id> --from=<key-name> --chain-id=<chain-id>

# permanently kill a request context
iris tx service kill <request-context-id>
iris tx service kill <request-context-id> --from=<key-name> --chain-id=<chain-id>

# query a previously created request context by its id
iris q service request-context <request-context-id>
Expand Down Expand Up @@ -237,7 +237,7 @@ iris q service requests <service-name> <provider>
iris q service request <request-id>

# send a response back, matching a specific request
iris tx service respond --request-id=<request-id> --result='{"code":200,"message":"success"}' --data=<response output>
iris tx service respond --request-id=<request-id> --result='{"code":200,"message":"success"}' --data=<response output> --from=<key-name> --chain-id=<chain-id>

# query the result schema
iris q service schema result
Expand All @@ -261,7 +261,7 @@ Right before a service fee is paid to a provider, a _tax_, in the amount of `Ser

```bash
# set withdrawal address
iris tx service set-withdraw-addr <withdrawal-address>
iris tx service set-withdraw-addr <withdrawal-address> --from=<key-name> --chain-id=<chain-id>

# query withdrawal address of a given account
iris q service withdraw-addr <address>
Expand All @@ -270,10 +270,10 @@ iris q service withdraw-addr <address>
iris q service fees <provider-address>

# withdraw earned fees from all providers
iris tx service withdraw-fees
iris tx service withdraw-fees --from=<key-name> --chain-id=<chain-id>

# withdraw earned fees from a given provider
iris tx service withdraw-fees <provider-address>
iris tx service withdraw-fees <provider-address> --from=<key-name> --chain-id=<chain-id>
```

## Service Governance (TODO)
4 changes: 2 additions & 2 deletions docs/get-started/state-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ If you want to quickly start the node and join IRIS Hub without historical data,
2. Check the block height of the current snapshot, and select the latest height.

```bash
curl http://34.82.96.8:26658/
curl http://sentry-0.mainnet.irisnet.org:26658/
```

3. Modify the `config.toml`.

```toml
[statesync]
enable = true # whether enable stat_sync; set true
rpc_servers = "34.82.96.8:26657,34.77.68.145:26657" # RPC server address which the node connects to
rpc_servers = "sentry-0.mainnet.irisnet.org:26657,sentry-1.mainnet.irisnet.org:26657" # RPC server address which the node connects to
trust_height = # Set to the block height of the latest snapshot
trust_hash = "" #Set to the hash corresponding to the latest snapshot block height (trust height), which can be checked via https://irishub.iobscan.io/#/block/<trust_height>.
trust_period = "168h0m0s"
Expand Down
Loading

0 comments on commit 927a1cc

Please sign in to comment.