From cc1d6b30a57e241978f3c69a0ddbd1146cd65211 Mon Sep 17 00:00:00 2001 From: Emilian Harastasan Date: Thu, 29 Sep 2022 21:27:16 +0300 Subject: [PATCH] feat: simulate with mode --- api/cosmos/tx/v1beta1/service.pulsar.go | 426 +++++++++++++++++------- proto/cosmos/tx/v1beta1/service.proto | 16 + types/tx/service.pb.go | 254 ++++++++++---- x/auth/tx/service.go | 8 + 4 files changed, 520 insertions(+), 184 deletions(-) diff --git a/api/cosmos/tx/v1beta1/service.pulsar.go b/api/cosmos/tx/v1beta1/service.pulsar.go index 8aa6936cb0c9..d4b640809a57 100644 --- a/api/cosmos/tx/v1beta1/service.pulsar.go +++ b/api/cosmos/tx/v1beta1/service.pulsar.go @@ -2387,6 +2387,7 @@ var ( md_SimulateRequest protoreflect.MessageDescriptor fd_SimulateRequest_tx protoreflect.FieldDescriptor fd_SimulateRequest_tx_bytes protoreflect.FieldDescriptor + fd_SimulateRequest_mode protoreflect.FieldDescriptor ) func init() { @@ -2394,6 +2395,7 @@ func init() { md_SimulateRequest = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("SimulateRequest") fd_SimulateRequest_tx = md_SimulateRequest.Fields().ByName("tx") fd_SimulateRequest_tx_bytes = md_SimulateRequest.Fields().ByName("tx_bytes") + fd_SimulateRequest_mode = md_SimulateRequest.Fields().ByName("mode") } var _ protoreflect.Message = (*fastReflection_SimulateRequest)(nil) @@ -2473,6 +2475,12 @@ func (x *fastReflection_SimulateRequest) Range(f func(protoreflect.FieldDescript return } } + if x.Mode != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Mode)) + if !f(fd_SimulateRequest_mode, value) { + return + } + } } // Has reports whether a field is populated. @@ -2492,6 +2500,8 @@ func (x *fastReflection_SimulateRequest) Has(fd protoreflect.FieldDescriptor) bo return x.Tx != nil case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": return len(x.TxBytes) != 0 + case "cosmos.tx.v1beta1.SimulateRequest.mode": + return x.Mode != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) @@ -2512,6 +2522,8 @@ func (x *fastReflection_SimulateRequest) Clear(fd protoreflect.FieldDescriptor) x.Tx = nil case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": x.TxBytes = nil + case "cosmos.tx.v1beta1.SimulateRequest.mode": + x.Mode = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) @@ -2534,6 +2546,9 @@ func (x *fastReflection_SimulateRequest) Get(descriptor protoreflect.FieldDescri case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": value := x.TxBytes return protoreflect.ValueOfBytes(value) + case "cosmos.tx.v1beta1.SimulateRequest.mode": + value := x.Mode + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) @@ -2558,6 +2573,8 @@ func (x *fastReflection_SimulateRequest) Set(fd protoreflect.FieldDescriptor, va x.Tx = value.Message().Interface().(*Tx) case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": x.TxBytes = value.Bytes() + case "cosmos.tx.v1beta1.SimulateRequest.mode": + x.Mode = (SimulateMode)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) @@ -2585,6 +2602,8 @@ func (x *fastReflection_SimulateRequest) Mutable(fd protoreflect.FieldDescriptor return protoreflect.ValueOfMessage(x.Tx.ProtoReflect()) case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": panic(fmt.Errorf("field tx_bytes of message cosmos.tx.v1beta1.SimulateRequest is not mutable")) + case "cosmos.tx.v1beta1.SimulateRequest.mode": + panic(fmt.Errorf("field mode of message cosmos.tx.v1beta1.SimulateRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) @@ -2603,6 +2622,8 @@ func (x *fastReflection_SimulateRequest) NewField(fd protoreflect.FieldDescripto return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.tx.v1beta1.SimulateRequest.tx_bytes": return protoreflect.ValueOfBytes(nil) + case "cosmos.tx.v1beta1.SimulateRequest.mode": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateRequest")) @@ -2680,6 +2701,9 @@ func (x *fastReflection_SimulateRequest) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.Mode != 0 { + n += 1 + runtime.Sov(uint64(x.Mode)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2709,6 +2733,11 @@ func (x *fastReflection_SimulateRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Mode != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Mode)) + i-- + dAtA[i] = 0x18 + } if len(x.TxBytes) > 0 { i -= len(x.TxBytes) copy(dAtA[i:], x.TxBytes) @@ -2849,6 +2878,25 @@ func (x *fastReflection_SimulateRequest) ProtoMethods() *protoiface.Methods { x.TxBytes = []byte{} } iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + x.Mode = 0 + 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++ + x.Mode |= SimulateMode(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2888,6 +2936,7 @@ var ( md_SimulateResponse protoreflect.MessageDescriptor fd_SimulateResponse_gas_info protoreflect.FieldDescriptor fd_SimulateResponse_result protoreflect.FieldDescriptor + fd_SimulateResponse_message protoreflect.FieldDescriptor ) func init() { @@ -2895,6 +2944,7 @@ func init() { md_SimulateResponse = File_cosmos_tx_v1beta1_service_proto.Messages().ByName("SimulateResponse") fd_SimulateResponse_gas_info = md_SimulateResponse.Fields().ByName("gas_info") fd_SimulateResponse_result = md_SimulateResponse.Fields().ByName("result") + fd_SimulateResponse_message = md_SimulateResponse.Fields().ByName("message") } var _ protoreflect.Message = (*fastReflection_SimulateResponse)(nil) @@ -2974,6 +3024,12 @@ func (x *fastReflection_SimulateResponse) Range(f func(protoreflect.FieldDescrip return } } + if x.Message != "" { + value := protoreflect.ValueOfString(x.Message) + if !f(fd_SimulateResponse_message, value) { + return + } + } } // Has reports whether a field is populated. @@ -2993,6 +3049,8 @@ func (x *fastReflection_SimulateResponse) Has(fd protoreflect.FieldDescriptor) b return x.GasInfo != nil case "cosmos.tx.v1beta1.SimulateResponse.result": return x.Result != nil + case "cosmos.tx.v1beta1.SimulateResponse.message": + return x.Message != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) @@ -3013,6 +3071,8 @@ func (x *fastReflection_SimulateResponse) Clear(fd protoreflect.FieldDescriptor) x.GasInfo = nil case "cosmos.tx.v1beta1.SimulateResponse.result": x.Result = nil + case "cosmos.tx.v1beta1.SimulateResponse.message": + x.Message = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) @@ -3035,6 +3095,9 @@ func (x *fastReflection_SimulateResponse) Get(descriptor protoreflect.FieldDescr case "cosmos.tx.v1beta1.SimulateResponse.result": value := x.Result return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.tx.v1beta1.SimulateResponse.message": + value := x.Message + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) @@ -3059,6 +3122,8 @@ func (x *fastReflection_SimulateResponse) Set(fd protoreflect.FieldDescriptor, v x.GasInfo = value.Message().Interface().(*v1beta11.GasInfo) case "cosmos.tx.v1beta1.SimulateResponse.result": x.Result = value.Message().Interface().(*v1beta11.Result) + case "cosmos.tx.v1beta1.SimulateResponse.message": + x.Message = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) @@ -3089,6 +3154,8 @@ func (x *fastReflection_SimulateResponse) Mutable(fd protoreflect.FieldDescripto x.Result = new(v1beta11.Result) } return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) + case "cosmos.tx.v1beta1.SimulateResponse.message": + panic(fmt.Errorf("field message of message cosmos.tx.v1beta1.SimulateResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) @@ -3108,6 +3175,8 @@ func (x *fastReflection_SimulateResponse) NewField(fd protoreflect.FieldDescript case "cosmos.tx.v1beta1.SimulateResponse.result": m := new(v1beta11.Result) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.tx.v1beta1.SimulateResponse.message": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.SimulateResponse")) @@ -3185,6 +3254,10 @@ func (x *fastReflection_SimulateResponse) ProtoMethods() *protoiface.Methods { l = options.Size(x.Result) n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Message) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3214,6 +3287,13 @@ func (x *fastReflection_SimulateResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Message) > 0 { + i -= len(x.Message) + copy(dAtA[i:], x.Message) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) + i-- + dAtA[i] = 0x1a + } if x.Result != nil { encoded, err := options.Marshal(x.Result) if err != nil { @@ -3363,6 +3443,38 @@ func (x *fastReflection_SimulateResponse) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } 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) + } + 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.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5674,6 +5786,57 @@ func (BroadcastMode) EnumDescriptor() ([]byte, []int) { return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{1} } +// SimulateMode specifies the mode for the TxService.Simulate RPC method. +type SimulateMode int32 + +const ( + // Default mode of simulate, which returns + // the result of the simulation or error + SimulateMode_WITH_RESULT SimulateMode = 0 + // Returns the gas used for the transaction + // even when an error is produced + SimulateMode_GAS_USED SimulateMode = 1 +) + +// Enum value maps for SimulateMode. +var ( + SimulateMode_name = map[int32]string{ + 0: "WITH_RESULT", + 1: "GAS_USED", + } + SimulateMode_value = map[string]int32{ + "WITH_RESULT": 0, + "GAS_USED": 1, + } +) + +func (x SimulateMode) Enum() *SimulateMode { + p := new(SimulateMode) + *p = x + return p +} + +func (x SimulateMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SimulateMode) Descriptor() protoreflect.EnumDescriptor { + return file_cosmos_tx_v1beta1_service_proto_enumTypes[2].Descriptor() +} + +func (SimulateMode) Type() protoreflect.EnumType { + return &file_cosmos_tx_v1beta1_service_proto_enumTypes[2] +} + +func (x SimulateMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SimulateMode.Descriptor instead. +func (SimulateMode) EnumDescriptor() ([]byte, []int) { + return file_cosmos_tx_v1beta1_service_proto_rawDescGZIP(), []int{2} +} + // GetTxsEventRequest is the request type for the Service.TxsByEvents // RPC method. type GetTxsEventRequest struct { @@ -5921,6 +6084,8 @@ type SimulateRequest struct { // // Since: cosmos-sdk 0.43 TxBytes []byte `protobuf:"bytes,2,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` + // Since cosmos-sdk: 0.46 + Mode SimulateMode `protobuf:"varint,3,opt,name=mode,proto3,enum=cosmos.tx.v1beta1.SimulateMode" json:"mode,omitempty"` } func (x *SimulateRequest) Reset() { @@ -5958,6 +6123,13 @@ func (x *SimulateRequest) GetTxBytes() []byte { return nil } +func (x *SimulateRequest) GetMode() SimulateMode { + if x != nil { + return x.Mode + } + return SimulateMode_WITH_RESULT +} + // SimulateResponse is the response type for the // Service.SimulateRPC method. type SimulateResponse struct { @@ -5968,7 +6140,8 @@ type SimulateResponse struct { // gas_info is the information about gas used in the simulation. GasInfo *v1beta11.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` // result is the result of the simulation. - Result *v1beta11.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Result *v1beta11.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` } func (x *SimulateResponse) Reset() { @@ -6005,6 +6178,13 @@ func (x *SimulateResponse) GetResult() *v1beta11.Result { return nil } +func (x *SimulateResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + // GetTxRequest is the request type for the Service.GetTx // RPC method. type GetTxRequest struct { @@ -6261,21 +6441,26 @@ var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x74, - 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x0a, 0x0f, 0x53, 0x69, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x02, - 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x02, 0x74, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x67, 0x61, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x53, 0x69, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, + 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x02, 0x74, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, + 0x08, 0x67, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x61, 0x73, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x07, 0x67, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, @@ -6321,61 +6506,64 @@ var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{ 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x32, 0x92, 0x05, 0x0a, - 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x08, 0x53, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, - 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, - 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, 0x12, 0x1f, + 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x2a, 0x2d, 0x0a, 0x0c, + 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, + 0x57, 0x49, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x47, 0x41, 0x53, 0x5f, 0x55, 0x53, 0x45, 0x44, 0x10, 0x01, 0x32, 0x92, 0x05, 0x0a, 0x07, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x08, 0x53, 0x69, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, 0x12, 0x1f, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, - 0x73, 0x2f, 0x7b, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x7f, 0x0a, 0x0b, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, + 0x2f, 0x7b, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x7f, 0x0a, 0x0b, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x16, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x78, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x16, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7c, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, - 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, - 0x78, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x7d, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, - 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, + 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, + 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, + 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, + 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, 0x02, + 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6390,63 +6578,65 @@ func file_cosmos_tx_v1beta1_service_proto_rawDescGZIP() []byte { return file_cosmos_tx_v1beta1_service_proto_rawDescData } -var file_cosmos_tx_v1beta1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_cosmos_tx_v1beta1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_cosmos_tx_v1beta1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cosmos_tx_v1beta1_service_proto_goTypes = []interface{}{ (OrderBy)(0), // 0: cosmos.tx.v1beta1.OrderBy (BroadcastMode)(0), // 1: cosmos.tx.v1beta1.BroadcastMode - (*GetTxsEventRequest)(nil), // 2: cosmos.tx.v1beta1.GetTxsEventRequest - (*GetTxsEventResponse)(nil), // 3: cosmos.tx.v1beta1.GetTxsEventResponse - (*BroadcastTxRequest)(nil), // 4: cosmos.tx.v1beta1.BroadcastTxRequest - (*BroadcastTxResponse)(nil), // 5: cosmos.tx.v1beta1.BroadcastTxResponse - (*SimulateRequest)(nil), // 6: cosmos.tx.v1beta1.SimulateRequest - (*SimulateResponse)(nil), // 7: cosmos.tx.v1beta1.SimulateResponse - (*GetTxRequest)(nil), // 8: cosmos.tx.v1beta1.GetTxRequest - (*GetTxResponse)(nil), // 9: cosmos.tx.v1beta1.GetTxResponse - (*GetBlockWithTxsRequest)(nil), // 10: cosmos.tx.v1beta1.GetBlockWithTxsRequest - (*GetBlockWithTxsResponse)(nil), // 11: cosmos.tx.v1beta1.GetBlockWithTxsResponse - (*v1beta1.PageRequest)(nil), // 12: cosmos.base.query.v1beta1.PageRequest - (*Tx)(nil), // 13: cosmos.tx.v1beta1.Tx - (*v1beta11.TxResponse)(nil), // 14: cosmos.base.abci.v1beta1.TxResponse - (*v1beta1.PageResponse)(nil), // 15: cosmos.base.query.v1beta1.PageResponse - (*v1beta11.GasInfo)(nil), // 16: cosmos.base.abci.v1beta1.GasInfo - (*v1beta11.Result)(nil), // 17: cosmos.base.abci.v1beta1.Result - (*types.BlockID)(nil), // 18: tendermint.types.BlockID - (*types.Block)(nil), // 19: tendermint.types.Block + (SimulateMode)(0), // 2: cosmos.tx.v1beta1.SimulateMode + (*GetTxsEventRequest)(nil), // 3: cosmos.tx.v1beta1.GetTxsEventRequest + (*GetTxsEventResponse)(nil), // 4: cosmos.tx.v1beta1.GetTxsEventResponse + (*BroadcastTxRequest)(nil), // 5: cosmos.tx.v1beta1.BroadcastTxRequest + (*BroadcastTxResponse)(nil), // 6: cosmos.tx.v1beta1.BroadcastTxResponse + (*SimulateRequest)(nil), // 7: cosmos.tx.v1beta1.SimulateRequest + (*SimulateResponse)(nil), // 8: cosmos.tx.v1beta1.SimulateResponse + (*GetTxRequest)(nil), // 9: cosmos.tx.v1beta1.GetTxRequest + (*GetTxResponse)(nil), // 10: cosmos.tx.v1beta1.GetTxResponse + (*GetBlockWithTxsRequest)(nil), // 11: cosmos.tx.v1beta1.GetBlockWithTxsRequest + (*GetBlockWithTxsResponse)(nil), // 12: cosmos.tx.v1beta1.GetBlockWithTxsResponse + (*v1beta1.PageRequest)(nil), // 13: cosmos.base.query.v1beta1.PageRequest + (*Tx)(nil), // 14: cosmos.tx.v1beta1.Tx + (*v1beta11.TxResponse)(nil), // 15: cosmos.base.abci.v1beta1.TxResponse + (*v1beta1.PageResponse)(nil), // 16: cosmos.base.query.v1beta1.PageResponse + (*v1beta11.GasInfo)(nil), // 17: cosmos.base.abci.v1beta1.GasInfo + (*v1beta11.Result)(nil), // 18: cosmos.base.abci.v1beta1.Result + (*types.BlockID)(nil), // 19: tendermint.types.BlockID + (*types.Block)(nil), // 20: tendermint.types.Block } var file_cosmos_tx_v1beta1_service_proto_depIdxs = []int32{ - 12, // 0: cosmos.tx.v1beta1.GetTxsEventRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 13, // 0: cosmos.tx.v1beta1.GetTxsEventRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 0, // 1: cosmos.tx.v1beta1.GetTxsEventRequest.order_by:type_name -> cosmos.tx.v1beta1.OrderBy - 13, // 2: cosmos.tx.v1beta1.GetTxsEventResponse.txs:type_name -> cosmos.tx.v1beta1.Tx - 14, // 3: cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses:type_name -> cosmos.base.abci.v1beta1.TxResponse - 15, // 4: cosmos.tx.v1beta1.GetTxsEventResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 14, // 2: cosmos.tx.v1beta1.GetTxsEventResponse.txs:type_name -> cosmos.tx.v1beta1.Tx + 15, // 3: cosmos.tx.v1beta1.GetTxsEventResponse.tx_responses:type_name -> cosmos.base.abci.v1beta1.TxResponse + 16, // 4: cosmos.tx.v1beta1.GetTxsEventResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 1, // 5: cosmos.tx.v1beta1.BroadcastTxRequest.mode:type_name -> cosmos.tx.v1beta1.BroadcastMode - 14, // 6: cosmos.tx.v1beta1.BroadcastTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse - 13, // 7: cosmos.tx.v1beta1.SimulateRequest.tx:type_name -> cosmos.tx.v1beta1.Tx - 16, // 8: cosmos.tx.v1beta1.SimulateResponse.gas_info:type_name -> cosmos.base.abci.v1beta1.GasInfo - 17, // 9: cosmos.tx.v1beta1.SimulateResponse.result:type_name -> cosmos.base.abci.v1beta1.Result - 13, // 10: cosmos.tx.v1beta1.GetTxResponse.tx:type_name -> cosmos.tx.v1beta1.Tx - 14, // 11: cosmos.tx.v1beta1.GetTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse - 12, // 12: cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 13, // 13: cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs:type_name -> cosmos.tx.v1beta1.Tx - 18, // 14: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id:type_name -> tendermint.types.BlockID - 19, // 15: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block:type_name -> tendermint.types.Block - 15, // 16: cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 6, // 17: cosmos.tx.v1beta1.Service.Simulate:input_type -> cosmos.tx.v1beta1.SimulateRequest - 8, // 18: cosmos.tx.v1beta1.Service.GetTx:input_type -> cosmos.tx.v1beta1.GetTxRequest - 4, // 19: cosmos.tx.v1beta1.Service.BroadcastTx:input_type -> cosmos.tx.v1beta1.BroadcastTxRequest - 2, // 20: cosmos.tx.v1beta1.Service.GetTxsEvent:input_type -> cosmos.tx.v1beta1.GetTxsEventRequest - 10, // 21: cosmos.tx.v1beta1.Service.GetBlockWithTxs:input_type -> cosmos.tx.v1beta1.GetBlockWithTxsRequest - 7, // 22: cosmos.tx.v1beta1.Service.Simulate:output_type -> cosmos.tx.v1beta1.SimulateResponse - 9, // 23: cosmos.tx.v1beta1.Service.GetTx:output_type -> cosmos.tx.v1beta1.GetTxResponse - 5, // 24: cosmos.tx.v1beta1.Service.BroadcastTx:output_type -> cosmos.tx.v1beta1.BroadcastTxResponse - 3, // 25: cosmos.tx.v1beta1.Service.GetTxsEvent:output_type -> cosmos.tx.v1beta1.GetTxsEventResponse - 11, // 26: cosmos.tx.v1beta1.Service.GetBlockWithTxs:output_type -> cosmos.tx.v1beta1.GetBlockWithTxsResponse - 22, // [22:27] is the sub-list for method output_type - 17, // [17:22] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 15, // 6: cosmos.tx.v1beta1.BroadcastTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse + 14, // 7: cosmos.tx.v1beta1.SimulateRequest.tx:type_name -> cosmos.tx.v1beta1.Tx + 2, // 8: cosmos.tx.v1beta1.SimulateRequest.mode:type_name -> cosmos.tx.v1beta1.SimulateMode + 17, // 9: cosmos.tx.v1beta1.SimulateResponse.gas_info:type_name -> cosmos.base.abci.v1beta1.GasInfo + 18, // 10: cosmos.tx.v1beta1.SimulateResponse.result:type_name -> cosmos.base.abci.v1beta1.Result + 14, // 11: cosmos.tx.v1beta1.GetTxResponse.tx:type_name -> cosmos.tx.v1beta1.Tx + 15, // 12: cosmos.tx.v1beta1.GetTxResponse.tx_response:type_name -> cosmos.base.abci.v1beta1.TxResponse + 13, // 13: cosmos.tx.v1beta1.GetBlockWithTxsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 14, // 14: cosmos.tx.v1beta1.GetBlockWithTxsResponse.txs:type_name -> cosmos.tx.v1beta1.Tx + 19, // 15: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block_id:type_name -> tendermint.types.BlockID + 20, // 16: cosmos.tx.v1beta1.GetBlockWithTxsResponse.block:type_name -> tendermint.types.Block + 16, // 17: cosmos.tx.v1beta1.GetBlockWithTxsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 7, // 18: cosmos.tx.v1beta1.Service.Simulate:input_type -> cosmos.tx.v1beta1.SimulateRequest + 9, // 19: cosmos.tx.v1beta1.Service.GetTx:input_type -> cosmos.tx.v1beta1.GetTxRequest + 5, // 20: cosmos.tx.v1beta1.Service.BroadcastTx:input_type -> cosmos.tx.v1beta1.BroadcastTxRequest + 3, // 21: cosmos.tx.v1beta1.Service.GetTxsEvent:input_type -> cosmos.tx.v1beta1.GetTxsEventRequest + 11, // 22: cosmos.tx.v1beta1.Service.GetBlockWithTxs:input_type -> cosmos.tx.v1beta1.GetBlockWithTxsRequest + 8, // 23: cosmos.tx.v1beta1.Service.Simulate:output_type -> cosmos.tx.v1beta1.SimulateResponse + 10, // 24: cosmos.tx.v1beta1.Service.GetTx:output_type -> cosmos.tx.v1beta1.GetTxResponse + 6, // 25: cosmos.tx.v1beta1.Service.BroadcastTx:output_type -> cosmos.tx.v1beta1.BroadcastTxResponse + 4, // 26: cosmos.tx.v1beta1.Service.GetTxsEvent:output_type -> cosmos.tx.v1beta1.GetTxsEventResponse + 12, // 27: cosmos.tx.v1beta1.Service.GetBlockWithTxs:output_type -> cosmos.tx.v1beta1.GetBlockWithTxsResponse + 23, // [23:28] is the sub-list for method output_type + 18, // [18:23] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_cosmos_tx_v1beta1_service_proto_init() } @@ -6582,7 +6772,7 @@ func file_cosmos_tx_v1beta1_service_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_tx_v1beta1_service_proto_rawDesc, - NumEnums: 2, + NumEnums: 3, NumMessages: 10, NumExtensions: 0, NumServices: 1, diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index 8dd9995d5e34..27a49458e7c9 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -123,6 +123,20 @@ message SimulateRequest { // // Since: cosmos-sdk 0.43 bytes tx_bytes = 2; + + // Since cosmos-sdk: 0.46 + SimulateMode mode = 3; +} + +// SimulateMode specifies the mode for the TxService.Simulate RPC method. +enum SimulateMode { + // Default mode of simulate, which returns + // the result of the simulation or error + WITH_RESULT = 0; + + // Returns the gas used for the transaction + // even when an error is produced + GAS_USED = 1; } // SimulateResponse is the response type for the @@ -132,6 +146,8 @@ message SimulateResponse { cosmos.base.abci.v1beta1.GasInfo gas_info = 1; // result is the result of the simulation. cosmos.base.abci.v1beta1.Result result = 2; + + string message = 3; } // GetTxRequest is the request type for the Service.GetTx diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index 9968a56ea25e..faa71b41b340 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -102,6 +102,36 @@ func (BroadcastMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_e0b00a618705eca7, []int{1} } +// SimulateMode specifies the mode for the TxService.Simulate RPC method. +type SimulateMode int32 + +const ( + // Default mode of simulate, which returns + // the result of the simulation or error + SimulateMode_WITH_RESULT SimulateMode = 0 + // Returns the gas used for the transaction + // even when an error is produced + SimulateMode_GAS_USED SimulateMode = 1 +) + +var SimulateMode_name = map[int32]string{ + 0: "WITH_RESULT", + 1: "GAS_USED", +} + +var SimulateMode_value = map[string]int32{ + "WITH_RESULT": 0, + "GAS_USED": 1, +} + +func (x SimulateMode) String() string { + return proto.EnumName(SimulateMode_name, int32(x)) +} + +func (SimulateMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{2} +} + // GetTxsEventRequest is the request type for the Service.TxsByEvents // RPC method. type GetTxsEventRequest struct { @@ -375,6 +405,8 @@ type SimulateRequest struct { // // Since: cosmos-sdk 0.43 TxBytes []byte `protobuf:"bytes,2,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` + // Since cosmos-sdk: 0.46 + Mode SimulateMode `protobuf:"varint,3,opt,name=mode,proto3,enum=cosmos.tx.v1beta1.SimulateMode" json:"mode,omitempty"` } func (m *SimulateRequest) Reset() { *m = SimulateRequest{} } @@ -425,13 +457,21 @@ func (m *SimulateRequest) GetTxBytes() []byte { return nil } +func (m *SimulateRequest) GetMode() SimulateMode { + if m != nil { + return m.Mode + } + return SimulateMode_WITH_RESULT +} + // SimulateResponse is the response type for the // Service.SimulateRPC method. type SimulateResponse struct { // gas_info is the information about gas used in the simulation. GasInfo *types.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` // result is the result of the simulation. - Result *types.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Result *types.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` } func (m *SimulateResponse) Reset() { *m = SimulateResponse{} } @@ -481,6 +521,13 @@ func (m *SimulateResponse) GetResult() *types.Result { return nil } +func (m *SimulateResponse) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + // GetTxRequest is the request type for the Service.GetTx // RPC method. type GetTxRequest struct { @@ -717,6 +764,7 @@ func (m *GetBlockWithTxsResponse) GetPagination() *query.PageResponse { func init() { proto.RegisterEnum("cosmos.tx.v1beta1.OrderBy", OrderBy_name, OrderBy_value) proto.RegisterEnum("cosmos.tx.v1beta1.BroadcastMode", BroadcastMode_name, BroadcastMode_value) + proto.RegisterEnum("cosmos.tx.v1beta1.SimulateMode", SimulateMode_name, SimulateMode_value) proto.RegisterType((*GetTxsEventRequest)(nil), "cosmos.tx.v1beta1.GetTxsEventRequest") proto.RegisterType((*GetTxsEventResponse)(nil), "cosmos.tx.v1beta1.GetTxsEventResponse") proto.RegisterType((*BroadcastTxRequest)(nil), "cosmos.tx.v1beta1.BroadcastTxRequest") @@ -732,71 +780,75 @@ func init() { func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } var fileDescriptor_e0b00a618705eca7 = []byte{ - // 1013 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1a, 0x47, - 0x14, 0xf6, 0x2e, 0x60, 0xc8, 0xc3, 0x4e, 0xc8, 0x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, 0x1a, 0x16, 0x6b, 0xed, - 0x1c, 0x56, 0x25, 0x46, 0x92, 0xdd, 0xb9, 0x52, 0x07, 0xa1, 0xc1, 0x4c, 0x21, 0xd4, 0xf7, 0x2c, - 0x84, 0x03, 0x1b, 0x25, 0xc2, 0x73, 0xee, 0x18, 0x79, 0x66, 0xf1, 0xf6, 0xb1, 0xc3, 0x7c, 0x93, - 0xa1, 0x4d, 0xac, 0x56, 0x9b, 0x0b, 0x2e, 0x21, 0x2c, 0x77, 0xe8, 0xe1, 0xfb, 0x4f, 0x06, 0xff, - 0xed, 0xd6, 0xfe, 0x57, 0x60, 0x73, 0x2e, 0xf4, 0xbb, 0x36, 0xee, 0x03, 0x88, 0x89, 0x11, 0x58, - 0xb3, 0x9a, 0x92, 0xca, 0x2d, 0x7d, 0x32, 0x06, 0x75, 0x6f, 0x00, 0x8a, 0x10, 0xe5, 0x02, 0x8e, - 0x0a, 0x68, 0xb9, 0x89, 0x0e, 0x21, 0x22, 0x96, 0xb2, 0x41, 0x37, 0x17, 0x98, 0x60, 0x0f, 0x85, - 0x4a, 0x53, 0x19, 0x87, 0xdf, 0xa9, 0xa9, 0xfd, 0x29, 0x1f, 0x7c, 0x09, 0x51, 0x39, 0xe5, 0x50, - 0x12, 0xd6, 0x2b, 0xb8, 0x50, 0xc4, 0xb5, 0xdc, 0xf3, 0xda, 0x37, 0x4f, 0xaa, 0x4f, 0x8b, 0xf9, - 0xf2, 0xc3, 0x72, 0xb1, 0x90, 0x58, 0x42, 0x09, 0x58, 0x19, 0x9f, 0x1c, 0x55, 0xf3, 0x09, 0x05, - 0xdd, 0x84, 0xd5, 0xf1, 0x2f, 0x85, 0x62, 0x35, 0x9f, 0x50, 0x0f, 0x7e, 0x54, 0x60, 0x75, 0xaa, - 0x6b, 0x51, 0x1a, 0x52, 0x39, 0x5c, 0x39, 0x2a, 0xe4, 0x8f, 0xaa, 0xc7, 0xb5, 0xc7, 0x95, 0x42, - 0x71, 0xc6, 0xed, 0x16, 0xac, 0xcf, 0x9c, 0xe7, 0xbe, 0xae, 0xe4, 0x1f, 0x25, 0x94, 0x94, 0x1a, - 0x53, 0xd0, 0x26, 0xac, 0xcd, 0x9c, 0x56, 0x9f, 0x3f, 0xc9, 0x27, 0x54, 0x97, 0xe7, 0xcc, 0xc1, - 0x91, 0x38, 0x09, 0x65, 0x7f, 0x8d, 0x40, 0xb4, 0xea, 0x3d, 0x9e, 0xe8, 0x0c, 0x62, 0xa3, 0xa6, - 0x43, 0x5a, 0x40, 0xb9, 0x66, 0x7a, 0x3d, 0x75, 0xf7, 0x8d, 0x18, 0x79, 0x35, 0x77, 0x7f, 0xfa, - 0xf3, 0xdf, 0xdf, 0xd4, 0x8c, 0x76, 0xdb, 0x08, 0x78, 0xb5, 0x25, 0xf8, 0x33, 0xe5, 0x00, 0x9d, - 0x40, 0x44, 0x74, 0x10, 0xda, 0x0e, 0xf0, 0xea, 0xef, 0xbf, 0x54, 0x66, 0x31, 0x40, 0xc6, 0xdc, - 0x11, 0x31, 0xb7, 0xd1, 0x87, 0x46, 0xd0, 0x93, 0xcd, 0x8c, 0x33, 0xb7, 0x67, 0xcf, 0xd1, 0x0f, - 0x10, 0xf7, 0x0d, 0x47, 0xb4, 0xf3, 0xa6, 0x99, 0x3a, 0x09, 0xbf, 0x7b, 0x15, 0x4c, 0x92, 0xb8, - 0x23, 0x48, 0xdc, 0xd6, 0x36, 0x82, 0x49, 0xb8, 0x39, 0x7f, 0x0f, 0x71, 0xdf, 0x83, 0x17, 0x48, - 0x60, 0xfe, 0xb1, 0x0f, 0x24, 0x10, 0xf0, 0x6e, 0x6a, 0x69, 0x41, 0x20, 0x89, 0x16, 0x10, 0x40, - 0xbf, 0x2b, 0x70, 0x63, 0xa6, 0x75, 0xd1, 0xbd, 0x60, 0xdf, 0x01, 0x93, 0x25, 0x75, 0xf0, 0x36, - 0x50, 0x49, 0xe5, 0x50, 0x50, 0xd9, 0x43, 0x3b, 0x0b, 0x0a, 0x22, 0x3a, 0xd4, 0x38, 0xf3, 0x66, - 0xd3, 0x79, 0xee, 0x8b, 0x3f, 0x2e, 0xd2, 0xca, 0xab, 0x8b, 0xb4, 0xf2, 0xcf, 0x45, 0x5a, 0xf9, - 0xe5, 0x32, 0xbd, 0xf4, 0xea, 0x32, 0xbd, 0xf4, 0xd7, 0x65, 0x7a, 0xe9, 0xdb, 0x9d, 0x96, 0xc5, - 0xdb, 0x83, 0xba, 0xde, 0xa0, 0xdd, 0x91, 0x2b, 0xef, 0xdf, 0x21, 0x6b, 0xbe, 0x1c, 0x7d, 0x2f, - 0x39, 0xf5, 0x65, 0xf1, 0xb5, 0xf4, 0xf1, 0xeb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xc8, 0xb5, - 0x68, 0x2a, 0x0a, 0x00, 0x00, + // 1075 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1a, 0x47, + 0x14, 0xf7, 0x2c, 0x60, 0xf0, 0x03, 0xc7, 0x64, 0xec, 0xda, 0x84, 0xb8, 0x98, 0x6c, 0xea, 0x3f, + 0x41, 0xf2, 0xae, 0xe2, 0xa4, 0x52, 0x55, 0x55, 0xaa, 0xcc, 0x9f, 0x10, 0x9a, 0x3f, 0x8e, 0x06, + 0xac, 0x28, 0x55, 0x25, 0xb4, 0xc0, 0x04, 0x56, 0x81, 0x5d, 0xcc, 0x8c, 0xad, 0xb5, 0x5c, 0xab, + 0x55, 0xcf, 0x3d, 0x54, 0xed, 0xa1, 0x5f, 0xa0, 0x1f, 0xa6, 0xc7, 0x48, 0xbd, 0xb4, 0xb7, 0xca, + 0xee, 0xa9, 0xa7, 0x7e, 0x84, 0x6a, 0x67, 0x07, 0xbc, 0xe0, 0xc5, 0x4e, 0x72, 0xb1, 0x67, 0x78, + 0xbf, 0xf7, 0xde, 0xef, 0xfd, 0x66, 0xde, 0xdb, 0x81, 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19, 0xf4, 0xf7, 0x59, 0x06, 0xfd, 0x74, 0x9e, + 0x99, 0x79, 0x7b, 0x9e, 0x99, 0xf9, 0xf3, 0x3c, 0x33, 0xf3, 0xf5, 0x7a, 0xdb, 0xe4, 0x9d, 0xc3, + 0x86, 0xd6, 0xb4, 0x7b, 0xc3, 0x50, 0xde, 0xbf, 0x6d, 0xd6, 0x7a, 0x33, 0x7c, 0xae, 0x39, 0x8d, + 0x59, 0xf1, 0x58, 0x7b, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xfd, 0xa9, 0x49, 0xa9, + 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1254,6 +1306,11 @@ func (m *SimulateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Mode != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Mode)) + i-- + dAtA[i] = 0x18 + } if len(m.TxBytes) > 0 { i -= len(m.TxBytes) copy(dAtA[i:], m.TxBytes) @@ -1296,6 +1353,13 @@ func (m *SimulateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintService(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x1a + } if m.Result != nil { { size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) @@ -1623,6 +1687,9 @@ func (m *SimulateRequest) Size() (n int) { if l > 0 { n += 1 + l + sovService(uint64(l)) } + if m.Mode != 0 { + n += 1 + sovService(uint64(m.Mode)) + } return n } @@ -1640,6 +1707,10 @@ func (m *SimulateResponse) Size() (n int) { l = m.Result.Size() n += 1 + l + sovService(uint64(l)) } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } return n } @@ -2358,6 +2429,25 @@ func (m *SimulateRequest) Unmarshal(dAtA []byte) error { m.TxBytes = []byte{} } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + m.Mode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mode |= SimulateMode(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) @@ -2480,6 +2570,38 @@ func (m *SimulateResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index c25837cadf26..ff723eef6ed1 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -128,7 +128,15 @@ func (s txServer) Simulate(ctx context.Context, req *txtypes.SimulateRequest) (* } gasInfo, result, err := s.simulate(txBytes) + if err != nil { + if req.Mode == txtypes.SimulateMode_GAS_USED { + return &txtypes.SimulateResponse{ + GasInfo: &gasInfo, + Message: err.Error(), + }, nil + } + return nil, err }