Skip to content

Commit

Permalink
Register nativedex CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBorst committed May 7, 2024
1 parent 399fd11 commit 65fd7a1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
26 changes: 26 additions & 0 deletions x/nativedex/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,39 @@ import (

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/version"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/AltheaFoundation/althea-L1/x/nativedex/types"
)

// GetTxCmd bundles all the subcmds together so they appear under `gravity tx`
func GetTxCmd(storeKey string) *cobra.Command {
// nolint: exhaustruct
nativedexTxCmd := &cobra.Command{
Use: types.ModuleName,
Short: "nativedex transaction subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}

nativedexTxCmd.AddCommand([]*cobra.Command{
NewUpgradeProxyProposalCmd(),
NewCollectTreasuryProposalCmd(),
NewSetTreasuryProposalCmd(),
NewAuthorityTransferProposalCmd(),
NewHotPathOpenProposalCmd(),
NewSetSafeModeProposalCmd(),
NewTransferGovernanceProposalCmd(),
NewOpsProposalCmd(),
}...)

return nativedexTxCmd
}

// NewUpgradeProxyProposalCmd implements the command to submit a UpgradeProxyProposal
// nolint: dupl
func NewUpgradeProxyProposalCmd() *cobra.Command {
Expand Down
18 changes: 0 additions & 18 deletions x/nativedex/client/proposal_handler.go

This file was deleted.

2 changes: 1 addition & 1 deletion x/nativedex/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r

// GetTxCmd returns the capability module's root tx command.
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
return nil
return cli.GetTxCmd(types.StoreKey)
}

// GetQueryCmd returns the capability module's root query command.
Expand Down

0 comments on commit 65fd7a1

Please sign in to comment.