-
Notifications
You must be signed in to change notification settings - Fork 6
/
autocli.go
52 lines (49 loc) · 1.69 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package service
import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
modulev1 "github.com/pokt-network/poktroll/api/poktroll/service"
)
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
// {
// RpcMethod: "Params",
// Use: "params",
// Short: "Shows the parameters of the module",
// },
// {
// RpcMethod: "AllServices",
// Use: "list-service",
// Short: "List all service",
// },
// {
// RpcMethod: "Service",
// Use: "show-service [id]",
// Short: "Shows a service",
// PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "index"}},
// },
// this line is used by ignite scaffolding # autocli/query
},
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Msg_ServiceDesc.ServiceName,
EnhanceCustomCommand: true, // only required if you want to use the custom command
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
// {
// RpcMethod: "UpdateParams",
// Skip: true, // skipped because authority gated
// },
// {
// RpcMethod: "AddService",
// Use: "add-service",
// Short: "Send a add-service tx",
// PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
// },
// this line is used by ignite scaffolding # autocli/tx
},
},
}
}