Lorenz Herzberger bb8e055e44
add challenges query (#231)
* add challenges query

* implement query reissuances paginated

* fix linter errors

---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-12-13 11:47:32 +01:00

44 lines
967 B
Go

package cli
import (
"fmt"
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
"github.com/planetmint/planetmint-go/x/dao/types"
)
// GetQueryCmd returns the cli query commands for this module
func GetQueryCmd(_ string) *cobra.Command {
// Group dao queries under a subcommand
cmd := &cobra.Command{
Use: types.ModuleName,
Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName),
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
cmd.AddCommand(CmdQueryParams())
cmd.AddCommand(CmdGetMintRequestsByHash())
cmd.AddCommand(CmdMintRequestsByAddress())
cmd.AddCommand(CmdGetReissuance())
cmd.AddCommand(CmdGetReissuances())
cmd.AddCommand(CmdGetChallenge())
cmd.AddCommand(CmdChallenges())
cmd.AddCommand(CmdGetDistribution())
// this line is used by starport scaffolding # 1
return cmd
}