From 34559768fb25730d9779e68bacd9f8e6b2d77fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=B4ng=20Li=E1=BB=81u?= Date: Fri, 6 Dec 2024 17:00:52 +0700 Subject: [PATCH] Enable AutoCLI for x/accounts --- api/cosmos/accounts/v1/query.pulsar.go | 357 +++++++----- api/cosmos/accounts/v1/tx.pulsar.go | 525 ++++++++++-------- crypto/keys/secp256k1/secp256k1.go | 2 +- simsx/registry.go | 3 +- .../accounts/multisig/account_test.go | 64 ++- x/accounts/autocli.go | 62 +++ x/accounts/cli/cli.go | 205 ------- x/accounts/cli/cli_test.go | 144 ----- x/accounts/defaults/multisig/account_test.go | 41 +- x/accounts/genesis_test.go | 4 +- .../internal/implementation/encoding.go | 15 + x/accounts/keeper.go | 8 +- x/accounts/module.go | 25 +- x/accounts/msg_server.go | 2 +- x/accounts/msg_server_test.go | 23 +- .../proto/cosmos/accounts/v1/query.proto | 4 +- x/accounts/proto/cosmos/accounts/v1/tx.proto | 9 +- x/accounts/query_server.go | 2 +- x/accounts/query_server_test.go | 25 +- x/accounts/v1/query.pb.go | 158 ++++-- x/accounts/v1/schema.go | 4 +- x/accounts/v1/tx.pb.go | 234 ++++---- 22 files changed, 922 insertions(+), 994 deletions(-) create mode 100644 x/accounts/autocli.go delete mode 100644 x/accounts/cli/cli.go delete mode 100644 x/accounts/cli/cli_test.go diff --git a/api/cosmos/accounts/v1/query.pulsar.go b/api/cosmos/accounts/v1/query.pulsar.go index 7a1751ef4a57..25ebdeb2c618 100644 --- a/api/cosmos/accounts/v1/query.pulsar.go +++ b/api/cosmos/accounts/v1/query.pulsar.go @@ -14,16 +14,18 @@ import ( ) var ( - md_AccountQueryRequest protoreflect.MessageDescriptor - fd_AccountQueryRequest_target protoreflect.FieldDescriptor - fd_AccountQueryRequest_request protoreflect.FieldDescriptor + md_AccountQueryRequest protoreflect.MessageDescriptor + fd_AccountQueryRequest_target protoreflect.FieldDescriptor + fd_AccountQueryRequest_query_request_type_url protoreflect.FieldDescriptor + fd_AccountQueryRequest_json_message protoreflect.FieldDescriptor ) func init() { file_cosmos_accounts_v1_query_proto_init() md_AccountQueryRequest = File_cosmos_accounts_v1_query_proto.Messages().ByName("AccountQueryRequest") fd_AccountQueryRequest_target = md_AccountQueryRequest.Fields().ByName("target") - fd_AccountQueryRequest_request = md_AccountQueryRequest.Fields().ByName("request") + fd_AccountQueryRequest_query_request_type_url = md_AccountQueryRequest.Fields().ByName("query_request_type_url") + fd_AccountQueryRequest_json_message = md_AccountQueryRequest.Fields().ByName("json_message") } var _ protoreflect.Message = (*fastReflection_AccountQueryRequest)(nil) @@ -97,9 +99,15 @@ func (x *fastReflection_AccountQueryRequest) Range(f func(protoreflect.FieldDesc return } } - if x.Request != nil { - value := protoreflect.ValueOfMessage(x.Request.ProtoReflect()) - if !f(fd_AccountQueryRequest_request, value) { + if x.QueryRequestTypeUrl != "" { + value := protoreflect.ValueOfString(x.QueryRequestTypeUrl) + if !f(fd_AccountQueryRequest_query_request_type_url, value) { + return + } + } + if x.JsonMessage != "" { + value := protoreflect.ValueOfString(x.JsonMessage) + if !f(fd_AccountQueryRequest_json_message, value) { return } } @@ -120,8 +128,10 @@ func (x *fastReflection_AccountQueryRequest) Has(fd protoreflect.FieldDescriptor switch fd.FullName() { case "cosmos.accounts.v1.AccountQueryRequest.target": return x.Target != "" - case "cosmos.accounts.v1.AccountQueryRequest.request": - return x.Request != nil + case "cosmos.accounts.v1.AccountQueryRequest.query_request_type_url": + return x.QueryRequestTypeUrl != "" + case "cosmos.accounts.v1.AccountQueryRequest.json_message": + return x.JsonMessage != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.AccountQueryRequest")) @@ -140,8 +150,10 @@ func (x *fastReflection_AccountQueryRequest) Clear(fd protoreflect.FieldDescript switch fd.FullName() { case "cosmos.accounts.v1.AccountQueryRequest.target": x.Target = "" - case "cosmos.accounts.v1.AccountQueryRequest.request": - x.Request = nil + case "cosmos.accounts.v1.AccountQueryRequest.query_request_type_url": + x.QueryRequestTypeUrl = "" + case "cosmos.accounts.v1.AccountQueryRequest.json_message": + x.JsonMessage = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.AccountQueryRequest")) @@ -161,9 +173,12 @@ func (x *fastReflection_AccountQueryRequest) Get(descriptor protoreflect.FieldDe case "cosmos.accounts.v1.AccountQueryRequest.target": value := x.Target return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.AccountQueryRequest.request": - value := x.Request - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.v1.AccountQueryRequest.query_request_type_url": + value := x.QueryRequestTypeUrl + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.AccountQueryRequest.json_message": + value := x.JsonMessage + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.AccountQueryRequest")) @@ -186,8 +201,10 @@ func (x *fastReflection_AccountQueryRequest) Set(fd protoreflect.FieldDescriptor switch fd.FullName() { case "cosmos.accounts.v1.AccountQueryRequest.target": x.Target = value.Interface().(string) - case "cosmos.accounts.v1.AccountQueryRequest.request": - x.Request = value.Message().Interface().(*anypb.Any) + case "cosmos.accounts.v1.AccountQueryRequest.query_request_type_url": + x.QueryRequestTypeUrl = value.Interface().(string) + case "cosmos.accounts.v1.AccountQueryRequest.json_message": + x.JsonMessage = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.AccountQueryRequest")) @@ -208,13 +225,12 @@ func (x *fastReflection_AccountQueryRequest) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AccountQueryRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.v1.AccountQueryRequest.request": - if x.Request == nil { - x.Request = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Request.ProtoReflect()) case "cosmos.accounts.v1.AccountQueryRequest.target": panic(fmt.Errorf("field target of message cosmos.accounts.v1.AccountQueryRequest is not mutable")) + case "cosmos.accounts.v1.AccountQueryRequest.query_request_type_url": + panic(fmt.Errorf("field query_request_type_url of message cosmos.accounts.v1.AccountQueryRequest is not mutable")) + case "cosmos.accounts.v1.AccountQueryRequest.json_message": + panic(fmt.Errorf("field json_message of message cosmos.accounts.v1.AccountQueryRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.AccountQueryRequest")) @@ -230,9 +246,10 @@ func (x *fastReflection_AccountQueryRequest) NewField(fd protoreflect.FieldDescr switch fd.FullName() { case "cosmos.accounts.v1.AccountQueryRequest.target": return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.AccountQueryRequest.request": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.v1.AccountQueryRequest.query_request_type_url": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.AccountQueryRequest.json_message": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.AccountQueryRequest")) @@ -306,8 +323,12 @@ func (x *fastReflection_AccountQueryRequest) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Request != nil { - l = options.Size(x.Request) + l = len(x.QueryRequestTypeUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.JsonMessage) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -339,17 +360,17 @@ func (x *fastReflection_AccountQueryRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Request != nil { - encoded, err := options.Marshal(x.Request) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + if len(x.JsonMessage) > 0 { + i -= len(x.JsonMessage) + copy(dAtA[i:], x.JsonMessage) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.JsonMessage))) + i-- + dAtA[i] = 0x1a + } + if len(x.QueryRequestTypeUrl) > 0 { + i -= len(x.QueryRequestTypeUrl) + copy(dAtA[i:], x.QueryRequestTypeUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryRequestTypeUrl))) i-- dAtA[i] = 0x12 } @@ -443,9 +464,9 @@ func (x *fastReflection_AccountQueryRequest) ProtoMethods() *protoiface.Methods iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryRequestTypeUrl", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -455,27 +476,55 @@ func (x *fastReflection_AccountQueryRequest) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Request == nil { - x.Request = &anypb.Any{} + x.QueryRequestTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JsonMessage", wireType) } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Request); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.JsonMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4248,7 +4297,8 @@ type AccountQueryRequest struct { // target defines the account to be queried. Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` // request defines the query message being sent to the account. - Request *anypb.Any `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` + QueryRequestTypeUrl string `protobuf:"bytes,2,opt,name=query_request_type_url,json=queryRequestTypeUrl,proto3" json:"query_request_type_url,omitempty"` + JsonMessage string `protobuf:"bytes,3,opt,name=json_message,json=jsonMessage,proto3" json:"json_message,omitempty"` } func (x *AccountQueryRequest) Reset() { @@ -4278,11 +4328,18 @@ func (x *AccountQueryRequest) GetTarget() string { return "" } -func (x *AccountQueryRequest) GetRequest() *anypb.Any { +func (x *AccountQueryRequest) GetQueryRequestTypeUrl() string { if x != nil { - return x.Request + return x.QueryRequestTypeUrl } - return nil + return "" +} + +func (x *AccountQueryRequest) GetJsonMessage() string { + if x != nil { + return x.JsonMessage + } + return "" } // AccountQueryResponse is the response type for the Query/AccountQuery RPC method. @@ -4619,91 +4676,94 @@ var file_cosmos_accounts_v1_query_proto_rawDesc = []byte{ 0x12, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x5d, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, - 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, - 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4b, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x85, 0x01, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x33, 0x0a, 0x16, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x71, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x48, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x32, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x55, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, - 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x55, 0x0a, 0x10, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x1a, + 0x3f, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2e, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x38, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x14, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2f, 0x0a, 0x15, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x32, 0x89, 0x03, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x63, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x06, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x1a, 0x3f, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x38, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x30, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x2f, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x32, 0x89, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x63, - 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, + 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x21, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x42, 0xbe, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, - 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x66, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xbe, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -4732,24 +4792,23 @@ var file_cosmos_accounts_v1_query_proto_goTypes = []interface{}{ (*anypb.Any)(nil), // 9: google.protobuf.Any } var file_cosmos_accounts_v1_query_proto_depIdxs = []int32{ - 9, // 0: cosmos.accounts.v1.AccountQueryRequest.request:type_name -> google.protobuf.Any - 9, // 1: cosmos.accounts.v1.AccountQueryResponse.response:type_name -> google.protobuf.Any - 8, // 2: cosmos.accounts.v1.SchemaResponse.init_schema:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 8, // 3: cosmos.accounts.v1.SchemaResponse.execute_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 8, // 4: cosmos.accounts.v1.SchemaResponse.query_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 0, // 5: cosmos.accounts.v1.Query.AccountQuery:input_type -> cosmos.accounts.v1.AccountQueryRequest - 2, // 6: cosmos.accounts.v1.Query.Schema:input_type -> cosmos.accounts.v1.SchemaRequest - 4, // 7: cosmos.accounts.v1.Query.AccountType:input_type -> cosmos.accounts.v1.AccountTypeRequest - 6, // 8: cosmos.accounts.v1.Query.AccountNumber:input_type -> cosmos.accounts.v1.AccountNumberRequest - 1, // 9: cosmos.accounts.v1.Query.AccountQuery:output_type -> cosmos.accounts.v1.AccountQueryResponse - 3, // 10: cosmos.accounts.v1.Query.Schema:output_type -> cosmos.accounts.v1.SchemaResponse - 5, // 11: cosmos.accounts.v1.Query.AccountType:output_type -> cosmos.accounts.v1.AccountTypeResponse - 7, // 12: cosmos.accounts.v1.Query.AccountNumber:output_type -> cosmos.accounts.v1.AccountNumberResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 9, // 0: cosmos.accounts.v1.AccountQueryResponse.response:type_name -> google.protobuf.Any + 8, // 1: cosmos.accounts.v1.SchemaResponse.init_schema:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 8, // 2: cosmos.accounts.v1.SchemaResponse.execute_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 8, // 3: cosmos.accounts.v1.SchemaResponse.query_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 0, // 4: cosmos.accounts.v1.Query.AccountQuery:input_type -> cosmos.accounts.v1.AccountQueryRequest + 2, // 5: cosmos.accounts.v1.Query.Schema:input_type -> cosmos.accounts.v1.SchemaRequest + 4, // 6: cosmos.accounts.v1.Query.AccountType:input_type -> cosmos.accounts.v1.AccountTypeRequest + 6, // 7: cosmos.accounts.v1.Query.AccountNumber:input_type -> cosmos.accounts.v1.AccountNumberRequest + 1, // 8: cosmos.accounts.v1.Query.AccountQuery:output_type -> cosmos.accounts.v1.AccountQueryResponse + 3, // 9: cosmos.accounts.v1.Query.Schema:output_type -> cosmos.accounts.v1.SchemaResponse + 5, // 10: cosmos.accounts.v1.Query.AccountType:output_type -> cosmos.accounts.v1.AccountTypeResponse + 7, // 11: cosmos.accounts.v1.Query.AccountNumber:output_type -> cosmos.accounts.v1.AccountNumberResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_cosmos_accounts_v1_query_proto_init() } diff --git a/api/cosmos/accounts/v1/tx.pulsar.go b/api/cosmos/accounts/v1/tx.pulsar.go index ba3f7538ef79..27d10f7b115d 100644 --- a/api/cosmos/accounts/v1/tx.pulsar.go +++ b/api/cosmos/accounts/v1/tx.pulsar.go @@ -72,7 +72,7 @@ var ( md_MsgInit protoreflect.MessageDescriptor fd_MsgInit_sender protoreflect.FieldDescriptor fd_MsgInit_account_type protoreflect.FieldDescriptor - fd_MsgInit_message protoreflect.FieldDescriptor + fd_MsgInit_json_message protoreflect.FieldDescriptor fd_MsgInit_funds protoreflect.FieldDescriptor ) @@ -81,7 +81,7 @@ func init() { md_MsgInit = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgInit") fd_MsgInit_sender = md_MsgInit.Fields().ByName("sender") fd_MsgInit_account_type = md_MsgInit.Fields().ByName("account_type") - fd_MsgInit_message = md_MsgInit.Fields().ByName("message") + fd_MsgInit_json_message = md_MsgInit.Fields().ByName("json_message") fd_MsgInit_funds = md_MsgInit.Fields().ByName("funds") } @@ -162,9 +162,9 @@ func (x *fastReflection_MsgInit) Range(f func(protoreflect.FieldDescriptor, prot return } } - if x.Message != nil { - value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - if !f(fd_MsgInit_message, value) { + if x.JsonMessage != "" { + value := protoreflect.ValueOfString(x.JsonMessage) + if !f(fd_MsgInit_json_message, value) { return } } @@ -193,8 +193,8 @@ func (x *fastReflection_MsgInit) Has(fd protoreflect.FieldDescriptor) bool { return x.Sender != "" case "cosmos.accounts.v1.MsgInit.account_type": return x.AccountType != "" - case "cosmos.accounts.v1.MsgInit.message": - return x.Message != nil + case "cosmos.accounts.v1.MsgInit.json_message": + return x.JsonMessage != "" case "cosmos.accounts.v1.MsgInit.funds": return len(x.Funds) != 0 default: @@ -217,8 +217,8 @@ func (x *fastReflection_MsgInit) Clear(fd protoreflect.FieldDescriptor) { x.Sender = "" case "cosmos.accounts.v1.MsgInit.account_type": x.AccountType = "" - case "cosmos.accounts.v1.MsgInit.message": - x.Message = nil + case "cosmos.accounts.v1.MsgInit.json_message": + x.JsonMessage = "" case "cosmos.accounts.v1.MsgInit.funds": x.Funds = nil default: @@ -243,9 +243,9 @@ func (x *fastReflection_MsgInit) Get(descriptor protoreflect.FieldDescriptor) pr case "cosmos.accounts.v1.MsgInit.account_type": value := x.AccountType return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgInit.message": - value := x.Message - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.v1.MsgInit.json_message": + value := x.JsonMessage + return protoreflect.ValueOfString(value) case "cosmos.accounts.v1.MsgInit.funds": if len(x.Funds) == 0 { return protoreflect.ValueOfList(&_MsgInit_4_list{}) @@ -276,8 +276,8 @@ func (x *fastReflection_MsgInit) Set(fd protoreflect.FieldDescriptor, value prot x.Sender = value.Interface().(string) case "cosmos.accounts.v1.MsgInit.account_type": x.AccountType = value.Interface().(string) - case "cosmos.accounts.v1.MsgInit.message": - x.Message = value.Message().Interface().(*anypb.Any) + case "cosmos.accounts.v1.MsgInit.json_message": + x.JsonMessage = value.Interface().(string) case "cosmos.accounts.v1.MsgInit.funds": lv := value.List() clv := lv.(*_MsgInit_4_list) @@ -302,11 +302,6 @@ func (x *fastReflection_MsgInit) Set(fd protoreflect.FieldDescriptor, value prot // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.v1.MsgInit.message": - if x.Message == nil { - x.Message = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) case "cosmos.accounts.v1.MsgInit.funds": if x.Funds == nil { x.Funds = []*v1beta1.Coin{} @@ -317,6 +312,8 @@ func (x *fastReflection_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protor panic(fmt.Errorf("field sender of message cosmos.accounts.v1.MsgInit is not mutable")) case "cosmos.accounts.v1.MsgInit.account_type": panic(fmt.Errorf("field account_type of message cosmos.accounts.v1.MsgInit is not mutable")) + case "cosmos.accounts.v1.MsgInit.json_message": + panic(fmt.Errorf("field json_message of message cosmos.accounts.v1.MsgInit is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) @@ -334,9 +331,8 @@ func (x *fastReflection_MsgInit) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfString("") case "cosmos.accounts.v1.MsgInit.account_type": return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgInit.message": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.v1.MsgInit.json_message": + return protoreflect.ValueOfString("") case "cosmos.accounts.v1.MsgInit.funds": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_MsgInit_4_list{list: &list}) @@ -417,8 +413,8 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Message != nil { - l = options.Size(x.Message) + l = len(x.JsonMessage) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Funds) > 0 { @@ -472,17 +468,10 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x22 } } - if x.Message != nil { - encoded, err := options.Marshal(x.Message) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + if len(x.JsonMessage) > 0 { + i -= len(x.JsonMessage) + copy(dAtA[i:], x.JsonMessage) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.JsonMessage))) i-- dAtA[i] = 0x1a } @@ -615,9 +604,9 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JsonMessage", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -627,27 +616,23 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Message == nil { - x.Message = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.JsonMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1217,63 +1202,64 @@ func (x *fastReflection_MsgInitResponse) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_MsgExecute_4_list)(nil) +var _ protoreflect.List = (*_MsgExecute_5_list)(nil) -type _MsgExecute_4_list struct { +type _MsgExecute_5_list struct { list *[]*v1beta1.Coin } -func (x *_MsgExecute_4_list) Len() int { +func (x *_MsgExecute_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgExecute_4_list) Get(i int) protoreflect.Value { +func (x *_MsgExecute_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgExecute_4_list) Set(i int, value protoreflect.Value) { +func (x *_MsgExecute_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_MsgExecute_4_list) Append(value protoreflect.Value) { +func (x *_MsgExecute_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_MsgExecute_4_list) AppendMutable() protoreflect.Value { +func (x *_MsgExecute_5_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgExecute_4_list) Truncate(n int) { +func (x *_MsgExecute_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgExecute_4_list) NewElement() protoreflect.Value { +func (x *_MsgExecute_5_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgExecute_4_list) IsValid() bool { +func (x *_MsgExecute_5_list) IsValid() bool { return x.list != nil } var ( - md_MsgExecute protoreflect.MessageDescriptor - fd_MsgExecute_sender protoreflect.FieldDescriptor - fd_MsgExecute_target protoreflect.FieldDescriptor - fd_MsgExecute_message protoreflect.FieldDescriptor - fd_MsgExecute_funds protoreflect.FieldDescriptor + md_MsgExecute protoreflect.MessageDescriptor + fd_MsgExecute_sender protoreflect.FieldDescriptor + fd_MsgExecute_target protoreflect.FieldDescriptor + fd_MsgExecute_execute_msg_type_url protoreflect.FieldDescriptor + fd_MsgExecute_json_message protoreflect.FieldDescriptor + fd_MsgExecute_funds protoreflect.FieldDescriptor ) func init() { @@ -1281,7 +1267,8 @@ func init() { md_MsgExecute = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecute") fd_MsgExecute_sender = md_MsgExecute.Fields().ByName("sender") fd_MsgExecute_target = md_MsgExecute.Fields().ByName("target") - fd_MsgExecute_message = md_MsgExecute.Fields().ByName("message") + fd_MsgExecute_execute_msg_type_url = md_MsgExecute.Fields().ByName("execute_msg_type_url") + fd_MsgExecute_json_message = md_MsgExecute.Fields().ByName("json_message") fd_MsgExecute_funds = md_MsgExecute.Fields().ByName("funds") } @@ -1362,14 +1349,20 @@ func (x *fastReflection_MsgExecute) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.Message != nil { - value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - if !f(fd_MsgExecute_message, value) { + if x.ExecuteMsgTypeUrl != "" { + value := protoreflect.ValueOfString(x.ExecuteMsgTypeUrl) + if !f(fd_MsgExecute_execute_msg_type_url, value) { + return + } + } + if x.JsonMessage != "" { + value := protoreflect.ValueOfString(x.JsonMessage) + if !f(fd_MsgExecute_json_message, value) { return } } if len(x.Funds) != 0 { - value := protoreflect.ValueOfList(&_MsgExecute_4_list{list: &x.Funds}) + value := protoreflect.ValueOfList(&_MsgExecute_5_list{list: &x.Funds}) if !f(fd_MsgExecute_funds, value) { return } @@ -1393,8 +1386,10 @@ func (x *fastReflection_MsgExecute) Has(fd protoreflect.FieldDescriptor) bool { return x.Sender != "" case "cosmos.accounts.v1.MsgExecute.target": return x.Target != "" - case "cosmos.accounts.v1.MsgExecute.message": - return x.Message != nil + case "cosmos.accounts.v1.MsgExecute.execute_msg_type_url": + return x.ExecuteMsgTypeUrl != "" + case "cosmos.accounts.v1.MsgExecute.json_message": + return x.JsonMessage != "" case "cosmos.accounts.v1.MsgExecute.funds": return len(x.Funds) != 0 default: @@ -1417,8 +1412,10 @@ func (x *fastReflection_MsgExecute) Clear(fd protoreflect.FieldDescriptor) { x.Sender = "" case "cosmos.accounts.v1.MsgExecute.target": x.Target = "" - case "cosmos.accounts.v1.MsgExecute.message": - x.Message = nil + case "cosmos.accounts.v1.MsgExecute.execute_msg_type_url": + x.ExecuteMsgTypeUrl = "" + case "cosmos.accounts.v1.MsgExecute.json_message": + x.JsonMessage = "" case "cosmos.accounts.v1.MsgExecute.funds": x.Funds = nil default: @@ -1443,14 +1440,17 @@ func (x *fastReflection_MsgExecute) Get(descriptor protoreflect.FieldDescriptor) case "cosmos.accounts.v1.MsgExecute.target": value := x.Target return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgExecute.message": - value := x.Message - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.v1.MsgExecute.execute_msg_type_url": + value := x.ExecuteMsgTypeUrl + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgExecute.json_message": + value := x.JsonMessage + return protoreflect.ValueOfString(value) case "cosmos.accounts.v1.MsgExecute.funds": if len(x.Funds) == 0 { - return protoreflect.ValueOfList(&_MsgExecute_4_list{}) + return protoreflect.ValueOfList(&_MsgExecute_5_list{}) } - listValue := &_MsgExecute_4_list{list: &x.Funds} + listValue := &_MsgExecute_5_list{list: &x.Funds} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -1476,11 +1476,13 @@ func (x *fastReflection_MsgExecute) Set(fd protoreflect.FieldDescriptor, value p x.Sender = value.Interface().(string) case "cosmos.accounts.v1.MsgExecute.target": x.Target = value.Interface().(string) - case "cosmos.accounts.v1.MsgExecute.message": - x.Message = value.Message().Interface().(*anypb.Any) + case "cosmos.accounts.v1.MsgExecute.execute_msg_type_url": + x.ExecuteMsgTypeUrl = value.Interface().(string) + case "cosmos.accounts.v1.MsgExecute.json_message": + x.JsonMessage = value.Interface().(string) case "cosmos.accounts.v1.MsgExecute.funds": lv := value.List() - clv := lv.(*_MsgExecute_4_list) + clv := lv.(*_MsgExecute_5_list) x.Funds = *clv.list default: if fd.IsExtension() { @@ -1502,21 +1504,20 @@ func (x *fastReflection_MsgExecute) Set(fd protoreflect.FieldDescriptor, value p // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgExecute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecute.message": - if x.Message == nil { - x.Message = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) case "cosmos.accounts.v1.MsgExecute.funds": if x.Funds == nil { x.Funds = []*v1beta1.Coin{} } - value := &_MsgExecute_4_list{list: &x.Funds} + value := &_MsgExecute_5_list{list: &x.Funds} return protoreflect.ValueOfList(value) case "cosmos.accounts.v1.MsgExecute.sender": panic(fmt.Errorf("field sender of message cosmos.accounts.v1.MsgExecute is not mutable")) case "cosmos.accounts.v1.MsgExecute.target": panic(fmt.Errorf("field target of message cosmos.accounts.v1.MsgExecute is not mutable")) + case "cosmos.accounts.v1.MsgExecute.execute_msg_type_url": + panic(fmt.Errorf("field execute_msg_type_url of message cosmos.accounts.v1.MsgExecute is not mutable")) + case "cosmos.accounts.v1.MsgExecute.json_message": + panic(fmt.Errorf("field json_message of message cosmos.accounts.v1.MsgExecute is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) @@ -1534,12 +1535,13 @@ func (x *fastReflection_MsgExecute) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfString("") case "cosmos.accounts.v1.MsgExecute.target": return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgExecute.message": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.v1.MsgExecute.execute_msg_type_url": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgExecute.json_message": + return protoreflect.ValueOfString("") case "cosmos.accounts.v1.MsgExecute.funds": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgExecute_4_list{list: &list}) + return protoreflect.ValueOfList(&_MsgExecute_5_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) @@ -1617,8 +1619,12 @@ func (x *fastReflection_MsgExecute) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Message != nil { - l = options.Size(x.Message) + l = len(x.ExecuteMsgTypeUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.JsonMessage) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Funds) > 0 { @@ -1669,20 +1675,20 @@ func (x *fastReflection_MsgExecute) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } } - if x.Message != nil { - encoded, err := options.Marshal(x.Message) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + if len(x.JsonMessage) > 0 { + i -= len(x.JsonMessage) + copy(dAtA[i:], x.JsonMessage) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.JsonMessage))) + i-- + dAtA[i] = 0x22 + } + if len(x.ExecuteMsgTypeUrl) > 0 { + i -= len(x.ExecuteMsgTypeUrl) + copy(dAtA[i:], x.ExecuteMsgTypeUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ExecuteMsgTypeUrl))) i-- dAtA[i] = 0x1a } @@ -1815,9 +1821,9 @@ func (x *fastReflection_MsgExecute) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecuteMsgTypeUrl", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1827,29 +1833,57 @@ func (x *fastReflection_MsgExecute) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Message == nil { - x.Message = &anypb.Any{} + x.ExecuteMsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JsonMessage", wireType) } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.JsonMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) } @@ -4255,7 +4289,7 @@ type MsgInit struct { // account_type is the type of the account to be created. AccountType string `protobuf:"bytes,2,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"` // message is the message to be sent to the account. - Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + JsonMessage string `protobuf:"bytes,3,opt,name=json_message,json=jsonMessage,proto3" json:"json_message,omitempty"` // funds contains the coins that the account wants to // send alongside the request. Funds []*v1beta1.Coin `protobuf:"bytes,4,rep,name=funds,proto3" json:"funds,omitempty"` @@ -4295,11 +4329,11 @@ func (x *MsgInit) GetAccountType() string { return "" } -func (x *MsgInit) GetMessage() *anypb.Any { +func (x *MsgInit) GetJsonMessage() string { if x != nil { - return x.Message + return x.JsonMessage } - return nil + return "" } func (x *MsgInit) GetFunds() []*v1beta1.Coin { @@ -4364,12 +4398,12 @@ type MsgExecute struct { // sender is the address of the sender of this message. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // target is the address of the account to be executed. - Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` - // message is the message to be sent to the account. - Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` // message is the message to be sent to the account. + ExecuteMsgTypeUrl string `protobuf:"bytes,3,opt,name=execute_msg_type_url,json=executeMsgTypeUrl,proto3" json:"execute_msg_type_url,omitempty"` + JsonMessage string `protobuf:"bytes,4,opt,name=json_message,json=jsonMessage,proto3" json:"json_message,omitempty"` // funds contains the coins that the account wants to // send alongside the request. - Funds []*v1beta1.Coin `protobuf:"bytes,4,rep,name=funds,proto3" json:"funds,omitempty"` + Funds []*v1beta1.Coin `protobuf:"bytes,5,rep,name=funds,proto3" json:"funds,omitempty"` } func (x *MsgExecute) Reset() { @@ -4406,11 +4440,18 @@ func (x *MsgExecute) GetTarget() string { return "" } -func (x *MsgExecute) GetMessage() *anypb.Any { +func (x *MsgExecute) GetExecuteMsgTypeUrl() string { if x != nil { - return x.Message + return x.ExecuteMsgTypeUrl } - return nil + return "" +} + +func (x *MsgExecute) GetJsonMessage() string { + if x != nil { + return x.JsonMessage + } + return "" } func (x *MsgExecute) GetFunds() []*v1beta1.Coin { @@ -4645,109 +4686,111 @@ var file_cosmos_accounts_v1_tx_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x61, 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, + 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x22, 0x6c, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, - 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, - 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x6c, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x80, 0x02, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, + 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, + 0x21, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x61, 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, + 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0x46, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x4d, 0x73, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x22, 0xe1, 0x02, 0x0a, 0x11, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, + 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, + 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, + 0x50, 0x0a, 0x19, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x17, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, + 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, + 0x45, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdc, 0x01, 0x0a, - 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, 0x0a, 0x05, 0x66, - 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x3a, 0x0b, - 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x46, 0x0a, 0x12, 0x4d, - 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x03, - 0x74, 0x78, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x22, 0xe1, 0x02, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x54, 0x78, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, - 0x37, 0x0a, 0x18, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x15, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x19, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x17, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5f, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x32, 0x8e, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, - 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbb, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x6e, 0x79, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5f, 0x0a, 0x18, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x32, 0x8e, 0x02, + 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, - 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbb, + 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4771,30 +4814,28 @@ var file_cosmos_accounts_v1_tx_proto_goTypes = []interface{}{ (*MsgExecuteBundle)(nil), // 4: cosmos.accounts.v1.MsgExecuteBundle (*BundledTxResponse)(nil), // 5: cosmos.accounts.v1.BundledTxResponse (*MsgExecuteBundleResponse)(nil), // 6: cosmos.accounts.v1.MsgExecuteBundleResponse - (*anypb.Any)(nil), // 7: google.protobuf.Any - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 8: google.protobuf.Any } var file_cosmos_accounts_v1_tx_proto_depIdxs = []int32{ - 7, // 0: cosmos.accounts.v1.MsgInit.message:type_name -> google.protobuf.Any - 8, // 1: cosmos.accounts.v1.MsgInit.funds:type_name -> cosmos.base.v1beta1.Coin - 7, // 2: cosmos.accounts.v1.MsgInitResponse.response:type_name -> google.protobuf.Any - 7, // 3: cosmos.accounts.v1.MsgExecute.message:type_name -> google.protobuf.Any - 8, // 4: cosmos.accounts.v1.MsgExecute.funds:type_name -> cosmos.base.v1beta1.Coin - 7, // 5: cosmos.accounts.v1.MsgExecuteResponse.response:type_name -> google.protobuf.Any - 7, // 6: cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses:type_name -> google.protobuf.Any - 7, // 7: cosmos.accounts.v1.BundledTxResponse.execution_responses:type_name -> google.protobuf.Any - 5, // 8: cosmos.accounts.v1.MsgExecuteBundleResponse.responses:type_name -> cosmos.accounts.v1.BundledTxResponse - 0, // 9: cosmos.accounts.v1.Msg.Init:input_type -> cosmos.accounts.v1.MsgInit - 2, // 10: cosmos.accounts.v1.Msg.Execute:input_type -> cosmos.accounts.v1.MsgExecute - 4, // 11: cosmos.accounts.v1.Msg.ExecuteBundle:input_type -> cosmos.accounts.v1.MsgExecuteBundle - 1, // 12: cosmos.accounts.v1.Msg.Init:output_type -> cosmos.accounts.v1.MsgInitResponse - 3, // 13: cosmos.accounts.v1.Msg.Execute:output_type -> cosmos.accounts.v1.MsgExecuteResponse - 6, // 14: cosmos.accounts.v1.Msg.ExecuteBundle:output_type -> cosmos.accounts.v1.MsgExecuteBundleResponse - 12, // [12:15] is the sub-list for method output_type - 9, // [9:12] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 7, // 0: cosmos.accounts.v1.MsgInit.funds:type_name -> cosmos.base.v1beta1.Coin + 8, // 1: cosmos.accounts.v1.MsgInitResponse.response:type_name -> google.protobuf.Any + 7, // 2: cosmos.accounts.v1.MsgExecute.funds:type_name -> cosmos.base.v1beta1.Coin + 8, // 3: cosmos.accounts.v1.MsgExecuteResponse.response:type_name -> google.protobuf.Any + 8, // 4: cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses:type_name -> google.protobuf.Any + 8, // 5: cosmos.accounts.v1.BundledTxResponse.execution_responses:type_name -> google.protobuf.Any + 5, // 6: cosmos.accounts.v1.MsgExecuteBundleResponse.responses:type_name -> cosmos.accounts.v1.BundledTxResponse + 0, // 7: cosmos.accounts.v1.Msg.Init:input_type -> cosmos.accounts.v1.MsgInit + 2, // 8: cosmos.accounts.v1.Msg.Execute:input_type -> cosmos.accounts.v1.MsgExecute + 4, // 9: cosmos.accounts.v1.Msg.ExecuteBundle:input_type -> cosmos.accounts.v1.MsgExecuteBundle + 1, // 10: cosmos.accounts.v1.Msg.Init:output_type -> cosmos.accounts.v1.MsgInitResponse + 3, // 11: cosmos.accounts.v1.Msg.Execute:output_type -> cosmos.accounts.v1.MsgExecuteResponse + 6, // 12: cosmos.accounts.v1.Msg.ExecuteBundle:output_type -> cosmos.accounts.v1.MsgExecuteBundleResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cosmos_accounts_v1_tx_proto_init() } diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 927b0eafe9e1..88b0d5a48927 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -173,7 +173,7 @@ func (pubKey *PubKey) Address() crypto.Address { } sha := sha256.Sum256(pubKey.Key) - hasherRIPEMD160 := ripemd160.New() //nolint:gosec // keep around for backwards compatibility + hasherRIPEMD160 := ripemd160.New() hasherRIPEMD160.Write(sha[:]) // does not error return crypto.Address(hasherRIPEMD160.Sum(nil)) } diff --git a/simsx/registry.go b/simsx/registry.go index 6aee009f379d..f4fe15f26039 100644 --- a/simsx/registry.go +++ b/simsx/registry.go @@ -3,13 +3,14 @@ package simsx import ( "cmp" "context" - "iter" "maps" "math/rand" "slices" "strings" "time" + "iter" + "cosmossdk.io/core/address" "cosmossdk.io/core/log" diff --git a/tests/integration/accounts/multisig/account_test.go b/tests/integration/accounts/multisig/account_test.go index 8e03674ec480..9f62766117e5 100644 --- a/tests/integration/accounts/multisig/account_test.go +++ b/tests/integration/accounts/multisig/account_test.go @@ -1,6 +1,8 @@ package multisig import ( + "encoding/json" + "strings" "testing" "time" @@ -141,12 +143,19 @@ func (s *IntegrationTestSuite) TestConfigUpdate() { EarlyExecution: false, }, } + anyUpdateMsg := codectypes.UnsafePackAny(updateMsg) + + split := strings.Split(anyUpdateMsg.TypeUrl, "/") + nameTypeUrl := split[len(split)-1] + jsonReq, err := json.Marshal(updateMsg) + s.NoError(err) msgExec := &accountsv1.MsgExecute{ - Sender: accAddrStr, - Target: accAddrStr, - Message: codectypes.UnsafePackAny(updateMsg), - Funds: []sdk.Coin{}, + Sender: accAddrStr, + Target: accAddrStr, + ExecuteMsgTypeUrl: nameTypeUrl, + JsonMessage: string(jsonReq), + Funds: []sdk.Coin{}, } s.createProposal(ctx, accountAddr, s.members[0], codectypes.UnsafePackAny(msgExec)) @@ -157,7 +166,7 @@ func (s *IntegrationTestSuite) TestConfigUpdate() { Vote: v1.VoteOption_VOTE_OPTION_YES, } - err := s.executeTx(ctx, voteReq, accountAddr, s.members[0]) + err = s.executeTx(ctx, voteReq, accountAddr, s.members[0]) s.NoError(err) err = s.executeProposal(ctx, accountAddr, s.members[0], 0) @@ -172,25 +181,34 @@ func (s *IntegrationTestSuite) TestConfigUpdate() { // Try to remove a member, but it doesn't reach passing threshold // create proposal - msgExec = &accountsv1.MsgExecute{ - Sender: accAddrStr, - Target: accAddrStr, - Message: codectypes.UnsafePackAny(&v1.MsgUpdateConfig{ - UpdateMembers: []*v1.Member{ - { - Address: s.membersAddr[1], - Weight: 0, - }, - }, - Config: &v1.Config{ - Threshold: 200, // 3 members with 100 power each, 2/3 majority - Quorum: 200, - VotingPeriod: 120, - Revote: false, - EarlyExecution: false, + msgUpdate := &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: s.membersAddr[1], + Weight: 0, }, - }), - Funds: []sdk.Coin{}, + }, + Config: &v1.Config{ + Threshold: 200, // 3 members with 100 power each, 2/3 majority + Quorum: 200, + VotingPeriod: 120, + Revote: false, + EarlyExecution: false, + }, + } + anyMsgUpdate := codectypes.UnsafePackAny(msgUpdate) + + split = strings.Split(anyMsgUpdate.TypeUrl, "/") + nameTypeUrl = split[len(split)-1] + jsonReq, err = json.Marshal(msgUpdate) + s.NoError(err) + + msgExec = &accountsv1.MsgExecute{ + Sender: accAddrStr, + Target: accAddrStr, + ExecuteMsgTypeUrl: nameTypeUrl, + JsonMessage: string(jsonReq), + Funds: []sdk.Coin{}, } s.createProposal(ctx, accountAddr, s.members[0], codectypes.UnsafePackAny(msgExec)) diff --git a/x/accounts/autocli.go b/x/accounts/autocli.go new file mode 100644 index 000000000000..82e05d14e58b --- /dev/null +++ b/x/accounts/autocli.go @@ -0,0 +1,62 @@ +package accounts + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/version" + + accountsv1 "cosmossdk.io/api/cosmos/accounts/v1" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: accountsv1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "AccountQuery", + Use: "query ", + Short: "Query account state", + Example: fmt.Sprintf(`%s q accounts query cosmos1uds6tz96dxfllz7tz3s3tm8tlg6x95g0mc2987sx6psjz98qlpss89sheu cosmos.accounts.defaults.multisig.v1.QueryProposal '{"proposal_id":1}`, version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "target"}, + {ProtoField: "query_request_type_url"}, + {ProtoField: "json_message"}, + }, + }, + }, + EnhanceCustomCommand: true, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: accountsv1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Init", + Use: "init ", + Short: "Initialize a new account", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "sender"}, + {ProtoField: "account_type"}, + {ProtoField: "json_message"}, + {ProtoField: "funds", Varargs: true}, + }, + }, + { + RpcMethod: "Execute", + Use: "execute ", + Short: "Execute state transition to account", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "sender"}, + {ProtoField: "target"}, + {ProtoField: "execute_msg_type_url"}, + {ProtoField: "json_message"}, + {ProtoField: "funds", Varargs: true}, + }, + }, + }, + EnhanceCustomCommand: true, + }, + } +} diff --git a/x/accounts/cli/cli.go b/x/accounts/cli/cli.go deleted file mode 100644 index e1458acbb045..000000000000 --- a/x/accounts/cli/cli.go +++ /dev/null @@ -1,205 +0,0 @@ -package cli - -import ( - "bytes" - "fmt" - "reflect" - - "github.com/cosmos/gogoproto/jsonpb" - gogoproto "github.com/cosmos/gogoproto/proto" - "github.com/spf13/cobra" - - v1 "cosmossdk.io/x/accounts/v1" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -func TxCmd(name string) *cobra.Command { - cmd := &cobra.Command{ - Use: name, - Short: "Transactions command for the " + name + " module", - RunE: client.ValidateCmd, - DisableFlagParsing: true, - } - cmd.AddCommand(GetTxInitCmd(), GetExecuteCmd()) - return cmd -} - -func QueryCmd(name string) *cobra.Command { - cmd := &cobra.Command{ - Use: name, - Short: "Query command for the " + name + " module", - RunE: client.ValidateCmd, - DisableFlagParsing: true, - } - cmd.AddCommand(GetQueryAccountCmd()) - return cmd -} - -func GetTxInitCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "init ", - Short: "Initialize a new account", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - sender, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) - if err != nil { - return err - } - - // we need to convert the message from json to a protobuf message - // to know which message to use, we need to know the account type - // init message schema. - accClient := v1.NewQueryClient(clientCtx) - schema, err := accClient.Schema(cmd.Context(), &v1.SchemaRequest{ - AccountType: args[0], - }) - if err != nil { - return err - } - - msgBytes, err := encodeJSONToProto(schema.InitSchema.Request, args[1]) - if err != nil { - return err - } - msg := v1.MsgInit{ - Sender: sender, - AccountType: args[0], - Message: msgBytes, - } - - isGenesis, err := cmd.Flags().GetBool("genesis") - if err != nil { - return err - } - - // in case the genesis flag is provided then the init message is printed. - if isGenesis { - return clientCtx.WithOutputFormat(flags.OutputFormatJSON).PrintProto(&msg) - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) - }, - } - cmd.Flags().Bool("genesis", false, "if true will print the json init message for genesis") - flags.AddTxFlagsToCmd(cmd) - return cmd -} - -func GetExecuteCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "execute ", - Short: "Execute state transition to account", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - sender, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) - if err != nil { - return err - } - - schema, err := getSchemaForAccount(clientCtx, args[0]) - if err != nil { - return err - } - - msgBytes, err := handlerMsgBytes(schema.ExecuteHandlers, args[1], args[2]) - if err != nil { - return err - } - msg := v1.MsgExecute{ - Sender: sender, - Target: args[0], - Message: msgBytes, - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) - }, - } - flags.AddTxFlagsToCmd(cmd) - return cmd -} - -func GetQueryAccountCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "query ", - Short: "Query account state", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - schema, err := getSchemaForAccount(clientCtx, args[0]) - if err != nil { - return err - } - msgBytes, err := handlerMsgBytes(schema.QueryHandlers, args[1], args[2]) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - res, err := queryClient.AccountQuery(cmd.Context(), &v1.AccountQueryRequest{ - Target: args[0], - Request: msgBytes, - }) - if err != nil { - return err - } - return clientCtx.PrintProto(res) - }, - } - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -func getSchemaForAccount(clientCtx client.Context, addr string) (*v1.SchemaResponse, error) { - queryClient := v1.NewQueryClient(clientCtx) - accType, err := queryClient.AccountType(clientCtx.CmdContext, &v1.AccountTypeRequest{ - Address: addr, - }) - if err != nil { - return nil, err - } - return queryClient.Schema(clientCtx.CmdContext, &v1.SchemaRequest{ - AccountType: accType.AccountType, - }) -} - -func handlerMsgBytes(handlersSchema []*v1.SchemaResponse_Handler, msgTypeURL, msgString string) (*codectypes.Any, error) { - var msgSchema *v1.SchemaResponse_Handler - for _, handler := range handlersSchema { - if handler.Request == msgTypeURL { - msgSchema = handler - break - } - } - if msgSchema == nil { - return nil, fmt.Errorf("handler for message type %s not found", msgTypeURL) - } - return encodeJSONToProto(msgSchema.Request, msgString) -} - -func encodeJSONToProto(name, jsonMsg string) (*codectypes.Any, error) { - impl := gogoproto.MessageType(name) - if impl == nil { - return nil, fmt.Errorf("message type %s not found", name) - } - msg := reflect.New(impl.Elem()).Interface().(gogoproto.Message) - err := jsonpb.Unmarshal(bytes.NewBufferString(jsonMsg), msg) - if err != nil { - return nil, fmt.Errorf("provided message is not valid %s: %w", jsonMsg, err) - } - return codectypes.NewAnyWithValue(msg) -} diff --git a/x/accounts/cli/cli_test.go b/x/accounts/cli/cli_test.go deleted file mode 100644 index 5e9c188d1d68..000000000000 --- a/x/accounts/cli/cli_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package cli_test - -import ( - "context" - "fmt" - "io" - "testing" - - "github.com/gogo/protobuf/types" - "github.com/stretchr/testify/suite" - - "cosmossdk.io/math" - "cosmossdk.io/x/accounts/cli" - v1 "cosmossdk.io/x/accounts/v1" - "cosmossdk.io/x/bank" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - addresscodec "github.com/cosmos/cosmos-sdk/codec/address" - codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - sdk "github.com/cosmos/cosmos-sdk/types" - testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" -) - -type CLITestSuite struct { - suite.Suite - - kr keyring.Keyring - encCfg testutilmod.TestEncodingConfig - baseCtx client.Context - clientCtx client.Context -} - -func TestCLITestSuite(t *testing.T) { - suite.Run(t, new(CLITestSuite)) -} - -func (s *CLITestSuite) SetupSuite() { - s.encCfg = testutilmod.MakeTestEncodingConfig(codectestutil.CodecOptions{}, bank.AppModule{}) - s.kr = keyring.NewInMemory(s.encCfg.Codec) - - s.baseCtx = client.Context{}. - WithKeyring(s.kr). - WithTxConfig(s.encCfg.TxConfig). - WithCodec(s.encCfg.Codec). - WithAccountRetriever(client.MockAccountRetriever{}). - WithOutput(io.Discard). - WithAddressCodec(addresscodec.NewBech32Codec("cosmos")). - WithValidatorAddressCodec(addresscodec.NewBech32Codec("cosmosvaloper")). - WithConsensusAddressCodec(addresscodec.NewBech32Codec("cosmosvalcons")) -} - -func (s *CLITestSuite) TestTxInitCmd() { - accounts := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) - accountStr := make([]string, len(accounts)) - for i, acc := range accounts { - addrStr, err := s.baseCtx.AddressCodec.BytesToString(acc.Address) - s.Require().NoError(err) - accountStr[i] = addrStr - } - - s.baseCtx = s.baseCtx.WithFromAddress(accounts[0].Address) - - extraArgs := []string{ - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("photon", math.NewInt(10))).String()), - fmt.Sprintf("--%s=test-chain", flags.FlagChainID), - fmt.Sprintf("--%s=%s", flags.FlagFrom, accountStr[0]), - } - - cmd := cli.GetTxInitCmd() - cmd.SetOutput(io.Discard) - - ctxGen := func() client.Context { - bz, _ := s.encCfg.Codec.Marshal(&v1.SchemaResponse{ - InitSchema: &v1.SchemaResponse_Handler{ - Request: sdk.MsgTypeURL(&types.Empty{})[1:], - Response: sdk.MsgTypeURL(&types.Empty{})[1:], - }, - }) - c := clitestutil.NewMockCometRPCWithResponseQueryValue(bz) - return s.baseCtx.WithClient(c) - } - s.clientCtx = ctxGen() - - testCases := []struct { - name string - accountType string - jsonMsg string - extraArgs []string - expectErrMsg string - }{ - { - name: "valid json msg", - accountType: "test", - jsonMsg: `{}`, - extraArgs: extraArgs, - expectErrMsg: "", - }, - { - name: "invalid json msg", - accountType: "test", - jsonMsg: `{"test": "jsonmsg"}`, - extraArgs: extraArgs, - expectErrMsg: "provided message is not valid", - }, - { - name: "invalid sender", - accountType: "test", - jsonMsg: `{}`, - extraArgs: append(extraArgs, fmt.Sprintf("--%s=%s", flags.FlagFrom, "bar")), - expectErrMsg: "failed to convert address field to address", - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - ctx := svrcmd.CreateExecuteContext(context.Background()) - - var args []string - args = append(args, tc.accountType) - args = append(args, tc.jsonMsg) - args = append(args, tc.extraArgs...) - - cmd.SetContext(ctx) - cmd.SetArgs(args) - - out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, args) - if tc.expectErrMsg != "" { - s.Require().Error(err) - s.Require().Contains(out.String(), tc.expectErrMsg) - } else { - s.Require().NoError(err) - msg := &sdk.TxResponse{} - s.Require().NoError(s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), msg), out.String()) - } - }) - } -} diff --git a/x/accounts/defaults/multisig/account_test.go b/x/accounts/defaults/multisig/account_test.go index a53b57f6884f..3ea08b90b7c0 100644 --- a/x/accounts/defaults/multisig/account_test.go +++ b/x/accounts/defaults/multisig/account_test.go @@ -2,7 +2,9 @@ package multisig import ( "context" + "encoding/json" "math" + "strings" "testing" "time" @@ -14,6 +16,14 @@ import ( "cosmossdk.io/x/accounts/accountstd" v1 "cosmossdk.io/x/accounts/defaults/multisig/v1" accountsv1 "cosmossdk.io/x/accounts/v1" + + "bytes" + "fmt" + "reflect" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/gogoproto/jsonpb" + gogoproto "github.com/cosmos/gogoproto/proto" ) func setup(t *testing.T, _ context.Context, ss store.KVStoreService, timefn func() time.Time) *Account { @@ -567,7 +577,8 @@ func TestProposalPassing(t *testing.T) { 0, []byte("multisig_acc"), []byte("addr1"), TestFunds, func(ictx context.Context, sender []byte, msg transaction.Msg) (transaction.Msg, error) { if execmsg, ok := msg.(*accountsv1.MsgExecute); ok { - updateCfg, err := accountstd.UnpackAny[v1.MsgUpdateConfig](execmsg.GetMessage()) + anyExecmsg, err := encodeJSONToProto(execmsg.ExecuteMsgTypeUrl, execmsg.JsonMessage) + updateCfg, err := accountstd.UnpackAny[v1.MsgUpdateConfig](anyExecmsg) if err != nil { return nil, err } @@ -600,11 +611,18 @@ func TestProposalPassing(t *testing.T) { anymsg, err := accountstd.PackAny(msg) require.NoError(t, err) + split := strings.Split(anymsg.TypeUrl, "/") + nameTypeUrl := split[len(split)-1] + + jsonReq, err := json.Marshal(msg) + require.NoError(t, err) + execMsg := &accountsv1.MsgExecute{ - Sender: "multisig_acc", - Target: "multisig_acc", - Message: anymsg, - Funds: nil, + Sender: "multisig_acc", + Target: "multisig_acc", + ExecuteMsgTypeUrl: nameTypeUrl, + JsonMessage: string(jsonReq), + Funds: nil, } execMsgAny, err := accountstd.PackAny(execMsg) require.NoError(t, err) @@ -710,3 +728,16 @@ func TestWeightOverflow(t *testing.T) { _, err = acc.Init(ctx, startAcc) require.ErrorContains(t, err, "overflow") } + +func encodeJSONToProto(name, jsonMsg string) (*codectypes.Any, error) { + impl := gogoproto.MessageType(name) + if impl == nil { + return nil, fmt.Errorf("message type %s not found", name) + } + msg := reflect.New(impl.Elem()).Interface().(gogoproto.Message) + err := jsonpb.Unmarshal(bytes.NewBufferString(jsonMsg), msg) + if err != nil { + return nil, fmt.Errorf("provided message is not valid %s: %w", jsonMsg, err) + } + return codectypes.NewAnyWithValue(msg) +} diff --git a/x/accounts/genesis_test.go b/x/accounts/genesis_test.go index 14c2470d84bd..530d3d697a6d 100644 --- a/x/accounts/genesis_test.go +++ b/x/accounts/genesis_test.go @@ -40,12 +40,10 @@ func TestGenesis(t *testing.T) { return testAccountType, acc, err }) // add to state a genesis account init msg. - initMsg, err := implementation.PackAny(&types.Empty{}) - require.NoError(t, err) state.InitAccountMsgs = append(state.InitAccountMsgs, &v1.MsgInit{ Sender: "sender-2", AccountType: testAccountType, - Message: initMsg, + JsonMessage: `{}`, Funds: nil, }) err = k.ImportState(ctx, state) diff --git a/x/accounts/internal/implementation/encoding.go b/x/accounts/internal/implementation/encoding.go index 9b08d00bf862..e08763c44bcf 100644 --- a/x/accounts/internal/implementation/encoding.go +++ b/x/accounts/internal/implementation/encoding.go @@ -1,6 +1,7 @@ package implementation import ( + "bytes" "fmt" "reflect" "strings" @@ -10,6 +11,7 @@ import ( "cosmossdk.io/core/transaction" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/gogoproto/jsonpb" ) // ProtoMsgG is a generic interface for protobuf messages. @@ -65,3 +67,16 @@ func Merge(a, b transaction.Msg) { func Equal(a, b transaction.Msg) bool { return proto.Equal(a, b) } + +func EncodeMsgJSONToProto(name, jsonMsg string) (proto.Message, error) { + typ := proto.MessageType(name) + if typ == nil { + return nil, fmt.Errorf("message type %s not found", name) + } + msg := reflect.New(typ.Elem()).Interface().(proto.Message) + err := jsonpb.Unmarshal(bytes.NewBufferString(jsonMsg), msg) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal JSON to proto.Message: %w", err) + } + return msg, nil +} diff --git a/x/accounts/keeper.go b/x/accounts/keeper.go index cf306dab0e01..19825a636740 100644 --- a/x/accounts/keeper.go +++ b/x/accounts/keeper.go @@ -173,8 +173,14 @@ func (k Keeper) initFromMsg(ctx context.Context, initMsg *v1.MsgInit) (transacti return nil, nil, err } + impl, ok := k.accounts[initMsg.AccountType] + if !ok { + return nil, nil, err + } + schema := v1.MakeAccountSchema(impl) + // decode message bytes into the concrete boxed message type - msg, err := implementation.UnpackAnyRaw(initMsg.Message) + msg, err := implementation.EncodeMsgJSONToProto(schema.InitSchema.Request, initMsg.JsonMessage) if err != nil { return nil, nil, err } diff --git a/x/accounts/module.go b/x/accounts/module.go index daadebfe91ce..6af3e795f0f9 100644 --- a/x/accounts/module.go +++ b/x/accounts/module.go @@ -8,9 +8,7 @@ import ( "google.golang.org/grpc" "cosmossdk.io/core/appmodule" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/registry" - "cosmossdk.io/x/accounts/cli" v1 "cosmossdk.io/x/accounts/v1" "github.com/cosmos/cosmos-sdk/codec" @@ -62,25 +60,6 @@ func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { return nil } -// RegisterQueryHandlers registers the query handlers for the accounts module. -func (am AppModule) RegisterQueryHandlers(router appmodulev2.QueryRouter) { - queryServer := NewQueryServer(am.k) - - appmodulev2.RegisterMsgHandler(router, queryServer.AccountNumber) - appmodulev2.RegisterMsgHandler(router, queryServer.AccountQuery) - appmodulev2.RegisterMsgHandler(router, queryServer.AccountType) - appmodulev2.RegisterMsgHandler(router, queryServer.Schema) -} - -// RegisterMsgHandlers registers the message handlers for the accounts module. -func (am AppModule) RegisterMsgHandlers(router appmodulev2.MsgRouter) { - msgServer := NewMsgServer(am.k) - - appmodulev2.RegisterMsgHandler(router, msgServer.Execute) - appmodulev2.RegisterMsgHandler(router, msgServer.ExecuteBundle) - appmodulev2.RegisterMsgHandler(router, msgServer.Init) -} - // App module genesis func (am AppModule) DefaultGenesis() json.RawMessage { @@ -117,11 +96,11 @@ func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) } func (AppModule) GetTxCmd() *cobra.Command { - return cli.TxCmd(ModuleName) + return nil } func (AppModule) GetQueryCmd() *cobra.Command { - return cli.QueryCmd(ModuleName) + return nil } func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } diff --git a/x/accounts/msg_server.go b/x/accounts/msg_server.go index 2ee9a9334a95..cc635dd0053c 100644 --- a/x/accounts/msg_server.go +++ b/x/accounts/msg_server.go @@ -66,7 +66,7 @@ func (m msgServer) Execute(ctx context.Context, execute *v1.MsgExecute) (*v1.Msg } // decode message bytes into the concrete boxed message type - req, err := implementation.UnpackAnyRaw(execute.Message) + req, err := implementation.EncodeMsgJSONToProto(execute.ExecuteMsgTypeUrl, execute.JsonMessage) if err != nil { return nil, err } diff --git a/x/accounts/msg_server_test.go b/x/accounts/msg_server_test.go index 4a5c6fb87d2c..c68b99a1eecf 100644 --- a/x/accounts/msg_server_test.go +++ b/x/accounts/msg_server_test.go @@ -3,12 +3,9 @@ package accounts import ( "testing" + "cosmossdk.io/x/accounts/accountstd" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/types/known/emptypb" - "google.golang.org/protobuf/types/known/wrapperspb" - "cosmossdk.io/x/accounts/accountstd" - "cosmossdk.io/x/accounts/internal/implementation" v1 "cosmossdk.io/x/accounts/v1" ) @@ -17,28 +14,20 @@ func TestMsgServer(t *testing.T) { s := NewMsgServer(k) // create - initMsg, err := implementation.PackAny(&emptypb.Empty{}) - require.NoError(t, err) - initResp, err := s.Init(ctx, &v1.MsgInit{ Sender: "sender", AccountType: "test", - Message: initMsg, + JsonMessage: `{}`, }) require.NoError(t, err) require.NotNil(t, initResp) // execute - executeMsg := &wrapperspb.StringValue{ - Value: "10", - } - executeMsgAny, err := implementation.PackAny(executeMsg) - require.NoError(t, err) - execResp, err := s.Execute(ctx, &v1.MsgExecute{ - Sender: "sender", - Target: initResp.AccountAddress, - Message: executeMsgAny, + Sender: "sender", + Target: initResp.AccountAddress, + ExecuteMsgTypeUrl: "google.protobuf.UInt64Value", + JsonMessage: `10`, }) require.NoError(t, err) require.NotNil(t, execResp) diff --git a/x/accounts/proto/cosmos/accounts/v1/query.proto b/x/accounts/proto/cosmos/accounts/v1/query.proto index d59380f89c3b..04fe5a76a4f1 100644 --- a/x/accounts/proto/cosmos/accounts/v1/query.proto +++ b/x/accounts/proto/cosmos/accounts/v1/query.proto @@ -23,7 +23,9 @@ message AccountQueryRequest { // target defines the account to be queried. string target = 1; // request defines the query message being sent to the account. - google.protobuf.Any request = 2; + string query_request_type_url = 2; + + string json_message = 3; } // AccountQueryResponse is the response type for the Query/AccountQuery RPC method. diff --git a/x/accounts/proto/cosmos/accounts/v1/tx.proto b/x/accounts/proto/cosmos/accounts/v1/tx.proto index f9f746cace11..df1b21e8e804 100644 --- a/x/accounts/proto/cosmos/accounts/v1/tx.proto +++ b/x/accounts/proto/cosmos/accounts/v1/tx.proto @@ -34,7 +34,7 @@ message MsgInit { // account_type is the type of the account to be created. string account_type = 2; // message is the message to be sent to the account. - google.protobuf.Any message = 3; + string json_message = 3; // funds contains the coins that the account wants to // send alongside the request. repeated cosmos.base.v1beta1.Coin funds = 4 @@ -57,10 +57,13 @@ message MsgExecute { // target is the address of the account to be executed. string target = 2; // message is the message to be sent to the account. - google.protobuf.Any message = 3; + + string execute_msg_type_url = 3; + + string json_message = 4; // funds contains the coins that the account wants to // send alongside the request. - repeated cosmos.base.v1beta1.Coin funds = 4 + repeated cosmos.base.v1beta1.Coin funds = 5 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; } diff --git a/x/accounts/query_server.go b/x/accounts/query_server.go index 87d8e3deb38c..5c223e0091eb 100644 --- a/x/accounts/query_server.go +++ b/x/accounts/query_server.go @@ -34,7 +34,7 @@ func (q *queryServer) AccountQuery(ctx context.Context, request *v1.AccountQuery } // decode req into boxed concrete type - queryReq, err := implementation.UnpackAnyRaw(request.Request) + queryReq, err := implementation.EncodeMsgJSONToProto(request.QueryRequestTypeUrl, request.JsonMessage) if err != nil { return nil, err } diff --git a/x/accounts/query_server_test.go b/x/accounts/query_server_test.go index 9afa7e424b9d..38dfece18ed0 100644 --- a/x/accounts/query_server_test.go +++ b/x/accounts/query_server_test.go @@ -5,8 +5,7 @@ import ( "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/types/known/emptypb" - "google.golang.org/protobuf/types/known/wrapperspb" + // "google.golang.org/protobuf/types/known/emptypb" "cosmossdk.io/x/accounts/accountstd" "cosmossdk.io/x/accounts/internal/implementation" @@ -19,32 +18,28 @@ func TestQueryServer(t *testing.T) { ms := NewMsgServer(k) qs := NewQueryServer(k) - // create account - initMsg, err := implementation.PackAny(&emptypb.Empty{}) - require.NoError(t, err) - initResp, err := ms.Init(ctx, &v1.MsgInit{ Sender: "sender", AccountType: "test", - Message: initMsg, + JsonMessage: `{}`, }) require.NoError(t, err) t.Run("account query", func(t *testing.T) { - // query - req := &wrapperspb.UInt64Value{Value: 10} - anypbReq, err := implementation.PackAny(req) - require.NoError(t, err) - queryResp, err := qs.AccountQuery(ctx, &v1.AccountQueryRequest{ - Target: initResp.AccountAddress, - Request: anypbReq, + Target: initResp.AccountAddress, + QueryRequestTypeUrl: "google.protobuf.UInt64Value", + JsonMessage: `10`, }) require.NoError(t, err) resp, err := implementation.UnpackAnyRaw(queryResp.Response) require.NoError(t, err) - require.Equal(t, "10", resp.(*types.StringValue).Value) + require.NotNil(t, resp) + + stringResp, ok := resp.(*types.StringValue) + require.True(t, ok, "expected *types.StringValue, got %T", resp) + require.Equal(t, "10", stringResp.Value) }) t.Run("account number", func(t *testing.T) { diff --git a/x/accounts/v1/query.pb.go b/x/accounts/v1/query.pb.go index 8630d7937095..b9ac69f6998a 100644 --- a/x/accounts/v1/query.pb.go +++ b/x/accounts/v1/query.pb.go @@ -33,7 +33,8 @@ type AccountQueryRequest struct { // target defines the account to be queried. Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` // request defines the query message being sent to the account. - Request *any.Any `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` + QueryRequestTypeUrl string `protobuf:"bytes,2,opt,name=query_request_type_url,json=queryRequestTypeUrl,proto3" json:"query_request_type_url,omitempty"` + JsonMessage string `protobuf:"bytes,3,opt,name=json_message,json=jsonMessage,proto3" json:"json_message,omitempty"` } func (m *AccountQueryRequest) Reset() { *m = AccountQueryRequest{} } @@ -76,11 +77,18 @@ func (m *AccountQueryRequest) GetTarget() string { return "" } -func (m *AccountQueryRequest) GetRequest() *any.Any { +func (m *AccountQueryRequest) GetQueryRequestTypeUrl() string { if m != nil { - return m.Request + return m.QueryRequestTypeUrl } - return nil + return "" +} + +func (m *AccountQueryRequest) GetJsonMessage() string { + if m != nil { + return m.JsonMessage + } + return "" } // AccountQueryResponse is the response type for the Query/AccountQuery RPC method. @@ -496,39 +504,41 @@ func init() { func init() { proto.RegisterFile("cosmos/accounts/v1/query.proto", fileDescriptor_16ad14c22e3080d2) } var fileDescriptor_16ad14c22e3080d2 = []byte{ - // 497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xb5, 0x13, 0x48, 0x60, 0xd2, 0x14, 0x34, 0x94, 0xca, 0xf8, 0x60, 0xa5, 0x3e, 0xd0, 0xc0, - 0x61, 0xdd, 0x06, 0x0e, 0xdc, 0x50, 0x38, 0x55, 0x42, 0x42, 0x8a, 0x81, 0x0b, 0x12, 0x0a, 0x8e, - 0xb3, 0x4d, 0x23, 0x1a, 0x6f, 0xea, 0xb5, 0xab, 0xe6, 0x13, 0xb8, 0xf1, 0x59, 0x3d, 0xf6, 0xc8, - 0x11, 0x25, 0x3f, 0x82, 0xba, 0x3b, 0x9b, 0x38, 0x50, 0xe2, 0xf6, 0xe6, 0xd9, 0x79, 0xf3, 0xde, - 0xfa, 0xbd, 0xb1, 0xc1, 0x8b, 0x85, 0x9c, 0x08, 0x19, 0x44, 0x71, 0x2c, 0xf2, 0x24, 0x93, 0xc1, - 0xf9, 0x61, 0x70, 0x96, 0xf3, 0x74, 0xc6, 0xa6, 0xa9, 0xc8, 0x04, 0xa2, 0xee, 0x33, 0xd3, 0x67, - 0xe7, 0x87,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 0x6a, 0xea, - 0x2f, 0xf1, 0xea, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x75, 0x93, 0xfa, 0x0e, 0x05, 0x00, - 0x00, + // 531 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xb1, 0x72, 0xd3, 0x40, + 0x10, 0x95, 0x62, 0xb0, 0x61, 0x65, 0x07, 0xe6, 0x12, 0x3c, 0x42, 0x85, 0x26, 0x56, 0x41, 0x02, + 0xc5, 0x29, 0x71, 0x28, 0xe8, 0x18, 0x53, 0x65, 0x86, 0x81, 0x19, 0x0b, 0xd2, 0xd0, 0x08, 0x59, + 0xbe, 0x38, 0x06, 0x5b, 0x67, 0xdf, 0x49, 0x99, 0xf8, 0x03, 0x28, 0xe8, 0xf8, 0xac, 0x94, 0x29, + 0x29, 0x19, 0xfb, 0x47, 0x18, 0xdf, 0xad, 0x14, 0x19, 0x32, 0x76, 0xd2, 0x79, 0xf7, 0xde, 0xbe, + 0xdd, 0x7d, 0x6f, 0x2d, 0x70, 0x63, 0x2e, 0xc7, 0x5c, 0xfa, 0x51, 0x1c, 0xf3, 0x2c, 0x49, 0xa5, + 0x7f, 0x71, 0xe4, 0x4f, 0x33, 0x26, 0x66, 0x74, 0x22, 0x78, 0xca, 0x09, 0xd1, 0xef, 0x34, 0x7f, + 0xa7, 0x17, 0x47, 0xce, 0xf3, 0x01, 0xe7, 0x83, 0x11, 0xf3, 0x15, 0xa2, 0x97, 0x9d, 0xf9, 0x51, + 0x82, 0x70, 0xef, 0x87, 0x09, 0x3b, 0x1d, 0x0d, 0xed, 0x2e, 0x59, 0x02, 0x36, 0xcd, 0x98, 0x4c, + 0x49, 0x13, 0xaa, 0x69, 0x24, 0x06, 0x2c, 0xb5, 0xcd, 0x3d, 0xf3, 0xe0, 0x71, 0x80, 0x11, 0x39, + 0x86, 0xa6, 0xea, 0x16, 0x0a,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, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -748,15 +758,17 @@ func (m *AccountQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } + if len(m.JsonMessage) > 0 { + i -= len(m.JsonMessage) + copy(dAtA[i:], m.JsonMessage) + i = encodeVarintQuery(dAtA, i, uint64(len(m.JsonMessage))) + i-- + dAtA[i] = 0x1a + } + if len(m.QueryRequestTypeUrl) > 0 { + i -= len(m.QueryRequestTypeUrl) + copy(dAtA[i:], m.QueryRequestTypeUrl) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryRequestTypeUrl))) i-- dAtA[i] = 0x12 } @@ -1074,8 +1086,12 @@ func (m *AccountQueryRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.Request != nil { - l = m.Request.Size() + l = len(m.QueryRequestTypeUrl) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.JsonMessage) + if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n @@ -1269,9 +1285,9 @@ func (m *AccountQueryRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryRequestTypeUrl", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1281,27 +1297,55 @@ func (m *AccountQueryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Request == nil { - m.Request = &any.Any{} + m.QueryRequestTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonMessage", wireType) } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.JsonMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/accounts/v1/schema.go b/x/accounts/v1/schema.go index 6cebadb306f1..9c2ed14444a7 100644 --- a/x/accounts/v1/schema.go +++ b/x/accounts/v1/schema.go @@ -12,12 +12,12 @@ import ( func MakeAccountsSchemas(impls map[string]implementation.Implementation) map[string]*SchemaResponse { m := make(map[string]*SchemaResponse, len(impls)) for name, impl := range impls { - m[name] = makeAccountSchema(impl) + m[name] = MakeAccountSchema(impl) } return m } -func makeAccountSchema(impl implementation.Implementation) *SchemaResponse { +func MakeAccountSchema(impl implementation.Implementation) *SchemaResponse { return &SchemaResponse{ InitSchema: &SchemaResponse_Handler{ Request: impl.InitHandlerSchema.RequestSchema.Name, diff --git a/x/accounts/v1/tx.pb.go b/x/accounts/v1/tx.pb.go index 953167ab99a1..be1b7a1e22bf 100644 --- a/x/accounts/v1/tx.pb.go +++ b/x/accounts/v1/tx.pb.go @@ -40,7 +40,7 @@ type MsgInit struct { // account_type is the type of the account to be created. AccountType string `protobuf:"bytes,2,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"` // message is the message to be sent to the account. - Message *any.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + JsonMessage string `protobuf:"bytes,3,opt,name=json_message,json=jsonMessage,proto3" json:"json_message,omitempty"` // funds contains the coins that the account wants to // send alongside the request. Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` @@ -93,11 +93,11 @@ func (m *MsgInit) GetAccountType() string { return "" } -func (m *MsgInit) GetMessage() *any.Any { +func (m *MsgInit) GetJsonMessage() string { if m != nil { - return m.Message + return m.JsonMessage } - return nil + return "" } func (m *MsgInit) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins { @@ -167,12 +167,12 @@ type MsgExecute struct { // sender is the address of the sender of this message. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // target is the address of the account to be executed. - Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` - // message is the message to be sent to the account. - Message *any.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + ExecuteMsgTypeUrl string `protobuf:"bytes,3,opt,name=execute_msg_type_url,json=executeMsgTypeUrl,proto3" json:"execute_msg_type_url,omitempty"` + JsonMessage string `protobuf:"bytes,4,opt,name=json_message,json=jsonMessage,proto3" json:"json_message,omitempty"` // funds contains the coins that the account wants to // send alongside the request. - Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` + Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` } func (m *MsgExecute) Reset() { *m = MsgExecute{} } @@ -222,11 +222,18 @@ func (m *MsgExecute) GetTarget() string { return "" } -func (m *MsgExecute) GetMessage() *any.Any { +func (m *MsgExecute) GetExecuteMsgTypeUrl() string { if m != nil { - return m.Message + return m.ExecuteMsgTypeUrl } - return nil + return "" +} + +func (m *MsgExecute) GetJsonMessage() string { + if m != nil { + return m.JsonMessage + } + return "" } func (m *MsgExecute) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins { @@ -496,51 +503,53 @@ func init() { func init() { proto.RegisterFile("cosmos/accounts/v1/tx.proto", fileDescriptor_29c2b6d8a13d4189) } var fileDescriptor_29c2b6d8a13d4189 = []byte{ - // 690 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcb, 0x4e, 0xdb, 0x4c, - 0x14, 0x8e, 0x73, 0xfd, 0x39, 0xe1, 0x2f, 0x74, 0x4a, 0xc1, 0x18, 0xc9, 0xa4, 0xe9, 0x2d, 0x42, - 0xd4, 0x26, 0xb4, 0x6a, 0x25, 0x76, 0x80, 0xe8, 0x45, 0x2a, 0x12, 0x8d, 0xe8, 0xa6, 0x9b, 0xc8, - 0xb1, 0x07, 0x13, 0x41, 0x3c, 0x91, 0xcf, 0x18, 0x25, 0xbb, 0xaa, 0x0f, 0x50, 0xf5, 0x39, 0xba, - 0xe2, 0x31, 0x58, 0xb2, 0xec, 0xa2, 0xea, 0x05, 0x2a, 0xf1, 0x1a, 0x55, 0xc6, 0x33, 0x36, 0xe1, - 0x12, 0xb1, 0xec, 0x2a, 0x33, 0xf3, 0x9d, 0xf3, 0x9d, 0xf3, 0x7d, 0x27, 0x33, 0x86, 0x39, 0x97, - 0x61, 0x87, 0xa1, 0xed, 0xb8, 0x2e, 0x8b, 0x02, 0x8e, 0xf6, 0x41, 0xdd, 0xe6, 0x3d, 0xab, 0x1b, - 0x32, 0xce, 0x08, 0x89, 0x41, 0x4b, 0x81, 0xd6, 0x41, 0xdd, 0x98, 0x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ff, 0xf0, 0xb4, - 0x8a, 0x62, 0xbe, 0x4f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x15, 0x7e, 0x1c, 0x2a, 0x95, 0x06, - 0x00, 0x00, + // 724 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcb, 0x4e, 0xdb, 0x4c, + 0x14, 0x8e, 0x73, 0xe3, 0x67, 0xc2, 0xff, 0x03, 0xf3, 0xa7, 0x60, 0x8c, 0x64, 0x68, 0x7a, 0x8b, + 0x10, 0xb5, 0x09, 0xad, 0x5a, 0x89, 0x1d, 0x20, 0x7a, 0x91, 0x1a, 0x89, 0x46, 0xb0, 0xe9, 0xc6, + 0x72, 0xec, 0x61, 0x48, 0x89, 0x3d, 0x91, 0xcf, 0x18, 0x25, 0x3b, 0xd4, 0x07, 0xa8, 0xfa, 0x1c, + 0x5d, 0xf1, 0x18, 0x2c, 0xd9, 0xb5, 0xab, 0x5e, 0x60, 0xc1, 0x6b, 0x54, 0xf6, 0x8c, 0x6d, 0xc2, + 0x25, 0x62, 0xd5, 0x55, 0x66, 0xce, 0x77, 0xce, 0x77, 0xbe, 0xf3, 0x9d, 0xd8, 0x46, 0xf3, 0x0e, + 0x03, 0x8f, 0x81, 0x69, 0x3b, 0x0e, 0x0b, 0x7d, 0x0e, 0xe6, 0x61, 0xc3, 0xe4, 0x7d, 0xa3, 0x17, + 0x30, 0xce, 0x30, 0x16, 0xa0, 0x91, 0x80, 0xc6, 0x61, 0x43, 0x9b, 0xa3, 0x8c, 0xd1, 0x2e, 0x31, + 0xe3, 0x8c, 0x76, 0xb8, 0x67, 0xda, 0xfe, 0x40, 0xa4, 0x6b, 0xb3, 0x92, 0xcb, 0x03, 0x1a, 0xd1, + 0x78, 0x40, 0x25, 0xa0, 0x4b, 0xa0, 0x6d, 0x03, 0x31, 0x0f, 0x1b, 0x6d, 0xc2, 0xed, 0x86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1c, 0xef, 0xf7, 0xd9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x3b, 0x3d, 0xf4, + 0xac, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -738,15 +747,10 @@ func (m *MsgInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - if m.Message != nil { - { - size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } + if len(m.JsonMessage) > 0 { + i -= len(m.JsonMessage) + copy(dAtA[i:], m.JsonMessage) + i = encodeVarintTx(dAtA, i, uint64(len(m.JsonMessage))) i-- dAtA[i] = 0x1a } @@ -840,18 +844,20 @@ func (m *MsgExecute) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } } - if m.Message != nil { - { - size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } + if len(m.JsonMessage) > 0 { + i -= len(m.JsonMessage) + copy(dAtA[i:], m.JsonMessage) + i = encodeVarintTx(dAtA, i, uint64(len(m.JsonMessage))) + i-- + dAtA[i] = 0x22 + } + if len(m.ExecuteMsgTypeUrl) > 0 { + i -= len(m.ExecuteMsgTypeUrl) + copy(dAtA[i:], m.ExecuteMsgTypeUrl) + i = encodeVarintTx(dAtA, i, uint64(len(m.ExecuteMsgTypeUrl))) i-- dAtA[i] = 0x1a } @@ -1081,8 +1087,8 @@ func (m *MsgInit) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Message != nil { - l = m.Message.Size() + l = len(m.JsonMessage) + if l > 0 { n += 1 + l + sovTx(uint64(l)) } if len(m.Funds) > 0 { @@ -1125,8 +1131,12 @@ func (m *MsgExecute) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Message != nil { - l = m.Message.Size() + l = len(m.ExecuteMsgTypeUrl) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.JsonMessage) + if l > 0 { n += 1 + l + sovTx(uint64(l)) } if len(m.Funds) > 0 { @@ -1320,9 +1330,9 @@ func (m *MsgInit) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JsonMessage", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1332,27 +1342,23 @@ func (m *MsgInit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Message == nil { - m.Message = &any.Any{} - } - if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.JsonMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1622,9 +1628,9 @@ func (m *MsgExecute) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExecuteMsgTypeUrl", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1634,29 +1640,57 @@ func (m *MsgExecute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Message == nil { - m.Message = &any.Any{} + m.ExecuteMsgTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonMessage", wireType) } - if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JsonMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) }