Skip to content

Commit

Permalink
refactor(dogfood): remove not required items
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Feb 6, 2024
1 parent 36a2961 commit 47861d7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 55 deletions.
28 changes: 28 additions & 0 deletions x/dogfood/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
// "github.com/cosmos/cosmos-sdk/client/flags"
// sdk "github.com/cosmos/cosmos-sdk/types"

Expand All @@ -31,3 +32,30 @@ func GetQueryCmd(queryRoute string) *cobra.Command {

return cmd
}

func CmdQueryParams() *cobra.Command {
cmd := &cobra.Command{
Use: "params",
Short: "shows the parameters of the module",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}

queryClient := types.NewQueryClient(clientCtx)

res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{})
if err != nil {
return err
}

return clientCtx.PrintProto(res)
},
}

flags.AddQueryFlagsToCmd(cmd)

return cmd
}
36 changes: 0 additions & 36 deletions x/dogfood/client/cli/query_params.go

This file was deleted.

12 changes: 0 additions & 12 deletions x/dogfood/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cli

import (
"fmt"
"time"

"github.com/spf13/cobra"

Expand All @@ -11,17 +10,6 @@ import (
"github.com/ExocoreNetwork/exocore/x/dogfood/types"
)

var (
DefaultRelativePacketTimeoutTimestamp = uint64(
(time.Duration(10) * time.Minute).Nanoseconds(),
)
)

const (
flagPacketTimeoutTimestamp = "packet-timeout-timestamp"
listSeparator = ","
)

// GetTxCmd returns the transaction commands for this module
func GetTxCmd() *cobra.Command {
cmd := &cobra.Command{
Expand Down
7 changes: 0 additions & 7 deletions x/dogfood/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,4 @@ const (

// StoreKey defines the primary module store key
StoreKey = ModuleName

// RouterKey defines the module's message routing key
RouterKey = ModuleName
)

func KeyPrefix(p string) []byte {
return []byte(p)
}

0 comments on commit 47861d7

Please sign in to comment.