diff --git a/x/fungible/client/cli/query.go b/x/fungible/client/cli/query.go index f4e4e7994e..74b4a55adb 100644 --- a/x/fungible/client/cli/query.go +++ b/x/fungible/client/cli/query.go @@ -30,6 +30,7 @@ func GetQueryCmd(_ string) *cobra.Command { CmdShowForeignCoins(), CmdGasStabilityPoolAddress(), CmdGasStabilityPoolBalance(), + CmdSystemContract(), ) return cmd diff --git a/x/fungible/client/cli/query_system_contract.go b/x/fungible/client/cli/query_system_contract.go new file mode 100644 index 0000000000..df79e833d9 --- /dev/null +++ b/x/fungible/client/cli/query_system_contract.go @@ -0,0 +1,32 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + "github.com/zeta-chain/zetacore/x/fungible/types" +) + +func CmdSystemContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "system-contract", + Short: "query system contract", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.SystemContract(context.Background(), &types.QueryGetSystemContractRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +}