docs: minor documentation improvements (#13594)
* updates * rename `sh` to `shell` for syntax coloring * keep navbar the same on mobile
This commit is contained in:
+3
-3
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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).
|
||||
:::
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
"label": "Ecosystem",
|
||||
"position": 8,
|
||||
"link": null
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
```
|
||||
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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]
|
||||
```
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -2,4 +2,4 @@
|
||||
"label": "Tooling",
|
||||
"position": 9,
|
||||
"link": null
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user