File tree 1 file changed +28
-0
lines changed
x/ccv/provider/client/cli
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ func NewQueryCmd() *cobra.Command {
41
41
cmd .AddCommand (CmdBlocksUntilNextEpoch ())
42
42
cmd .AddCommand (CmdConsumerIdFromClientId ())
43
43
cmd .AddCommand (CmdConsumerChain ())
44
+ cmd .AddCommand (CmdConsumerGenesisTime ())
44
45
return cmd
45
46
}
46
47
@@ -584,3 +585,30 @@ func CmdConsumerChain() *cobra.Command {
584
585
585
586
return cmd
586
587
}
588
+
589
+ func CmdConsumerGenesisTime () * cobra.Command {
590
+ cmd := & cobra.Command {
591
+ Use : "consumer-genesis-time [consumer-id]" ,
592
+ Short : "Query the genesis time of the consumer chain associated with the consumer id" ,
593
+ Args : cobra .ExactArgs (1 ),
594
+ RunE : func (cmd * cobra.Command , args []string ) error {
595
+ clientCtx , err := client .GetClientQueryContext (cmd )
596
+ if err != nil {
597
+ return err
598
+ }
599
+ queryClient := types .NewQueryClient (clientCtx )
600
+
601
+ req := & types.QueryConsumerGenesisTimeRequest {ConsumerId : args [0 ]}
602
+ res , err := queryClient .QueryConsumerGenesisTime (cmd .Context (), req )
603
+ if err != nil {
604
+ return err
605
+ }
606
+
607
+ return clientCtx .PrintProto (res )
608
+ },
609
+ }
610
+
611
+ flags .AddQueryFlagsToCmd (cmd )
612
+
613
+ return cmd
614
+ }
You can’t perform that action at this time.
0 commit comments