Merge PR #2390: CLI subcommands reorganization
This commit is contained in:
committed by
Christopher Goes
parent
e6a8b2278e
commit
a2caefc8ae
@@ -23,7 +23,7 @@ NAME: TYPE: ADDRESS: PUBKEY:
|
||||
This key will only be accessible while the Ledger is plugged in and unlocked. To send some coins with this key, run the following:
|
||||
|
||||
```bash
|
||||
$ gaiacli send --from {{ .Key.Name }} --to {{ .Destination.AccAddr }} --chain-id=gaia-7000
|
||||
$ gaiacli tx send --from {{ .Key.Name }} --to {{ .Destination.AccAddr }} --chain-id=gaia-7000
|
||||
```
|
||||
|
||||
You will be asked to review and confirm the transaction on the Ledger. Once you do this you should see the result in the console! Now you can use your Ledger to manage your Atoms and Stake!
|
||||
|
||||
@@ -62,7 +62,7 @@ gaiacli account <YOUR_ADDRESS>
|
||||
Here is the command to send coins via the CLI:
|
||||
|
||||
```bash
|
||||
gaiacli send --amount=10faucetToken --chain-id=<name_of_testnet_chain> --name=<key_name> --to=<destination_address>
|
||||
gaiacli tx send --amount=10faucetToken --chain-id=<name_of_testnet_chain> --name=<key_name> --to=<destination_address>
|
||||
```
|
||||
|
||||
Flags:
|
||||
@@ -88,7 +88,7 @@ The Rest Server acts as an intermediary between the front-end and the full-node.
|
||||
To start the Rest server:
|
||||
|
||||
```bash
|
||||
gaiacli advanced rest-server --trust-node=false --node=<full_node_address:full_node_port>
|
||||
gaiacli rest-server --trust-node=false --node=<full_node_address:full_node_port>
|
||||
```
|
||||
|
||||
Flags:
|
||||
@@ -108,4 +108,4 @@ The Rest API documents all the available endpoints that you can use to interract
|
||||
|
||||
The API is divided into ICS standards for each category of endpoints. For example, the [ICS20](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#ics20---tokenapi) describes the API to interact with tokens.
|
||||
|
||||
To give more flexibility to implementers, we have separated the different steps that are involved in the process of sending transactions. You will be able to generate unsigned transactions (example with [coin transfer](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#post-banktransfers)), [sign](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#post-authtxsign) and [broadcast](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#post-authtxbroadcast) them with different API endpoints. This allows service providers to use their own signing mechanism for instance.
|
||||
To give more flexibility to implementers, we have separated the different steps that are involved in the process of sending transactions. You will be able to generate unsigned transactions (example with [coin transfer](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#post-banktransfers)), [sign](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#post-authtxsign) and [broadcast](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/light/api.md#post-authtxbroadcast) them with different API endpoints. This allows service providers to use their own signing mechanism for instance.
|
||||
|
||||
+28
-28
@@ -98,7 +98,7 @@ When you query an account balance with zero tokens, you will get this error: `No
|
||||
The following command could be used to send coins from one account to another:
|
||||
|
||||
```bash
|
||||
gaiacli send \
|
||||
gaiacli tx send \
|
||||
--amount=10faucetToken \
|
||||
--chain-id=<chain_id> \
|
||||
--name=<key_name> \
|
||||
@@ -131,7 +131,7 @@ gaiacli account <account_cosmos> --block=<block_height>
|
||||
You can simulate a transaction without actually broadcasting it by appending the `--dry-run` flag to the command line:
|
||||
|
||||
```bash
|
||||
gaiacli send \
|
||||
gaiacli tx send \
|
||||
--amount=10faucetToken \
|
||||
--chain-id=<chain_id> \
|
||||
--name=<key_name> \
|
||||
@@ -142,7 +142,7 @@ gaiacli send \
|
||||
Furthermore, you can build a transaction and print its JSON format to STDOUT by appending `--generate-only` to the list of the command line arguments:
|
||||
|
||||
```bash
|
||||
gaiacli send \
|
||||
gaiacli tx send \
|
||||
--amount=10faucetToken \
|
||||
--chain-id=<chain_id> \
|
||||
--name=<key_name> \
|
||||
@@ -153,7 +153,7 @@ gaiacli send \
|
||||
You can now sign the transaction file generated through the `--generate-only` flag by providing your key to the following command:
|
||||
|
||||
```bash
|
||||
gaiacli sign \
|
||||
gaiacli tx sign \
|
||||
--chain-id=<chain_id> \
|
||||
--name=<key_name>
|
||||
unsignedSendTx.json > signedSendTx.json
|
||||
@@ -162,7 +162,7 @@ gaiacli sign \
|
||||
You can broadcast the signed transaction to a node by providing the JSON file to the following command:
|
||||
|
||||
```
|
||||
gaiacli broadcast --node=<node> signedSendTx.json
|
||||
gaiacli tx broadcast --node=<node> signedSendTx.json
|
||||
```
|
||||
|
||||
### Staking
|
||||
@@ -180,13 +180,13 @@ On the upcoming mainnet, you can delegate `atom` to a validator. These [delegato
|
||||
You can query the list of all validators of a specific chain:
|
||||
|
||||
```bash
|
||||
gaiacli stake validators
|
||||
gaiacli query validators
|
||||
```
|
||||
|
||||
If you want to get the information of a single validator you can check it with:
|
||||
|
||||
```bash
|
||||
gaiacli stake validator <account_cosmosval>
|
||||
gaiacli query validator <account_cosmosval>
|
||||
```
|
||||
|
||||
#### Bond Tokens
|
||||
@@ -194,7 +194,7 @@ gaiacli stake validator <account_cosmosval>
|
||||
On the testnet, we delegate `steak` instead of `atom`. Here's how you can bond tokens to a testnet validator (*i.e.* delegate):
|
||||
|
||||
```bash
|
||||
gaiacli stake delegate \
|
||||
gaiacli tx delegate \
|
||||
--amount=10steak \
|
||||
--validator=$(gaiad tendermint show-validator) \
|
||||
--name=<key_name> \
|
||||
@@ -212,7 +212,7 @@ Don't use more `steak` thank you have! You can always get more by using the [Fau
|
||||
Once submitted a delegation to a validator, you can see it's information by using the following command:
|
||||
|
||||
```bash
|
||||
gaiacli stake delegation \
|
||||
gaiacli query delegation \
|
||||
--address-delegator=<account_cosmos> \
|
||||
--validator=<account_cosmosval>
|
||||
```
|
||||
@@ -220,7 +220,7 @@ gaiacli stake delegation \
|
||||
Or if you want to check all your current delegations with disctinct validators:
|
||||
|
||||
```bash
|
||||
gaiacli stake delegations <account_cosmos>
|
||||
gaiacli query delegations <account_cosmos>
|
||||
```
|
||||
|
||||
You can also get previous delegation(s) status by adding the `--height` flag.
|
||||
@@ -230,17 +230,17 @@ You can also get previous delegation(s) status by adding the `--height` flag.
|
||||
If for any reason the validator misbehaves, or you just want to unbond a certain amount of tokens, use this following command. You can unbond a specific `shares-amount` (eg:`12.1`\) or a `shares-percent` (eg:`25`) with the corresponding flags.
|
||||
|
||||
```bash
|
||||
gaiacli stake unbond begin \
|
||||
gaiacli tx unbond begin \
|
||||
--validator=<account_cosmosval> \
|
||||
--shares-percent=100 \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
```
|
||||
|
||||
Later you must complete the unbonding process by using the `gaiacli stake unbond complete` command:
|
||||
Later you must complete the unbonding process by using the `gaiacli tx unbond complete` command:
|
||||
|
||||
```bash
|
||||
gaiacli stake unbond complete \
|
||||
gaiacli tx unbond complete \
|
||||
--validator=<account_cosmosval> \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
@@ -251,7 +251,7 @@ gaiacli stake unbond complete \
|
||||
Once you begin an unbonding-delegation, you can see it's information by using the following command:
|
||||
|
||||
```bash
|
||||
gaiacli stake unbonding-delegation \
|
||||
gaiacli query unbonding-delegation \
|
||||
--address-delegator=<account_cosmos> \
|
||||
--validator=<account_cosmosval> \
|
||||
```
|
||||
@@ -259,7 +259,7 @@ gaiacli stake unbonding-delegation \
|
||||
Or if you want to check all your current unbonding-delegations with disctinct validators:
|
||||
|
||||
```bash
|
||||
gaiacli stake unbonding-delegations <account_cosmos>
|
||||
gaiacli query unbonding-delegations <account_cosmos>
|
||||
```
|
||||
|
||||
You can also get previous unbonding-delegation(s) status by adding the `--height` flag.
|
||||
@@ -269,7 +269,7 @@ You can also get previous unbonding-delegation(s) status by adding the `--height
|
||||
A redelegation is a type delegation that allows you to bond illiquid tokens from one validator to another:
|
||||
|
||||
```bash
|
||||
gaiacli stake redelegate begin \
|
||||
gaiacli tx redelegate begin \
|
||||
--address-validator-source=<account_cosmosval> \
|
||||
--address-validator-dest=<account_cosmosval> \
|
||||
--shares-percent=50 \
|
||||
@@ -279,10 +279,10 @@ gaiacli stake redelegate begin \
|
||||
|
||||
Here you can also redelegate a specific `shares-amount` or a `shares-percent` with the corresponding flags.
|
||||
|
||||
Later you must complete the redelegation process by using the `gaiacli stake redelegate complete` command:
|
||||
Later you must complete the redelegation process by using the `gaiacli tx redelegate complete` command:
|
||||
|
||||
```bash
|
||||
gaiacli stake unbond complete \
|
||||
gaiacli tx unbond complete \
|
||||
--validator=<account_cosmosval> \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
@@ -293,7 +293,7 @@ gaiacli stake unbond complete \
|
||||
Once you begin an redelegation, you can see it's information by using the following command:
|
||||
|
||||
```bash
|
||||
gaiacli stake redelegation \
|
||||
gaiacli query redelegation \
|
||||
--address-delegator=<account_cosmos> \
|
||||
--address-validator-source=<account_cosmosval> \
|
||||
--address-validator-dest=<account_cosmosval> \
|
||||
@@ -302,7 +302,7 @@ gaiacli stake redelegation \
|
||||
Or if you want to check all your current unbonding-delegations with disctinct validators:
|
||||
|
||||
```bash
|
||||
gaiacli stake redelegations <account_cosmos>
|
||||
gaiacli query redelegations <account_cosmos>
|
||||
```
|
||||
|
||||
You can also get previous redelegation(s) status by adding the `--height` flag.
|
||||
@@ -331,7 +331,7 @@ In order to create a governance proposal, you must submit an initial deposit alo
|
||||
- `type`: Type of proposal. Must be of value _Text_ (types _SoftwareUpgrade_ and _ParameterChange_ not supported yet).
|
||||
|
||||
```bash
|
||||
gaiacli gov submit-proposal \
|
||||
gaiacli tx submit-proposal \
|
||||
--title=<title> \
|
||||
--description=<description> \
|
||||
--type=<Text/ParameterChange/SoftwareUpgrade> \
|
||||
@@ -346,14 +346,14 @@ gaiacli gov submit-proposal \
|
||||
Once created, you can now query information of the proposal:
|
||||
|
||||
```bash
|
||||
gaiacli gov query-proposal \
|
||||
gaiacli query proposal \
|
||||
--proposal-id=<proposal_id>
|
||||
```
|
||||
|
||||
Or query all available proposals:
|
||||
|
||||
```bash
|
||||
gaiacli gov query-proposals
|
||||
gaiacli query proposals
|
||||
```
|
||||
|
||||
You can also query proposals filtered by `voter` or `depositer` by using the corresponding flags.
|
||||
@@ -363,7 +363,7 @@ You can also query proposals filtered by `voter` or `depositer` by using the cor
|
||||
In order for a proposal to be broadcasted to the network, the amount deposited must be above a `minDeposit` value (default: `10 steak`). If the proposal you previously created didn't meet this requirement, you can still increase the total amount deposited to activate it. Once the minimum deposit is reached, the proposal enters voting period:
|
||||
|
||||
```bash
|
||||
gaiacli gov deposit \
|
||||
gaiacli tx deposit \
|
||||
--proposal-id=<proposal_id> \
|
||||
--depositer=<account_cosmos> \
|
||||
--deposit=<200steak> \
|
||||
@@ -378,7 +378,7 @@ gaiacli gov deposit \
|
||||
After a proposal's deposit reaches the `MinDeposit` value, the voting period opens. Bonded `Atom` holders can then cast vote on it:
|
||||
|
||||
```bash
|
||||
gaiacli gov vote \
|
||||
gaiacli tx vote \
|
||||
--proposal-id=<proposal_id> \
|
||||
--voter=<account_cosmos> \
|
||||
--option=<Yes/No/NoWithVeto/Abstain> \
|
||||
@@ -391,7 +391,7 @@ gaiacli gov vote \
|
||||
Check the vote with the option you just submitted:
|
||||
|
||||
```bash
|
||||
gaiacli gov query-vote \
|
||||
gaiacli query vote \
|
||||
--proposal-id=<proposal_id> \
|
||||
--voter=<account_cosmos>
|
||||
```
|
||||
@@ -401,7 +401,7 @@ gaiacli gov query-vote \
|
||||
You can get the current parameters that define high level settings for staking:
|
||||
|
||||
```
|
||||
gaiacli stake parameters
|
||||
gaiacli query parameters
|
||||
```
|
||||
|
||||
With the above command you will get the values for:
|
||||
@@ -420,7 +420,7 @@ All this values can be updated though a `governance` process by submitting a par
|
||||
A staking `Pool` defines the dynamic parameters of the current state. You can query them with the following command:
|
||||
|
||||
```
|
||||
gaiacli stake pool
|
||||
gaiacli query pool
|
||||
```
|
||||
|
||||
With the `pool` command you will get the values for:
|
||||
|
||||
@@ -22,14 +22,14 @@ Your `cosmosvalconspub` can be used to create a new validator by staking tokens.
|
||||
gaiad tendermint show-validator
|
||||
```
|
||||
|
||||
Next, craft your `gaiacli stake create-validator` command:
|
||||
Next, craft your `gaiacli tx create-validator` command:
|
||||
|
||||
::: warning Note
|
||||
Don't use more `steak` thank you have! You can always get more by using the [Faucet](https://faucetcosmos.network/)!
|
||||
:::
|
||||
|
||||
```bash
|
||||
gaiacli stake create-validator \
|
||||
gaiacli tx create-validator \
|
||||
--amount=5steak \
|
||||
--pubkey=$(gaiad tendermint show-validator) \
|
||||
--address-validator=<account_cosmosval>
|
||||
@@ -52,7 +52,7 @@ You can edit your validator's public description. This info is to identify your
|
||||
The `--identity` can be used as to verify identity with systems like Keybase or UPort. When using with Keybase `--identity` should be populated with a 16-digit string that is generated with a [keybase.io](https://keybase.io) account. It's a cryptographically secure method of verifying your identity across multiple online networks. The Keybase API allows us to retrieve your Keybase avatar. This is how you can add a logo to your validator profile.
|
||||
|
||||
```bash
|
||||
gaiacli stake edit-validator
|
||||
gaiacli tx edit-validator
|
||||
--validator=<account_cosmos>
|
||||
--moniker="choose a moniker" \
|
||||
--website="https://cosmos.network" \
|
||||
@@ -75,7 +75,7 @@ __Note__: The `commission-rate` value must adhere to the following invariants:
|
||||
View the validator's information with this command:
|
||||
|
||||
```bash
|
||||
gaiacli stake validator <account_cosmos>
|
||||
gaiacli query validator <account_cosmos>
|
||||
```
|
||||
|
||||
### Track Validator Signing Information
|
||||
@@ -83,7 +83,7 @@ gaiacli stake validator <account_cosmos>
|
||||
In order to keep track of a validator's signatures in the past you can do so by using the `signing-info` command:
|
||||
|
||||
```bash
|
||||
gaiacli stake signing-information <validator-pubkey>\
|
||||
gaiacli query signing-information <validator-pubkey>\
|
||||
--chain-id=<chain_id>
|
||||
```
|
||||
|
||||
@@ -92,7 +92,7 @@ gaiacli stake signing-information <validator-pubkey>\
|
||||
When a validator is "jailed" for downtime, you must submit an `Unjail` transaction in order to be able to get block proposer rewards again (depends on the zone fee distribution).
|
||||
|
||||
```bash
|
||||
gaiacli stake unjail \
|
||||
gaiacli tx unjail \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
--validator=<account_cosmosval> \
|
||||
@@ -104,7 +104,7 @@ gaiacli stake unjail \
|
||||
Your validator is active if the following command returns anything:
|
||||
|
||||
```bash
|
||||
gaiacli tendermint validator-set | grep "$(gaiad tendermint show-validator)"
|
||||
gaiacli query tendermint-validator-set | grep "$(gaiad tendermint show-validator)"
|
||||
```
|
||||
|
||||
You should also be able to see your validator on the [Explorer](https://explorecosmos.network/validators). You are looking for the `bech32` encoded `address` in the `~/.gaiad/config/priv_validator.json` file.
|
||||
@@ -128,7 +128,7 @@ gaiad start
|
||||
Wait for your full node to catch up to the latest block. Next, run the following command. Note that `<cosmos>` is the address of your validator account, and `<name>` is the name of the validator account. You can find this info by running `gaiacli keys list`.
|
||||
|
||||
```bash
|
||||
gaiacli stake unjail <cosmos> --chain-id=<chain_id> --name=<name>
|
||||
gaiacli tx unjail <cosmos> --chain-id=<chain_id> --name=<name>
|
||||
```
|
||||
|
||||
::: danger Warning
|
||||
|
||||
Reference in New Issue
Block a user