cosmos-sdk/x/ibc/09-localhost/module.go
Federico Kunze e6bb2e7ed7
x/ibc: refactor CLI (#6639)
* x/ibc: refactor CLI

* refactor client CLI

* rename version ClientName

* Update x/ibc/09-localhost/client/cli/cli.go

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* address comments from review

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-07-08 05:57:59 -04:00

27 lines
706 B
Go

package localhost
import (
"github.com/gorilla/mux"
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/client/cli"
"github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/client/rest"
"github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/types"
)
// Name returns the IBC client name
func Name() string {
return types.SubModuleName
}
// RegisterRESTRoutes registers the REST routes for the IBC localhost client
func RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
rest.RegisterRoutes(clientCtx, rtr)
}
// GetTxCmd returns the root tx command for the IBC localhost client
func GetTxCmd() *cobra.Command {
return cli.NewTxCmd()
}