laconicd/x/onboarding/module/autocli.go
Isha Venikar 8c14d578f7 Add flag to enable/disable onboarding of validators (#6)
* Add gql implementation for getParticipant query

* Add onboarding enable/disable flag

* Remove unnecessary message field from onboardParticipant message

* Add instructions to generate gql bindings
2024-07-16 09:25:39 +05:30

40 lines
1.1 KiB
Go

package module
import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
onboardingv1 "git.vdb.to/cerc-io/laconicd/api/cerc/onboarding/v1"
)
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: onboardingv1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Participants",
Use: "list",
Short: "List participants",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
},
},
},
// TODO: Use JSON file for input
Tx: &autocliv1.ServiceCommandDescriptor{
Service: onboardingv1.Msg_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "OnboardParticipant",
Use: "enroll",
Short: "Enroll a testnet validator",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "eth_payload"},
{ProtoField: "eth_signature"},
},
},
},
},
}
}