cosmos-sdk/x/ibc-transfer/client/cli/cli.go
Federico Kunze 1a5f2b7859
x/ibc-transfer: custom absolute packet timeout (#6248)
* x/ibc-transfer: custom timeout

* remove destHeight field

* cleanup

* fix test

* replace CLI arg for flag

* update CLI

* viper get flag

* address comments from review

* update cmd example:

* update spec

* address comments from review
2020-06-04 19:30:56 +00:00

44 lines
1.2 KiB
Go

package cli
import (
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
)
// GetQueryCmd returns the query commands for IBC fungible token transfer
func GetQueryCmd(cdc *codec.Codec, queryRoute string) *cobra.Command {
ics20TransferQueryCmd := &cobra.Command{
Use: "ibc-transfer",
Short: "IBC fungible token transfer query subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
ics20TransferQueryCmd.AddCommand(flags.GetCommands(
GetCmdQueryNextSequence(cdc, queryRoute),
)...)
return ics20TransferQueryCmd
}
// GetTxCmd returns the transaction commands for IBC fungible token transfer
func GetTxCmd(cdc *codec.Codec) *cobra.Command {
ics20TransferTxCmd := &cobra.Command{
Use: "ibc-transfer",
Short: "IBC fungible token transfer transaction subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
ics20TransferTxCmd.AddCommand(flags.PostCommands(
GetTransferTxCmd(cdc),
)...)
return ics20TransferTxCmd
}