chore: set proto/cosmos/autocli to main (#23725)
This commit is contained in:
+6
-6
@@ -4,15 +4,15 @@ deps:
|
||||
- remote: buf.build
|
||||
owner: cosmos
|
||||
repository: cosmos-proto
|
||||
commit: 1935555c206d4afb9e94615dfd0fad31
|
||||
digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377
|
||||
commit: 04467658e59e44bbb22fe568206e1f70
|
||||
digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466
|
||||
- remote: buf.build
|
||||
owner: cosmos
|
||||
repository: gogo-proto
|
||||
commit: 5e5b9fdd01804356895f8f79a6f1ddc1
|
||||
digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952
|
||||
commit: 88ef6483f90f478fb938c37dde52ece3
|
||||
digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba
|
||||
- remote: buf.build
|
||||
owner: googleapis
|
||||
repository: googleapis
|
||||
commit: cc916c31859748a68fd229a3c8d7a2e8
|
||||
digest: shake256:469b049d0eb04203d5272062636c078decefc96fec69739159c25d85349c50c34c7706918a8b216c5c27f76939df48452148cff8c5c3ae77fa6ba5c25c1b8bf8
|
||||
commit: 546238c53f7340c6a2a6099fb863bc1b
|
||||
digest: shake256:8d75c12f391e392b24c076d05117b47aeddb090add99c70247a8f4389b906a65f61a933c68e54ed8b73a050b967b6b712ba194348b67c3ab3ee26cc2cb25852c
|
||||
|
||||
@@ -2,6 +2,8 @@ syntax = "proto3";
|
||||
|
||||
package cosmos.autocli.v1;
|
||||
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1";
|
||||
|
||||
// ModuleOptions describes the CLI options for a Cosmos SDK module.
|
||||
@@ -15,7 +17,6 @@ message ModuleOptions {
|
||||
|
||||
// ServiceCommandDescriptor describes a CLI command based on a protobuf service.
|
||||
message ServiceCommandDescriptor {
|
||||
|
||||
// service is the fully qualified name of the protobuf service to build
|
||||
// the command from. It can be left empty if sub_commands are used instead
|
||||
// which may be the case if a module provides multiple tx and/or query services.
|
||||
@@ -30,6 +31,14 @@ message ServiceCommandDescriptor {
|
||||
// different protobuf services. The map key is used as the name of the
|
||||
// sub-command.
|
||||
map<string, ServiceCommandDescriptor> sub_commands = 3;
|
||||
|
||||
// enhance_custom_commands specifies whether to skip the service when generating commands, if a custom command already
|
||||
// exists, or enhance the existing command. If set to true, the custom command will be enhanced with the services from
|
||||
// gRPC. otherwise when a custom command exists, no commands will be generated for the service.
|
||||
bool enhance_custom_command = 4;
|
||||
|
||||
// short is an optional parameter used to override the short description of the auto generated command.
|
||||
string short = 5;
|
||||
}
|
||||
|
||||
// RpcCommandOptions specifies options for commands generated from protobuf
|
||||
@@ -81,6 +90,12 @@ message RpcCommandOptions {
|
||||
|
||||
// skip specifies whether to skip this rpc method when generating commands.
|
||||
bool skip = 12;
|
||||
|
||||
// gov_proposal specifies whether autocli should generate a gov proposal transaction for this rpc method.
|
||||
// Normally autocli generates a transaction containing the message and broadcast it.
|
||||
// However, when true, autocli generates a proposal transaction containing the message and broadcast it.
|
||||
// This option is ineffective for query commands.
|
||||
bool gov_proposal = 13 [(cosmos_proto.field_added_in) = "client/v2 v2.0.0-beta.2"];
|
||||
}
|
||||
|
||||
// FlagOptions are options for flags generated from rpc request fields.
|
||||
@@ -88,7 +103,6 @@ message RpcCommandOptions {
|
||||
// kebab-case name of the field. Fields can be turned into positional arguments
|
||||
// instead by using RpcCommandOptions.positional_args.
|
||||
message FlagOptions {
|
||||
|
||||
// name is an alternate name to use for the field flag.
|
||||
string name = 1;
|
||||
|
||||
@@ -119,6 +133,10 @@ message PositionalArgDescriptor {
|
||||
|
||||
// varargs makes a positional parameter a varargs parameter. This can only be
|
||||
// applied to last positional parameter and the proto_field must a repeated
|
||||
// field.
|
||||
// field. Note: It is mutually exclusive with optional.
|
||||
bool varargs = 2;
|
||||
|
||||
// optional makes the last positional parameter optional.
|
||||
// Note: It is mutually exclusive with varargs.
|
||||
bool optional = 3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cosmos.counter.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/testutil/x/counter/types";
|
||||
|
||||
// Module is the config object of the counter module.
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import: "github.com/cosmos/cosmos-sdk/testutil/x/counter"
|
||||
};
|
||||
|
||||
// authority defines the custom module authority. If not set, defaults to the governance module.
|
||||
string authority = 1;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.counter.v1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/testutil/x/counter/types";
|
||||
|
||||
// Query defines the gRPC querier service.
|
||||
service Query {
|
||||
// GetCount queries the parameters of x/Counter module.
|
||||
rpc GetCount(QueryGetCountRequest) returns (QueryGetCountResponse);
|
||||
}
|
||||
|
||||
// QueryGetCountRequest defines the request type for querying x/mock count.
|
||||
message QueryGetCountRequest {}
|
||||
|
||||
// QueryGetCountResponse defines the response type for querying x/mock count.
|
||||
message QueryGetCountResponse {
|
||||
int64 total_count = 1;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
syntax = "proto3";
|
||||
package cosmos.counter.v1;
|
||||
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "amino/amino.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/testutil/x/counter/types";
|
||||
|
||||
// Msg defines the counter Msg service.
|
||||
service Msg {
|
||||
option (cosmos.msg.v1.service) = true;
|
||||
|
||||
// IncreaseCount increments the counter by the specified amount.
|
||||
rpc IncreaseCount(MsgIncreaseCounter) returns (MsgIncreaseCountResponse);
|
||||
}
|
||||
|
||||
// MsgIncreaseCounter defines a count Msg service counter.
|
||||
message MsgIncreaseCounter {
|
||||
option (amino.name) = "cosmos-sdk/increase_counter"; // TODO: remove amino
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
// signer is the address that controls the module (defaults to x/gov unless overwritten).
|
||||
string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// count is the number of times to increment the counter.
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
// MsgIncreaseCountResponse is the Msg/Counter response type.
|
||||
message MsgIncreaseCountResponse {
|
||||
// new_count is the number of times the counter was incremented.
|
||||
int64 new_count = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user