Skip to content

Commit d71a1ae

Browse files
committed
adding derive pool query
1 parent e1478a4 commit d71a1ae

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

x/accumulator/client/cli/query.go

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command {
2525
}
2626

2727
cmd.AddCommand(CmdQueryParams())
28+
cmd.AddCommand(CmdDerivePoolAddress())
2829
// this line is used by starport scaffolding # 1
2930

3031
return cmd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package cli
2+
3+
import (
4+
"fmt"
5+
"github.com/cosmos/cosmos-sdk/x/accumulator/keeper"
6+
"github.com/cosmos/cosmos-sdk/x/accumulator/types"
7+
"github.com/spf13/cobra"
8+
)
9+
10+
func CmdDerivePoolAddress() *cobra.Command {
11+
cmd := &cobra.Command{
12+
Use: "derive-pool",
13+
Short: "Derive pool addressess",
14+
RunE: func(cmd *cobra.Command, args []string) error {
15+
16+
return nil
17+
},
18+
}
19+
20+
fmt.Printf("Pool %s address: %s\n", types.AdminPoolName, keeper.GetPoolAddress(types.AdminPoolName).String())
21+
fmt.Printf("Pool %s address: %s\n", types.ValidatorPoolName, keeper.GetPoolAddress(types.ValidatorPoolName).String())
22+
fmt.Printf("Pool %s address: %s\n", types.NFTPoolName, keeper.GetPoolAddress(types.NFTPoolName).String())
23+
return cmd
24+
}

0 commit comments

Comments
 (0)