Skip to content

Commit

Permalink
update queries
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCherepovskyi committed Jul 18, 2024
1 parent 76154f0 commit 132d67d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions x/accumulator/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command {
RunE: client.ValidateCmd,
}

cmd.AddCommand(CmdQueryParams())
cmd.AddCommand(CmdDerivePoolAddress())
cmd.AddCommand(CmdQueryParams(), CmdDerivePoolAddress())
// this line is used by starport scaffolding # 1

return cmd
Expand Down
3 changes: 3 additions & 0 deletions x/accumulator/client/cli/query_derive_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"fmt"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/x/accumulator/keeper"
"github.com/cosmos/cosmos-sdk/x/accumulator/types"
"github.com/spf13/cobra"
Expand All @@ -20,5 +21,7 @@ func CmdDerivePoolAddress() *cobra.Command {
fmt.Printf("Pool %s address: %s\n", types.AdminPoolName, keeper.GetPoolAddress(types.AdminPoolName).String())
fmt.Printf("Pool %s address: %s\n", types.ValidatorPoolName, keeper.GetPoolAddress(types.ValidatorPoolName).String())
fmt.Printf("Pool %s address: %s\n", types.NFTPoolName, keeper.GetPoolAddress(types.NFTPoolName).String())
flags.AddQueryFlagsToCmd(cmd)

return cmd
}
2 changes: 1 addition & 1 deletion x/nft/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command {

cmd.AddCommand(
CmdQueryParams(),
GetCmdQueryNFTByAddress(),
CmdQueryNFTByAddress(),
CmdDerivePoolAddress(),
)
return cmd
Expand Down
3 changes: 3 additions & 0 deletions x/nft/client/cli/query_derive_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"fmt"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/x/accumulator/keeper"
"github.com/spf13/cobra"
)
Expand All @@ -19,5 +20,7 @@ func CmdDerivePoolAddress() *cobra.Command {
fmt.Printf("Pool %s address: %s\n", "nft 1", keeper.GetPoolAddress("1").String())
fmt.Printf("Pool %s address: %s\n", "nft 2", keeper.GetPoolAddress("2").String())
fmt.Printf("Pool %s address: %s\n", "nft 3", keeper.GetPoolAddress("3").String())
flags.AddQueryFlagsToCmd(cmd)

return cmd
}
2 changes: 1 addition & 1 deletion x/nft/client/cli/query_nft.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)

func GetCmdQueryNFTByAddress() *cobra.Command {
func CmdQueryNFTByAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "grt-nft",
Short: "Query the nft by address",
Expand Down

0 comments on commit 132d67d

Please sign in to comment.