feat: bring autocli module config to v0.50 (#18111)

This commit is contained in:
Julien Robert
2023-10-16 15:09:06 +02:00
committed by GitHub
parent 9c2c424a1e
commit 18733a684e
11 changed files with 352 additions and 34 deletions
+24 -1
View File
@@ -47,7 +47,30 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: authzv1beta1.Msg_ServiceDesc.ServiceName,
Service: authzv1beta1.Msg_ServiceDesc.ServiceName,
EnhanceCustomCommand: false, // use custom commands only until v0.51
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Exec",
Use: "exec [msg-json-file] --from [grantee]",
Short: "Execute tx on behalf of granter account",
Example: fmt.Sprintf("$ %s tx authz exec msg.json --from grantee\n $ %[1]s tx bank send [granter] [recipient] [amount] --generate-only | jq .body.messages > msg.json && %[1]s tx authz exec msg.json --from grantee", version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "msgs", Varargs: true},
},
},
{
RpcMethod: "Revoke",
Use: "revoke [grantee] [msg-type-url] --from [granter]",
Short: `Revoke authorization from a granter to a grantee`,
Example: fmt.Sprintf(`%s tx authz revoke cosmos1skj.. %s --from=cosmos1skj..`,
version.AppName, bank.SendAuthorization{}.MsgTypeURL()),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "grantee"},
{ProtoField: "msg_type_url"},
},
},
},
},
}
}