forked from baron-chain/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautocli.go
27 lines (25 loc) · 874 Bytes
/
autocli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package gov
import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
govv1 "cosmossdk.io/api/cosmos/gov/v1"
govv1beta1 "cosmossdk.io/api/cosmos/gov/v1beta1"
)
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Tx: &autocliv1.ServiceCommandDescriptor{
Service: govv1.Msg_ServiceDesc.ServiceName,
// map v1beta1 as a sub-command
SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{
"v1beta1": {Service: govv1beta1.Msg_ServiceDesc.ServiceName},
},
},
Query: &autocliv1.ServiceCommandDescriptor{
Service: govv1.Query_ServiceDesc.ServiceName,
// map v1beta1 as a sub-command
SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{
"v1beta1": {Service: govv1beta1.Query_ServiceDesc.ServiceName},
},
},
}
}