From 8966329643cf40aed1db791e0f9c6c3b7fde337f Mon Sep 17 00:00:00 2001 From: Denali Marsh Date: Fri, 11 Sep 2020 14:58:22 +0200 Subject: [PATCH] add example to cli cmd (#648) --- x/pricefeed/client/cli/tx.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/pricefeed/client/cli/tx.go b/x/pricefeed/client/cli/tx.go index 2db366b9..9e978122 100644 --- a/x/pricefeed/client/cli/tx.go +++ b/x/pricefeed/client/cli/tx.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" @@ -43,7 +44,9 @@ func GetCmdPostPrice(cdc *codec.Codec) *cobra.Command { return &cobra.Command{ Use: "postprice [marketID] [price] [expiry]", Short: "post the latest price for a particular market with a given expiry as a UNIX time", - Args: cobra.ExactArgs(3), + Example: fmt.Sprintf("%s tx %s postprice bnb:usd 25 9999999999 --from validator", + version.ClientName, types.ModuleName), + Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { inBuf := bufio.NewReader(cmd.InOrStdin()) cliCtx := context.NewCLIContext().WithCodec(cdc)