Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references (#7056)
* Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references * Ran make format target Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
0e3f87313e
commit
2079576cbe
@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
|
||||
gogogrpc "github.com/gogo/protobuf/grpc"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
"google.golang.org/grpc"
|
||||
@ -13,6 +12,8 @@ import (
|
||||
"google.golang.org/grpc/encoding/proto"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
)
|
||||
|
||||
|
||||
@ -5,14 +5,15 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
type IntegrationTestSuite struct {
|
||||
|
||||
@ -7,12 +7,13 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
dbm "github.com/tendermint/tm-db"
|
||||
|
||||
tiavl "github.com/cosmos/iavl"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/store/dbadapter"
|
||||
"github.com/cosmos/cosmos-sdk/store/gaskv"
|
||||
"github.com/cosmos/cosmos-sdk/store/iavl"
|
||||
"github.com/cosmos/cosmos-sdk/store/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
tiavl "github.com/cosmos/iavl"
|
||||
)
|
||||
|
||||
// copied from iavl/store_test.go
|
||||
|
||||
@ -67,6 +67,8 @@ func GetCmdQueryParams() *cobra.Command {
|
||||
// GetCmdQueryValidatorOutstandingRewards implements the query validator
|
||||
// outstanding rewards command.
|
||||
func GetCmdQueryValidatorOutstandingRewards() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "validator-outstanding-rewards [validator]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -75,9 +77,9 @@ func GetCmdQueryValidatorOutstandingRewards() *cobra.Command {
|
||||
fmt.Sprintf(`Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations.
|
||||
|
||||
Example:
|
||||
$ %s query distribution validator-outstanding-rewards cosmosvaloper1lwjmdnks33xwnmfayc64ycprww49n33mtm92ne
|
||||
$ %s query distribution validator-outstanding-rewards %s1lwjmdnks33xwnmfayc64ycprww49n33mtm92ne
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -111,6 +113,8 @@ $ %s query distribution validator-outstanding-rewards cosmosvaloper1lwjmdnks33xw
|
||||
|
||||
// GetCmdQueryValidatorCommission implements the query validator commission command.
|
||||
func GetCmdQueryValidatorCommission() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "commission [validator]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -119,9 +123,9 @@ func GetCmdQueryValidatorCommission() *cobra.Command {
|
||||
fmt.Sprintf(`Query validator commission rewards from delegators to that validator.
|
||||
|
||||
Example:
|
||||
$ %s query distribution commission cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query distribution commission %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -155,6 +159,8 @@ $ %s query distribution commission cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9l
|
||||
|
||||
// GetCmdQueryValidatorSlashes implements the query validator slashes command.
|
||||
func GetCmdQueryValidatorSlashes() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "slashes [validator] [start-height] [end-height]",
|
||||
Args: cobra.ExactArgs(3),
|
||||
@ -163,9 +169,9 @@ func GetCmdQueryValidatorSlashes() *cobra.Command {
|
||||
fmt.Sprintf(`Query all slashes of a validator for a given block range.
|
||||
|
||||
Example:
|
||||
$ %s query distribution slashes cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 0 100
|
||||
$ %s query distribution slashes %svaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 0 100
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -220,6 +226,9 @@ $ %s query distribution slashes cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmq
|
||||
|
||||
// GetCmdQueryDelegatorRewards implements the query delegator rewards command.
|
||||
func GetCmdQueryDelegatorRewards() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "rewards [delegator-addr] [validator-addr]",
|
||||
Args: cobra.RangeArgs(1, 2),
|
||||
@ -228,10 +237,10 @@ func GetCmdQueryDelegatorRewards() *cobra.Command {
|
||||
fmt.Sprintf(`Query all rewards earned by a delegator, optionally restrict to rewards from a single validator.
|
||||
|
||||
Example:
|
||||
$ %s query distribution rewards cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
$ %s query distribution rewards cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
$ %s query distribution rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName, version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr, version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
@ -77,6 +77,8 @@ func newSplitAndApply(
|
||||
}
|
||||
|
||||
func NewWithdrawRewardsCmd() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "withdraw-rewards [validator-addr]",
|
||||
Short: "Withdraw rewards from a given delegation address, and optionally withdraw validator commission if the delegation address given is a validator operator",
|
||||
@ -85,10 +87,10 @@ func NewWithdrawRewardsCmd() *cobra.Command {
|
||||
and optionally withdraw validator commission if the delegation address given is a validator operator.
|
||||
|
||||
Example:
|
||||
$ %s tx distribution withdraw-rewards cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey
|
||||
$ %s tx distribution withdraw-rewards cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey --commission
|
||||
$ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey
|
||||
$ %s tx distribution withdraw-rewards %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj --from mykey --commission
|
||||
`,
|
||||
version.AppName, version.AppName,
|
||||
version.AppName, bech32PrefixValAddr, version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -173,6 +175,8 @@ $ %s tx distribution withdraw-all-rewards --from mykey
|
||||
}
|
||||
|
||||
func NewSetWithdrawAddrCmd() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "set-withdraw-addr [withdraw-addr]",
|
||||
Short: "change the default withdraw address for rewards associated with an address",
|
||||
@ -180,9 +184,9 @@ func NewSetWithdrawAddrCmd() *cobra.Command {
|
||||
fmt.Sprintf(`Set the withdraw address for rewards associated with a delegator address.
|
||||
|
||||
Example:
|
||||
$ %s tx distribution set-withdraw-addr cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey
|
||||
$ %s tx distribution set-withdraw-addr %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -256,6 +260,8 @@ $ %s tx distribution fund-community-pool 100uatom --from mykey
|
||||
|
||||
// GetCmdSubmitProposal implements the command to submit a community-pool-spend proposal
|
||||
func GetCmdSubmitProposal() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "community-pool-spend [proposal-file]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -272,12 +278,12 @@ Where proposal.json contains:
|
||||
{
|
||||
"title": "Community Pool Spend",
|
||||
"description": "Pay me some Atoms!",
|
||||
"recipient": "cosmos1s5afhd6gxevu37mkqcvvsj8qeylhn0rz46zdlq",
|
||||
"recipient": "%s1s5afhd6gxevu37mkqcvvsj8qeylhn0rz46zdlq",
|
||||
"amount": "1000stake",
|
||||
"deposit": "1000stake"
|
||||
}
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
@ -4,9 +4,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
@ -3,8 +3,9 @@ package client_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing"
|
||||
)
|
||||
|
||||
type ClientTestSuite struct {
|
||||
|
||||
@ -3,6 +3,8 @@ package ibc_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
"github.com/cosmos/cosmos-sdk/x/ibc"
|
||||
@ -16,7 +18,6 @@ import (
|
||||
host "github.com/cosmos/cosmos-sdk/x/ibc/24-host"
|
||||
ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing"
|
||||
"github.com/cosmos/cosmos-sdk/x/ibc/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
)
|
||||
|
||||
func (suite *IBCTestSuite) TestValidateGenesis() {
|
||||
|
||||
@ -6,9 +6,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
|
||||
@ -47,6 +47,8 @@ func GetQueryCmd() *cobra.Command {
|
||||
|
||||
// GetCmdQueryValidator implements the validator query command.
|
||||
func GetCmdQueryValidator() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "validator [validator-addr]",
|
||||
Short: "Query a validator",
|
||||
@ -54,9 +56,9 @@ func GetCmdQueryValidator() *cobra.Command {
|
||||
fmt.Sprintf(`Query details about an individual validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking validator cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking validator %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -137,6 +139,8 @@ $ %s query staking validators
|
||||
|
||||
// GetCmdQueryValidatorUnbondingDelegations implements the query all unbonding delegatations from a validator command.
|
||||
func GetCmdQueryValidatorUnbondingDelegations() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "unbonding-delegations-from [validator-addr]",
|
||||
Short: "Query all unbonding delegatations from a validator",
|
||||
@ -144,9 +148,9 @@ func GetCmdQueryValidatorUnbondingDelegations() *cobra.Command {
|
||||
fmt.Sprintf(`Query delegations that are unbonding _from_ a validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking unbonding-delegations-from cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking unbonding-delegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -192,6 +196,8 @@ $ %s query staking unbonding-delegations-from cosmosvaloper1gghjut3ccd8ay0zduzj6
|
||||
// GetCmdQueryValidatorRedelegations implements the query all redelegatations
|
||||
// from a validator command.
|
||||
func GetCmdQueryValidatorRedelegations() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "redelegations-from [validator-addr]",
|
||||
Short: "Query all outgoing redelegatations from a validator",
|
||||
@ -199,9 +205,9 @@ func GetCmdQueryValidatorRedelegations() *cobra.Command {
|
||||
fmt.Sprintf(`Query delegations that are redelegating _from_ a validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking redelegations-from cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking redelegations-from %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -246,6 +252,9 @@ $ %s query staking redelegations-from cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fx
|
||||
|
||||
// GetCmdQueryDelegation the query delegation command.
|
||||
func GetCmdQueryDelegation() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "delegation [delegator-addr] [validator-addr]",
|
||||
Short: "Query a delegation based on address and validator address",
|
||||
@ -253,9 +262,9 @@ func GetCmdQueryDelegation() *cobra.Command {
|
||||
fmt.Sprintf(`Query delegations for an individual delegator on an individual validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(2),
|
||||
@ -300,6 +309,8 @@ $ %s query staking delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosm
|
||||
// GetCmdQueryDelegations implements the command to query all the delegations
|
||||
// made from one delegator.
|
||||
func GetCmdQueryDelegations() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "delegations [delegator-addr]",
|
||||
Short: "Query all delegations made by one delegator",
|
||||
@ -307,9 +318,9 @@ func GetCmdQueryDelegations() *cobra.Command {
|
||||
fmt.Sprintf(`Query delegations for an individual delegator on all validators.
|
||||
|
||||
Example:
|
||||
$ %s query staking delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
$ %s query staking delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -355,6 +366,8 @@ $ %s query staking delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
// GetCmdQueryValidatorDelegations implements the command to query all the
|
||||
// delegations to a specific validator.
|
||||
func GetCmdQueryValidatorDelegations() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "delegations-to [validator-addr]",
|
||||
Short: "Query all delegations made to one validator",
|
||||
@ -362,9 +375,9 @@ func GetCmdQueryValidatorDelegations() *cobra.Command {
|
||||
fmt.Sprintf(`Query delegations on an individual validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking delegations-to cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking delegations-to %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -410,6 +423,9 @@ $ %s query staking delegations-to cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ld
|
||||
// GetCmdQueryUnbondingDelegation implements the command to query a single
|
||||
// unbonding-delegation record.
|
||||
func GetCmdQueryUnbondingDelegation() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "unbonding-delegation [delegator-addr] [validator-addr]",
|
||||
Short: "Query an unbonding-delegation record based on delegator and validator address",
|
||||
@ -417,9 +433,9 @@ func GetCmdQueryUnbondingDelegation() *cobra.Command {
|
||||
fmt.Sprintf(`Query unbonding delegations for an individual delegator on an individual validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking unbonding-delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking unbonding-delegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(2),
|
||||
@ -464,6 +480,8 @@ $ %s query staking unbonding-delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld7
|
||||
// GetCmdQueryUnbondingDelegations implements the command to query all the
|
||||
// unbonding-delegation records for a delegator.
|
||||
func GetCmdQueryUnbondingDelegations() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "unbonding-delegations [delegator-addr]",
|
||||
Short: "Query all unbonding-delegations records for one delegator",
|
||||
@ -471,9 +489,9 @@ func GetCmdQueryUnbondingDelegations() *cobra.Command {
|
||||
fmt.Sprintf(`Query unbonding delegations for an individual delegator.
|
||||
|
||||
Example:
|
||||
$ %s query staking unbonding-delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
$ %s query staking unbonding-delegations %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -519,6 +537,9 @@ $ %s query staking unbonding-delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld
|
||||
// GetCmdQueryRedelegation implements the command to query a single
|
||||
// redelegation record.
|
||||
func GetCmdQueryRedelegation() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "redelegation [delegator-addr] [src-validator-addr] [dst-validator-addr]",
|
||||
Short: "Query a redelegation record based on delegator and a source and destination validator address",
|
||||
@ -526,9 +547,9 @@ func GetCmdQueryRedelegation() *cobra.Command {
|
||||
fmt.Sprintf(`Query a redelegation record for an individual delegator between a source and destination validator.
|
||||
|
||||
Example:
|
||||
$ %s query staking redelegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
$ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr, bech32PrefixValAddr, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
Args: cobra.ExactArgs(3),
|
||||
@ -579,6 +600,8 @@ $ %s query staking redelegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p co
|
||||
// GetCmdQueryRedelegations implements the command to query all the
|
||||
// redelegation records for a delegator.
|
||||
func GetCmdQueryRedelegations() *cobra.Command {
|
||||
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "redelegations [delegator-addr]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
@ -587,9 +610,9 @@ func GetCmdQueryRedelegations() *cobra.Command {
|
||||
fmt.Sprintf(`Query all redelegation records for an individual delegator.
|
||||
|
||||
Example:
|
||||
$ %s query staking redelegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
$ %s query staking redelegation %s1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixAccAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
@ -149,6 +149,8 @@ func NewEditValidatorCmd() *cobra.Command {
|
||||
}
|
||||
|
||||
func NewDelegateCmd() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "delegate [validator-addr] [amount]",
|
||||
Args: cobra.ExactArgs(2),
|
||||
@ -157,9 +159,9 @@ func NewDelegateCmd() *cobra.Command {
|
||||
fmt.Sprintf(`Delegate an amount of liquid coins to a validator from your wallet.
|
||||
|
||||
Example:
|
||||
$ %s tx staking delegate cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --from mykey
|
||||
$ %s tx staking delegate %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --from mykey
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -195,6 +197,8 @@ $ %s tx staking delegate cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 10
|
||||
}
|
||||
|
||||
func NewRedelegateCmd() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "redelegate [src-validator-addr] [dst-validator-addr] [amount]",
|
||||
Short: "Redelegate illiquid tokens from one validator to another",
|
||||
@ -203,9 +207,9 @@ func NewRedelegateCmd() *cobra.Command {
|
||||
fmt.Sprintf(`Redelegate an amount of illiquid staking tokens from one validator to another.
|
||||
|
||||
Example:
|
||||
$ %s tx staking redelegate cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 100stake --from mykey
|
||||
$ %s tx staking redelegate %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj %s1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 100stake --from mykey
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -246,6 +250,8 @@ $ %s tx staking redelegate cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
|
||||
}
|
||||
|
||||
func NewUnbondCmd() *cobra.Command {
|
||||
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "unbond [validator-addr] [amount]",
|
||||
Short: "Unbond shares from a validator",
|
||||
@ -254,9 +260,9 @@ func NewUnbondCmd() *cobra.Command {
|
||||
fmt.Sprintf(`Unbond an amount of bonded shares from a validator.
|
||||
|
||||
Example:
|
||||
$ %s tx staking unbond cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from mykey
|
||||
$ %s tx staking unbond %s1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from mykey
|
||||
`,
|
||||
version.AppName,
|
||||
version.AppName, bech32PrefixValAddr,
|
||||
),
|
||||
),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user