docs: minor documentation improvements (#13594)

* updates

* rename `sh` to `shell` for syntax coloring

* keep navbar the same on mobile
This commit is contained in:
Julien Robert 2022-10-19 14:56:29 +02:00 committed by GitHub
parent a3b8b7fcc9
commit 0dbae701f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 180 additions and 168 deletions

View File

@ -2,7 +2,7 @@
Installation:
```sh
```shell
git config core.hooksPath contrib/githooks
```
@ -13,7 +13,7 @@ to correctly format the `.go` files included in the commit, provided
that all the aforementioned commands are installed and available
in the user's search `$PATH` environment variable:
```sh
```shell
go get golang.org/x/tools/cmd/goimports
go get github.com/golangci/misspell/cmd/misspell@master
```

View File

@ -6,7 +6,6 @@ sidebar_position: 1
`cosmovisor` is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. If it sees a proposal that gets approved, `cosmovisor` can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.
<!-- TOC -->
* [Design](#design)
* [Contributing](#contributing)
* [Setup](#setup)
@ -49,13 +48,13 @@ You can download Cosmovisor from the [GitHub releases](https://github.com/cosmos
To install the latest version of `cosmovisor`, run the following command:
```sh
```shell
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
```
To install a previous version, you can specify the version. IMPORTANT: Chains that use Cosmos-SDK v0.44.3 or earlier (eg v0.44.2) and want to use auto-download feature MUST use `cosmovisor v0.1.0`
```sh
```shell
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v0.1.0
```
@ -63,7 +62,7 @@ Run `cosmovisor version` to check the cosmovisor version.
You can also install from source by pulling the cosmos-sdk repository and switching to the correct version and building as follows:
```sh
```shell
git clone git@github.com:cosmos/cosmos-sdk
cd cosmos-sdk
git checkout cosmovisor/vx.x.x
@ -72,7 +71,7 @@ make cosmovisor
This will build cosmovisor in `/cosmovisor` directory. Afterwards you may want to put it into your machine's PATH like as follows:
```sh
```shell
cp cosmovisor/cosmovisor ~/go/bin/cosmovisor
```
@ -210,7 +209,7 @@ If `DAEMON_ALLOW_DOWNLOAD_BINARIES` is set to `true`, and no local binary can be
When submitting this as a proposal ensure there are no spaces. An example command using `gaiad` could look like:
```sh
```shell
> gaiad tx gov submit-proposal software-upgrade Vega \
--title Vega \
--deposit 100uatom \
@ -237,7 +236,7 @@ Note that for this mechanism to provide strong security guarantees, all URLs sho
To properly create a sha256 checksum on linux, you can use the `sha256sum` utility. For example:
```sh
```shell
sha256sum ./testdata/repo/zip_directory/autod.zip
```
@ -253,20 +252,20 @@ The following instructions provide a demonstration of `cosmovisor` using the sim
Let's create a new chain using the `v0.44` version of simapp (the Cosmos SDK demo app):
```sh
```shell
git checkout v0.44.6
make build
```
Clean `~/.simapp` (never do this in a production environment):
```sh
```shell
./build/simd unsafe-reset-all
```
Set up app config:
```sh
```shell
./build/simd config chain-id test
./build/simd config keyring-backend test
./build/simd config broadcast-mode sync
@ -276,19 +275,19 @@ Initialize the node and overwrite any previous genesis file (never do this in a
<!-- TODO: init does not read chain-id from config -->
```sh
```shell
./build/simd init test --chain-id test --overwrite
```
Set the minimum gas price to `0stake` in `~/.simapp/config/app.toml`:
```sh
```shell
minimum-gas-prices = "0stake"
```
For the sake of this demonstration, amend `voting_period` in `genesis.json` to a reduced time of 20 seconds (`20s`):
```sh
```shell
cat <<< $(jq '.app_state.gov.voting_params.voting_period = "20s"' $HOME/.simapp/config/genesis.json) > $HOME/.simapp/config/genesis.json
```
@ -297,7 +296,7 @@ Create a validator, and setup genesis transaction:
<!-- TODO: add-genesis-account does not read keyring-backend from config -->
<!-- TODO: gentx does not read chain-id from config -->
```sh
```shell
./build/simd keys add validator
./build/simd add-genesis-account validator 1000000000stake --keyring-backend test
./build/simd gentx validator 1000000stake --chain-id test
@ -308,27 +307,27 @@ Create a validator, and setup genesis transaction:
Set the required environment variables:
```sh
```shell
export DAEMON_NAME=simd
export DAEMON_HOME=$HOME/.simapp
```
Set the optional environment variable to trigger an automatic app restart:
```sh
```shell
export DAEMON_RESTART_AFTER_UPGRADE=true
```
Create the folder for the genesis binary and copy the `simd` binary:
```sh
```shell
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
cp ./build/simd $DAEMON_HOME/cosmovisor/genesis/bin
```
Now you can run cosmovisor with simapp v0.44:
```sh
```shell
cosmovisor run start
```
@ -340,13 +339,13 @@ Next, we can add a migration - which is defined using `x/upgrade` [upgrade plan]
Build the new version `simd` binary:
```sh
```shell
make build
```
Create the folder for the upgrade binary and copy the `simd` binary:
```sh
```shell
mkdir -p $DAEMON_HOME/cosmovisor/upgrades/test1/bin
cp ./build/simd $DAEMON_HOME/cosmovisor/upgrades/test1/bin
```
@ -354,7 +353,7 @@ cp ./build/simd $DAEMON_HOME/cosmovisor/upgrades/test1/bin
Open a new terminal window and submit an upgrade proposal along with a deposit and a vote (these commands must be run within 20 seconds of each other):
Note, when using a `v0.46+` chain, replace `submit-proposal` by `submit-legacy-proposal`.
```sh
```shell
./build/simd tx gov submit-proposal software-upgrade test1 --title upgrade --description upgrade --upgrade-height 200 --from validator --yes
./build/simd tx gov deposit 1 10000000stake --from validator --yes
./build/simd tx gov vote 1 yes --from validator --yes

View File

@ -32,19 +32,19 @@ to send users to the GitHub.
Make sure you are in the `docs` directory and run the following commands:
```sh
```shell
rm -rf node_modules
```
This command will remove old version of the visual theme and required packages. This step is optional.
```sh
```shell
npm install
```
Install the theme and all dependencies.
```sh
```shell
npm start
```

View File

@ -238,7 +238,7 @@ must result in the serialization
When inspecting the serialized document, you see that every second field is
omitted:
```sh
```shell
$ echo 0a1b54686520776f726c64206e65656473206368616e676520f09f8cb318e8bebec8bc2e280138024a084e696365206f6e654a095468616e6b20796f75 | xxd -r -p | protoc --decode_raw
1: "The world needs change \360\237\214\263"
3: 1596806111080

View File

@ -72,19 +72,19 @@ tally() {
The CLI command for creating a multi-option vote would be as such:
```sh
```shell
simd tx gov vote 1 "yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05" --from mykey
```
To create a single-option vote a user can do either
```sh
```shell
simd tx gov vote 1 "yes=1" --from mykey
```
or
```sh
```shell
simd tx gov vote 1 yes --from mykey
```

View File

@ -142,13 +142,13 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/simapp/simd/cmd/root.go#L210-L
Each flag is bound to it's respecteve named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--home` for application with basename `GAIA` is bound to `GAIA_HOME`. It allows reducing the amount of flags typed for routine operations. For example instead of:
```sh
```shell
gaia --home=./ --node=<node address> --chain-id="testchain-1" --keyring-backend=test tx ... --from=<key name>
```
this will be more convenient:
```sh
```shell
# define env variables in .env, .envrc etc
GAIA_HOME=<path to home>
GAIA_NODE=<node address>

View File

@ -22,6 +22,12 @@ Read more about writing smart contracts with CosmWasm at their [documentation si
Read more about writing smart contracts with solidity at the official [`evm` documentation page](https://docs.evmos.org/modules/evm/).
## Explore Further
:::tip
For non Cosmos SDK related tooling, you can have a look at the [Awesome Cosmos](https://github.com/cosmos/awesome-cosmos) GitHub repository.
:::
> Note: If you would like to add your tooling to this section, please make a pr to the cosmos-sdk, we will gladly accept it.
:::note
If you would like to add your tooling to this section, please make a [PR to the Cosmos SDK](https://github.com/cosmos/cosmos-sdk/edit/main/docs/docs/ecosystem/README.md).
:::

View File

@ -2,4 +2,4 @@
"label": "Ecosystem",
"position": 8,
"link": null
}
}

View File

@ -51,7 +51,7 @@ times in a single command resulting in repeated password prompts. If using bash
to execute commands using the `file` option you may want to utilize the following format
for multiple prompts:
```sh
```shell
# assuming that KEYPASSWD is set in the environment
$ gaiacli config keyring-backend file # use file backend
$ (echo $KEYPASSWD; echo $KEYPASSWD) | gaiacli keys add me # multiple prompts
@ -79,7 +79,7 @@ passphrase expiration.
The password store must be set up prior to first use:
```sh
```shell
pass init <GPG_KEY_ID>
```

View File

@ -42,13 +42,13 @@ An implementation example can be found in `simapp` package.
To run Rosetta in your application CLI, use the following command:
```sh
```shell
appd rosetta --help
```
To test and run Rosetta API endpoints for applications that are running and exposed, use the following command:
```sh
```shell
appd rosetta
--blockchain "your application name (ex: gaia)"
--network "your chain identifier (ex: testnet-1)"

View File

@ -78,19 +78,19 @@ The first validator node is now running in-process, which means the test network
Check the status of the first validator node:
```sh
```shell
simd status
```
Import the key from the provided mnemonic:
```sh
```shell
simd keys add test --recover --keyring-backend test
```
Check the balance of the account address:
```sh
```shell
simd q bank balances [address]
```

View File

@ -10,14 +10,15 @@ It is known that Cosmos SDK uses protocol buffers extensively, this docuemnt is
To generate the proto file, the Cosmos SDK uses a docker image, this image is provided to all to use as well. The latest version is `ghcr.io/cosmos/proto-builder:0.11.0`
Below is the example of the Cosmos SDK's commands for generating, linting, and formatting protobuf files that can be reused in any applications makefile.
```
https://github.com/cosmos/cosmos-sdk/blob/fae395818607e429e9f96f08f69b2ba377511fd9/Makefile#L408-L437
```go reference
https://github.com/cosmos/cosmos-sdk/blob/10ac33edb87dab12ffa496e76f1114ea9225a107/Makefile#L408-L437
```
The script used to generate the protobuf files can be found in the `scripts/` directory.
```sh reference
https://github.com/cosmos/cosmos-sdk/blob/10e8aadcad3a30dda1d6163c39c9f86b4a877e54/scripts/protocgen.sh#L1-L37
```shell reference
https://github.com/cosmos/cosmos-sdk/blob/10ac33edb87dab12ffa496e76f1114ea9225a107/scripts/protocgen.sh#L1-L37
```
## Buf
@ -60,7 +61,9 @@ The above diagram all the files and directories within the Cosmos SDK `proto/` d
https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.gen.gogo.yaml#L1-l9
```
> Example of how to define `gen` files can be found [here](https://docs.buf.build/tour/generate-go-code)
:::tip
Example of how to define `gen` files can be found [here](https://docs.buf.build/tour/generate-go-code)
:::
#### `buf.gen.pulsar.yaml`
@ -70,7 +73,9 @@ https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.gen.gogo.yaml#L1-l9
https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.gen.pulsar.yaml#L1-L18
```
> Example of how to define `gen` files can be found [here](https://docs.buf.build/tour/generate-go-code)
:::tip
Example of how to define `gen` files can be found [here](https://docs.buf.build/tour/generate-go-code)
:::
#### `buf.gen.swagger.yaml`
@ -80,7 +85,9 @@ https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.gen.pulsar.yaml#L1-L18
https://github.com/cosmos/cosmos-sdk/blob/main/proto/buf.gen.swagger.yaml#L1-L6
```
> Example of how to define `gen` files can be found [here](https://docs.buf.build/tour/generate-go-code)
:::tip
Example of how to define `gen` files can be found [here](https://docs.buf.build/tour/generate-go-code)
:::
#### `buf.lock`

View File

@ -6,5 +6,5 @@ sidebar_position: 0
This section provides documentation on various tooling used in development of a Cosmos SDK chain, operating a node and testing.
- [Protocol Buffers](./00-protobuf.md)
- [Cosmovisor](./01-cosmovisor.md)
* [Protocol Buffers](./00-protobuf.md)
* [Cosmovisor](./01-cosmovisor.md)

View File

@ -2,4 +2,4 @@
"label": "Tooling",
"position": 9,
"link": null
}
}

View File

@ -151,7 +151,7 @@ html {
.navbar-sidebar {
@apply w-full;
&__brand {
@apply pb-7 pt-9 px-6 h-auto;
@apply px-6 h-auto;
}
&__item {
@apply px-6 w-full;

View File

@ -24,7 +24,7 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio
* [NFT](./nft/README.md) - NFT module implemented based on [ADR43](https://docs.cosmos.network/main/architecture/adr-043-nft-module.html).
* [Consensus](./consensus/README.md) - Consensus module for modifying Tendermint's ABCI consensus params.
To learn more about the process of building modules, visit the [building modules reference documentation](../docs/building-modules/README.md).
To learn more about the process of building modules, visit the [building modules reference documentation](https://docs.cosmos.network/main/building-modules/intro).
## IBC

View File

@ -508,7 +508,7 @@ A user can query and interact with the `bank` module using the CLI.
The `query` commands allow users to query `bank` state.
```sh
```shell
simd query bank --help
```
@ -516,13 +516,13 @@ simd query bank --help
The `balances` command allows users to query account balances by address.
```sh
```shell
simd query bank balances [address] [flags]
```
Example:
```sh
```shell
simd query bank balances cosmos1..
```
@ -541,13 +541,13 @@ pagination:
The `denom-metadata` command allows users to query metadata for coin denominations. A user can query metadata for a single denomination using the `--denom` flag or all denominations without it.
```sh
```shell
simd query bank denom-metadata [flags]
```
Example:
```sh
```shell
simd query bank denom-metadata --denom stake
```
@ -570,13 +570,13 @@ metadata:
The `total` command allows users to query the total supply of coins. A user can query the total supply for a single coin using the `--denom` flag or all coins without it.
```sh
```shell
simd query bank total [flags]
```
Example:
```sh
```shell
simd query bank total --denom stake
```
@ -591,13 +591,13 @@ denom: stake
The `send-enabled` command allows users to query for all or some SendEnabled entries.
```sh
```shell
simd query bank send-enabled [denom1 ...] [flags]
```
Example:
```sh
```shell
simd query bank send-enabled
```
@ -617,7 +617,7 @@ pagination:
The `tx` commands allow users to interact with the `bank` module.
```sh
```shell
simd tx bank --help
```
@ -625,13 +625,13 @@ simd tx bank --help
The `send` command allows users to send funds from one account to another.
```sh
```shell
simd tx bank send [from_key_or_address] [to_address] [amount] [flags]
```
Example:
```sh
```shell
simd tx bank send cosmos1.. cosmos1.. 100stake
```
@ -643,13 +643,13 @@ A user can query the `bank` module using gRPC endpoints.
The `Balance` endpoint allows users to query account balance by address for a given denomination.
```sh
```shell
cosmos.bank.v1beta1.Query/Balance
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"address":"cosmos1..","denom":"stake"}' \
localhost:9090 \
@ -671,13 +671,13 @@ Example Output:
The `AllBalances` endpoint allows users to query account balance by address for all denominations.
```sh
```shell
cosmos.bank.v1beta1.Query/AllBalances
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"address":"cosmos1.."}' \
localhost:9090 \
@ -704,13 +704,13 @@ Example Output:
The `DenomMetadata` endpoint allows users to query metadata for a single coin denomination.
```sh
```shell
cosmos.bank.v1beta1.Query/DenomMetadata
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"denom":"stake"}' \
localhost:9090 \
@ -743,13 +743,13 @@ Example Output:
The `DenomsMetadata` endpoint allows users to query metadata for all coin denominations.
```sh
```shell
cosmos.bank.v1beta1.Query/DenomsMetadata
```
Example:
```sh
```shell
grpcurl -plaintext \
localhost:9090 \
cosmos.bank.v1beta1.Query/DenomsMetadata
@ -786,13 +786,13 @@ Example Output:
The `DenomOwners` endpoint allows users to query metadata for a single coin denomination.
```sh
```shell
cosmos.bank.v1beta1.Query/DenomOwners
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"denom":"stake"}' \
localhost:9090 \
@ -829,13 +829,13 @@ Example Output:
The `TotalSupply` endpoint allows users to query the total supply of all coins.
```sh
```shell
cosmos.bank.v1beta1.Query/TotalSupply
```
Example:
```sh
```shell
grpcurl -plaintext \
localhost:9090 \
cosmos.bank.v1beta1.Query/TotalSupply
@ -861,13 +861,13 @@ Example Output:
The `SupplyOf` endpoint allows users to query the total supply of a single coin.
```sh
```shell
cosmos.bank.v1beta1.Query/SupplyOf
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"denom":"stake"}' \
localhost:9090 \
@ -889,13 +889,13 @@ Example Output:
The `Params` endpoint allows users to query the parameters of the `bank` module.
```sh
```shell
cosmos.bank.v1beta1.Query/Params
```
Example:
```sh
```shell
grpcurl -plaintext \
localhost:9090 \
cosmos.bank.v1beta1.Query/Params
@ -917,13 +917,13 @@ The `SendEnabled` enpoints allows users to query the SendEnabled entries of the
Any denominations NOT returned, use the `Params.DefaultSendEnabled` value.
```sh
```shell
cosmos.bank.v1beta1.Query/SendEnabled
```
Example:
```sh
```shell
grpcurl -plaintext \
localhost:9090 \
cosmos.bank.v1beta1.Query/SendEnabled

View File

@ -530,7 +530,7 @@ A user can query and interact with the `distribution` module using the CLI.
The `query` commands allow users to query `distribution` state.
```sh
```shell
simd query distribution --help
```
@ -538,13 +538,13 @@ simd query distribution --help
The `commission` command allows users to query validator commission rewards by address.
```sh
```shell
simd query distribution commission [address] [flags]
```
Example:
```sh
```shell
simd query distribution commission cosmosvaloper1..
```
@ -560,13 +560,13 @@ commission:
The `community-pool` command allows users to query all coin balances within the community pool.
```sh
```shell
simd query distribution community-pool [flags]
```
Example:
```sh
```shell
simd query distribution community-pool
```
@ -582,13 +582,13 @@ pool:
The `params` command allows users to query the parameters of the `distribution` module.
```sh
```shell
simd query distribution params [flags]
```
Example:
```sh
```shell
simd query distribution params
```
@ -605,13 +605,13 @@ withdraw_addr_enabled: true
The `rewards` command allows users to query delegator rewards. Users can optionally include the validator address to query rewards earned from a specific validator.
```sh
```shell
simd query distribution rewards [delegator-addr] [validator-addr] [flags]
```
Example:
```sh
```shell
simd query distribution rewards cosmos1..
```
@ -632,13 +632,13 @@ total:
The `slashes` command allows users to query all slashes for a given block range.
```sh
```shell
simd query distribution slashes [validator] [start-height] [end-height] [flags]
```
Example:
```sh
```shell
simd query distribution slashes cosmosvaloper1.. 1 1000
```
@ -657,13 +657,13 @@ slashes:
The `validator-outstanding-rewards` command allows users to query all outstanding (un-withdrawn) rewards for a validator and all their delegations.
```sh
```shell
simd query distribution validator-outstanding-rewards [validator] [flags]
```
Example:
```sh
```shell
simd query distribution validator-outstanding-rewards cosmosvaloper1..
```
@ -679,7 +679,7 @@ rewards:
The `tx` commands allow users to interact with the `distribution` module.
```sh
```shell
simd tx distribution --help
```
@ -687,13 +687,13 @@ simd tx distribution --help
The `fund-community-pool` command allows users to send funds to the community pool.
```sh
```shell
simd tx distribution fund-community-pool [amount] [flags]
```
Example:
```sh
```shell
simd tx distribution fund-community-pool 100stake --from cosmos1..
```
@ -701,13 +701,13 @@ simd tx distribution fund-community-pool 100stake --from cosmos1..
The `set-withdraw-addr` command allows users to set the withdraw address for rewards associated with a delegator address.
```sh
```shell
simd tx distribution set-withdraw-addr [withdraw-addr] [flags]
```
Example:
```sh
```shell
simd tx distribution set-withdraw-addr cosmos1.. --from cosmos1..
```
@ -715,13 +715,13 @@ simd tx distribution set-withdraw-addr cosmos1.. --from cosmos1..
The `withdraw-all-rewards` command allows users to withdraw all rewards for a delegator.
```sh
```shell
simd tx distribution withdraw-all-rewards [flags]
```
Example:
```sh
```shell
simd tx distribution withdraw-all-rewards --from cosmos1..
```
@ -730,13 +730,13 @@ simd tx distribution withdraw-all-rewards --from cosmos1..
The `withdraw-rewards` command allows users to withdraw all rewards from a given delegation address,
and optionally withdraw validator commission if the delegation address given is a validator operator and the user proves the `--commision` flag.
```sh
```shell
simd tx distribution withdraw-rewards [validator-addr] [flags]
```
Example:
```sh
```shell
simd tx distribution withdraw-rewards cosmosvaloper1.. --from cosmos1.. --commision
```
@ -750,7 +750,7 @@ The `Params` endpoint allows users to query parameters of the `distribution` mod
Example:
```sh
```shell
grpcurl -plaintext \
localhost:9090 \
cosmos.distribution.v1beta1.Query/Params
@ -775,7 +775,7 @@ The `ValidatorOutstandingRewards` endpoint allows users to query rewards of a va
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"validator_address":"cosmosvalop1.."}' \
localhost:9090 \
@ -803,7 +803,7 @@ The `ValidatorCommission` endpoint allows users to query accumulated commission
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"validator_address":"cosmosvalop1.."}' \
localhost:9090 \
@ -831,7 +831,7 @@ The `ValidatorSlashes` endpoint allows users to query slash events of a validato
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"validator_address":"cosmosvalop1.."}' \
localhost:9090 \
@ -860,7 +860,7 @@ The `DelegationRewards` endpoint allows users to query the total rewards accrued
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"delegator_address":"cosmos1..","validator_address":"cosmosvalop1.."}' \
localhost:9090 \
@ -886,7 +886,7 @@ The `DelegationTotalRewards` endpoint allows users to query the total rewards ac
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"delegator_address":"cosmos1.."}' \
localhost:9090 \
@ -923,7 +923,7 @@ The `DelegatorValidators` endpoint allows users to query all validators for give
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"delegator_address":"cosmos1.."}' \
localhost:9090 \
@ -946,7 +946,7 @@ The `DelegatorWithdrawAddress` endpoint allows users to query the withdraw addre
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"delegator_address":"cosmos1.."}' \
localhost:9090 \
@ -967,7 +967,7 @@ The `CommunityPool` endpoint allows users to query the community pool coins.
Example:
```sh
```shell
grpcurl -plaintext \
localhost:9090 \
cosmos.distribution.v1beta1.Query/CommunityPool

View File

@ -217,7 +217,7 @@ A user can query and interact with the `feegrant` module using the CLI.
The `query` commands allow users to query `feegrant` state.
```sh
```shell
simd query feegrant --help
```
@ -225,13 +225,13 @@ simd query feegrant --help
The `grant` command allows users to query a grant for a given granter-grantee pair.
```sh
```shell
simd query feegrant grant [granter] [grantee] [flags]
```
Example:
```sh
```shell
simd query feegrant grant cosmos1.. cosmos1..
```
@ -252,13 +252,13 @@ granter: cosmos1..
The `grants` command allows users to query all grants for a given grantee.
```sh
```shell
simd query feegrant grants [grantee] [flags]
```
Example:
```sh
```shell
simd query feegrant grants cosmos1..
```
@ -283,7 +283,7 @@ pagination:
The `tx` commands allow users to interact with the `feegrant` module.
```sh
```shell
simd tx feegrant --help
```
@ -291,19 +291,19 @@ simd tx feegrant --help
The `grant` command allows users to grant fee allowances to another account. The fee allowance can have an expiration date, a total spend limit, and/or a periodic spend limit.
```sh
```shell
simd tx feegrant grant [granter] [grantee] [flags]
```
Example (one-time spend limit):
```sh
```shell
simd tx feegrant grant cosmos1.. cosmos1.. --spend-limit 100stake
```
Example (periodic spend limit):
```sh
```shell
simd tx feegrant grant cosmos1.. cosmos1.. --period 3600 --period-limit 10stake
```
@ -311,13 +311,13 @@ simd tx feegrant grant cosmos1.. cosmos1.. --period 3600 --period-limit 10stake
The `revoke` command allows users to revoke a granted fee allowance.
```sh
```shell
simd tx feegrant revoke [granter] [grantee] [flags]
```
Example:
```sh
```shell
simd tx feegrant revoke cosmos1.. cosmos1..
```
@ -329,13 +329,13 @@ A user can query the `feegrant` module using gRPC endpoints.
The `Allowance` endpoint allows users to query a granted fee allowance.
```sh
```shell
cosmos.feegrant.v1beta1.Query/Allowance
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"grantee":"cosmos1..","granter":"cosmos1.."}' \
localhost:9090 \
@ -358,13 +358,13 @@ Example Output:
The `Allowances` endpoint allows users to query all granted fee allowances for a given grantee.
```sh
```shell
cosmos.feegrant.v1beta1.Query/Allowances
```
Example:
```sh
```shell
grpcurl -plaintext \
-d '{"address":"cosmos1.."}' \
localhost:9090 \

View File

@ -173,7 +173,7 @@ A user can query and interact with the `mint` module using the CLI.
The `query` commands allow users to query `mint` state.
```sh
```shell
simd query mint --help
```
@ -181,19 +181,19 @@ simd query mint --help
The `annual-provisions` command allow users to query the current minting annual provisions value
```sh
```shell
simd query mint annual-provisions [flags]
```
Example:
```sh
```shell
simd query mint annual-provisions
```
Example Output:
```sh
```shell
22268504368893.612100895088410693
```
@ -201,19 +201,19 @@ Example Output:
The `inflation` command allow users to query the current minting inflation value
```sh
```shell
simd query mint inflation [flags]
```
Example:
```sh
```shell
simd query mint inflation
```
Example Output:
```sh
```shell
0.199200302563256955
```
@ -221,7 +221,7 @@ Example Output:
The `params` command allow users to query the current minting parameters
```sh
```shell
simd query mint params [flags]
```
@ -244,13 +244,13 @@ A user can query the `mint` module using gRPC endpoints.
The `AnnualProvisions` endpoint allow users to query the current minting annual provisions value
```sh
```shell
/cosmos.mint.v1beta1.Query/AnnualProvisions
```
Example:
```sh
```shell
grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/AnnualProvisions
```
@ -266,13 +266,13 @@ Example Output:
The `Inflation` endpoint allow users to query the current minting inflation value
```sh
```shell
/cosmos.mint.v1beta1.Query/Inflation
```
Example:
```sh
```shell
grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Inflation
```
@ -288,13 +288,13 @@ Example Output:
The `Params` endpoint allow users to query the current minting parameters
```sh
```shell
/cosmos.mint.v1beta1.Query/Params
```
Example:
```sh
```shell
grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Params
```
@ -319,13 +319,13 @@ A user can query the `mint` module using REST endpoints.
### annual-provisions
```sh
```shell
/cosmos/mint/v1beta1/annual_provisions
```
Example:
```sh
```shell
curl "localhost:1317/cosmos/mint/v1beta1/annual_provisions"
```
@ -339,13 +339,13 @@ Example Output:
### inflation
```sh
```shell
/cosmos/mint/v1beta1/inflation
```
Example:
```sh
```shell
curl "localhost:1317/cosmos/mint/v1beta1/inflation"
```
@ -359,13 +359,13 @@ Example Output:
### params
```sh
```shell
/cosmos/mint/v1beta1/params
```
Example:
```sh
```shell
curl "localhost:1317/cosmos/mint/v1beta1/params"
```

View File

@ -529,7 +529,7 @@ A user can query and interact with the `slashing` module using the CLI.
The `query` commands allow users to query `slashing` state.
```sh
```shell
simd query slashing --help
```
@ -537,13 +537,13 @@ simd query slashing --help
The `params` command allows users to query genesis parameters for the slashing module.
```sh
```shell
simd query slashing params [flags]
```
Example:
```sh
```shell
simd query slashing params
```
@ -561,13 +561,13 @@ slash_fraction_downtime: "0.010000000000000000"
The `signing-info` command allows users to query signing-info of the validator using consensus public key.
```sh
```shell
simd query slashing signing-infos [flags]
```
Example:
```sh
```shell
simd query slashing signing-info '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Auxs3865HpB/EfssYOzfqNhEJjzys6jD5B6tPgC8="}'
```
@ -587,13 +587,13 @@ tombstoned: false
The `signing-infos` command allows users to query signing infos of all validators.
```sh
```shell
simd query slashing signing-infos [flags]
```
Example:
```sh
```shell
simd query slashing signing-infos
```
@ -642,13 +642,13 @@ A user can query the `slashing` module using gRPC endpoints.
The `Params` endpoint allows users to query the parameters of slashing module.
```sh
```shell
cosmos.slashing.v1beta1.Query/Params
```
Example:
```sh
```shell
grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/Params
```
@ -670,13 +670,13 @@ Example Output:
The SigningInfo queries the signing info of given cons address.
```sh
```shell
cosmos.slashing.v1beta1.Query/SigningInfo
```
Example:
```sh
```shell
grpcurl -plaintext -d '{"cons_address":"cosmosvalcons1nrqsld3aw6lh6t082frdqc84uwxn0t958c"}' localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfo
```
@ -696,13 +696,13 @@ Example Output:
The SigningInfos queries signing info of all validators.
```sh
```shell
cosmos.slashing.v1beta1.Query/SigningInfos
```
Example:
```sh
```shell
grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfos
```
@ -729,13 +729,13 @@ A user can query the `slashing` module using REST endpoints.
### Params
```sh
```shell
/cosmos/slashing/v1beta1/params
```
Example:
```sh
```shell
curl "localhost:1317/cosmos/slashing/v1beta1/params"
```
@ -754,13 +754,13 @@ Example Output:
### signing_info
```sh
```shell
/cosmos/slashing/v1beta1/signing_infos/%s
```
Example:
```sh
```shell
curl "localhost:1317/cosmos/slashing/v1beta1/signing_infos/cosmosvalcons1nrqslkwd3pz096lh6t082frdqc84uwxn0t958c"
```
@ -781,13 +781,13 @@ Example Output:
### signing_infos
```sh
```shell
/cosmos/slashing/v1beta1/signing_infos
```
Example:
```sh
```shell
curl "localhost:1317/cosmos/slashing/v1beta1/signing_infos
```