From c6f02a16cbdc998d755242db43f59d9e47085814 Mon Sep 17 00:00:00 2001 From: KIMURA Yu <33382781+KimuraYu45z@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:45:43 +0800 Subject: [PATCH] order --- api/gluon/contract/genesis.pulsar.go | 208 +- api/gluon/contract/order.pulsar.go | 1604 ++++++----- api/gluon/contract/order_old.pulsar.go | 1897 +++++++++++++ api/gluon/contract/query.pulsar.go | 2193 ++++++++++++++- api/gluon/contract/query_grpc.pb.go | 78 +- api/gluon/contract/tx.pulsar.go | 2941 +++++++++++++++++++- api/gluon/contract/tx_grpc.pb.go | 111 + docs/static/openapi.yml | 2 +- proto/gluon/contract/genesis.proto | 6 +- proto/gluon/contract/order.proto | 80 +- proto/gluon/contract/query.proto | 43 +- proto/gluon/contract/tx.proto | 54 +- x/contract/keeper/msg_server_order.go | 87 + x/contract/keeper/msg_server_order_test.go | 140 + x/contract/keeper/order.go | 71 + x/contract/keeper/order_test.go | 64 + x/contract/keeper/query_order.go | 56 + x/contract/keeper/query_order_test.go | 124 + x/contract/module/autocli.go | 29 + x/contract/module/genesis.go | 5 + x/contract/module/genesis_test.go | 9 + x/contract/module/simulation.go | 79 + x/contract/simulation/order.go | 145 + x/contract/types/codec.go | 5 + x/contract/types/genesis.go | 16 +- x/contract/types/genesis.pb.go | 88 +- x/contract/types/genesis_test.go | 22 + x/contract/types/key_order.go | 23 + x/contract/types/messages_order.go | 70 + x/contract/types/messages_order_test.go | 103 + x/contract/types/order.pb.go | 795 +++--- x/contract/types/query.pb.go | 892 +++++- x/contract/types/query.pb.gw.go | 184 ++ x/contract/types/tx.pb.go | 1533 ++++++++-- x/customauth/ante/expected_keepers.go | 3 +- 35 files changed, 12264 insertions(+), 1496 deletions(-) create mode 100644 api/gluon/contract/order_old.pulsar.go create mode 100644 x/contract/keeper/msg_server_order.go create mode 100644 x/contract/keeper/msg_server_order_test.go create mode 100644 x/contract/keeper/order.go create mode 100644 x/contract/keeper/order_test.go create mode 100644 x/contract/keeper/query_order.go create mode 100644 x/contract/keeper/query_order_test.go create mode 100644 x/contract/simulation/order.go create mode 100644 x/contract/types/key_order.go create mode 100644 x/contract/types/messages_order.go create mode 100644 x/contract/types/messages_order_test.go diff --git a/api/gluon/contract/genesis.pulsar.go b/api/gluon/contract/genesis.pulsar.go index f96422b..c4fd40e 100644 --- a/api/gluon/contract/genesis.pulsar.go +++ b/api/gluon/contract/genesis.pulsar.go @@ -14,10 +14,62 @@ import ( sync "sync" ) +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*Order +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Order) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Order) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(Order) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(Order) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_port_id protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_port_id protoreflect.FieldDescriptor + fd_GenesisState_orderList protoreflect.FieldDescriptor ) func init() { @@ -25,6 +77,7 @@ func init() { md_GenesisState = File_gluon_contract_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_port_id = md_GenesisState.Fields().ByName("port_id") + fd_GenesisState_orderList = md_GenesisState.Fields().ByName("orderList") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -104,6 +157,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if len(x.OrderList) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.OrderList}) + if !f(fd_GenesisState_orderList, value) { + return + } + } } // Has reports whether a field is populated. @@ -123,6 +182,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return x.Params != nil case "gluon.contract.GenesisState.port_id": return x.PortId != "" + case "gluon.contract.GenesisState.orderList": + return len(x.OrderList) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.GenesisState")) @@ -143,6 +204,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.Params = nil case "gluon.contract.GenesisState.port_id": x.PortId = "" + case "gluon.contract.GenesisState.orderList": + x.OrderList = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.GenesisState")) @@ -165,6 +228,12 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto case "gluon.contract.GenesisState.port_id": value := x.PortId return protoreflect.ValueOfString(value) + case "gluon.contract.GenesisState.orderList": + if len(x.OrderList) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.OrderList} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.GenesisState")) @@ -189,6 +258,10 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value x.Params = value.Message().Interface().(*Params) case "gluon.contract.GenesisState.port_id": x.PortId = value.Interface().(string) + case "gluon.contract.GenesisState.orderList": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.OrderList = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.GenesisState")) @@ -214,6 +287,12 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "gluon.contract.GenesisState.orderList": + if x.OrderList == nil { + x.OrderList = []*Order{} + } + value := &_GenesisState_3_list{list: &x.OrderList} + return protoreflect.ValueOfList(value) case "gluon.contract.GenesisState.port_id": panic(fmt.Errorf("field port_id of message gluon.contract.GenesisState is not mutable")) default: @@ -234,6 +313,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "gluon.contract.GenesisState.port_id": return protoreflect.ValueOfString("") + case "gluon.contract.GenesisState.orderList": + list := []*Order{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.GenesisState")) @@ -311,6 +393,12 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.OrderList) > 0 { + for _, e := range x.OrderList { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -340,6 +428,22 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.OrderList) > 0 { + for iNdEx := len(x.OrderList) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OrderList[iNdEx]) + 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))) + i-- + dAtA[i] = 0x1a + } + } if len(x.PortId) > 0 { i -= len(x.PortId) copy(dAtA[i:], x.PortId) @@ -478,6 +582,40 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } x.PortId = 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 OrderList", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.OrderList = append(x.OrderList, &Order{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OrderList[len(x.OrderList)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -533,8 +671,9 @@ type GenesisState struct { unknownFields protoimpl.UnknownFields // params defines all the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + OrderList []*Order `protobuf:"bytes,3,rep,name=orderList,proto3" json:"orderList,omitempty"` } func (x *GenesisState) Reset() { @@ -571,6 +710,13 @@ func (x *GenesisState) GetPortId() string { return "" } +func (x *GenesisState) GetOrderList() []*Order { + if x != nil { + return x.OrderList + } + return nil +} + var File_gluon_contract_genesis_proto protoreflect.FileDescriptor var file_gluon_contract_genesis_proto_rawDesc = []byte{ @@ -581,23 +727,28 @@ var file_gluon_contract_genesis_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x62, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x42, 0x95, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, - 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, - 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xa2, 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, - 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x9d, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x95, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0xa2, 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, + 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, + 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -616,14 +767,16 @@ var file_gluon_contract_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1 var file_gluon_contract_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: gluon.contract.GenesisState (*Params)(nil), // 1: gluon.contract.Params + (*Order)(nil), // 2: gluon.contract.Order } var file_gluon_contract_genesis_proto_depIdxs = []int32{ 1, // 0: gluon.contract.GenesisState.params:type_name -> gluon.contract.Params - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 1: gluon.contract.GenesisState.orderList:type_name -> gluon.contract.Order + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_gluon_contract_genesis_proto_init() } @@ -632,6 +785,7 @@ func file_gluon_contract_genesis_proto_init() { return } file_gluon_contract_params_proto_init() + file_gluon_contract_order_proto_init() if !protoimpl.UnsafeEnabled { file_gluon_contract_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { diff --git a/api/gluon/contract/order.pulsar.go b/api/gluon/contract/order.pulsar.go index 224d4cd..01dcdb4 100644 --- a/api/gluon/contract/order.pulsar.go +++ b/api/gluon/contract/order.pulsar.go @@ -17,41 +17,33 @@ import ( ) var ( - md_OrderBody protoreflect.MessageDescriptor - fd_OrderBody_address protoreflect.FieldDescriptor - fd_OrderBody_base_denom protoreflect.FieldDescriptor - fd_OrderBody_quote_denom protoreflect.FieldDescriptor - fd_OrderBody_direction protoreflect.FieldDescriptor - fd_OrderBody_type protoreflect.FieldDescriptor - fd_OrderBody_amount protoreflect.FieldDescriptor - fd_OrderBody_limit_price protoreflect.FieldDescriptor - fd_OrderBody_stop_price protoreflect.FieldDescriptor - fd_OrderBody_expiry protoreflect.FieldDescriptor + md_Order protoreflect.MessageDescriptor + fd_Order_index protoreflect.FieldDescriptor + fd_Order_user protoreflect.FieldDescriptor + fd_Order_body protoreflect.FieldDescriptor + fd_Order_paring_id protoreflect.FieldDescriptor + fd_Order_signature protoreflect.FieldDescriptor ) func init() { file_gluon_contract_order_proto_init() - md_OrderBody = File_gluon_contract_order_proto.Messages().ByName("OrderBody") - fd_OrderBody_address = md_OrderBody.Fields().ByName("address") - fd_OrderBody_base_denom = md_OrderBody.Fields().ByName("base_denom") - fd_OrderBody_quote_denom = md_OrderBody.Fields().ByName("quote_denom") - fd_OrderBody_direction = md_OrderBody.Fields().ByName("direction") - fd_OrderBody_type = md_OrderBody.Fields().ByName("type") - fd_OrderBody_amount = md_OrderBody.Fields().ByName("amount") - fd_OrderBody_limit_price = md_OrderBody.Fields().ByName("limit_price") - fd_OrderBody_stop_price = md_OrderBody.Fields().ByName("stop_price") - fd_OrderBody_expiry = md_OrderBody.Fields().ByName("expiry") + md_Order = File_gluon_contract_order_proto.Messages().ByName("Order") + fd_Order_index = md_Order.Fields().ByName("index") + fd_Order_user = md_Order.Fields().ByName("user") + fd_Order_body = md_Order.Fields().ByName("body") + fd_Order_paring_id = md_Order.Fields().ByName("paring_id") + fd_Order_signature = md_Order.Fields().ByName("signature") } -var _ protoreflect.Message = (*fastReflection_OrderBody)(nil) +var _ protoreflect.Message = (*fastReflection_Order)(nil) -type fastReflection_OrderBody OrderBody +type fastReflection_Order Order -func (x *OrderBody) ProtoReflect() protoreflect.Message { - return (*fastReflection_OrderBody)(x) +func (x *Order) ProtoReflect() protoreflect.Message { + return (*fastReflection_Order)(x) } -func (x *OrderBody) slowProtoReflect() protoreflect.Message { +func (x *Order) slowProtoReflect() protoreflect.Message { mi := &file_gluon_contract_order_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -63,43 +55,43 @@ func (x *OrderBody) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_OrderBody_messageType fastReflection_OrderBody_messageType -var _ protoreflect.MessageType = fastReflection_OrderBody_messageType{} +var _fastReflection_Order_messageType fastReflection_Order_messageType +var _ protoreflect.MessageType = fastReflection_Order_messageType{} -type fastReflection_OrderBody_messageType struct{} +type fastReflection_Order_messageType struct{} -func (x fastReflection_OrderBody_messageType) Zero() protoreflect.Message { - return (*fastReflection_OrderBody)(nil) +func (x fastReflection_Order_messageType) Zero() protoreflect.Message { + return (*fastReflection_Order)(nil) } -func (x fastReflection_OrderBody_messageType) New() protoreflect.Message { - return new(fastReflection_OrderBody) +func (x fastReflection_Order_messageType) New() protoreflect.Message { + return new(fastReflection_Order) } -func (x fastReflection_OrderBody_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_OrderBody +func (x fastReflection_Order_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Order } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_OrderBody) Descriptor() protoreflect.MessageDescriptor { - return md_OrderBody +func (x *fastReflection_Order) Descriptor() protoreflect.MessageDescriptor { + return md_Order } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_OrderBody) Type() protoreflect.MessageType { - return _fastReflection_OrderBody_messageType +func (x *fastReflection_Order) Type() protoreflect.MessageType { + return _fastReflection_Order_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_OrderBody) New() protoreflect.Message { - return new(fastReflection_OrderBody) +func (x *fastReflection_Order) New() protoreflect.Message { + return new(fastReflection_Order) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_OrderBody) Interface() protoreflect.ProtoMessage { - return (*OrderBody)(x) +func (x *fastReflection_Order) Interface() protoreflect.ProtoMessage { + return (*Order)(x) } // Range iterates over every populated field in an undefined order, @@ -107,58 +99,34 @@ func (x *fastReflection_OrderBody) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_OrderBody) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_OrderBody_address, value) { - return - } - } - if x.BaseDenom != "" { - value := protoreflect.ValueOfString(x.BaseDenom) - if !f(fd_OrderBody_base_denom, value) { - return - } - } - if x.QuoteDenom != "" { - value := protoreflect.ValueOfString(x.QuoteDenom) - if !f(fd_OrderBody_quote_denom, value) { - return - } - } - if x.Direction != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Direction)) - if !f(fd_OrderBody_direction, value) { - return - } - } - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) - if !f(fd_OrderBody_type, value) { +func (x *fastReflection_Order) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_Order_index, value) { return } } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_OrderBody_amount, value) { + if x.User != "" { + value := protoreflect.ValueOfString(x.User) + if !f(fd_Order_user, value) { return } } - if x.LimitPrice != "" { - value := protoreflect.ValueOfString(x.LimitPrice) - if !f(fd_OrderBody_limit_price, value) { + if x.Body != nil { + value := protoreflect.ValueOfMessage(x.Body.ProtoReflect()) + if !f(fd_Order_body, value) { return } } - if x.StopPrice != "" { - value := protoreflect.ValueOfString(x.StopPrice) - if !f(fd_OrderBody_stop_price, value) { + if x.ParingId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ParingId) + if !f(fd_Order_paring_id, value) { return } } - if x.Expiry != nil { - value := protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) - if !f(fd_OrderBody_expiry, value) { + if len(x.Signature) != 0 { + value := protoreflect.ValueOfBytes(x.Signature) + if !f(fd_Order_signature, value) { return } } @@ -175,31 +143,23 @@ func (x *fastReflection_OrderBody) Range(f func(protoreflect.FieldDescriptor, pr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_OrderBody) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Order) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "gluon.contract.OrderBody.address": - return x.Address != "" - case "gluon.contract.OrderBody.base_denom": - return x.BaseDenom != "" - case "gluon.contract.OrderBody.quote_denom": - return x.QuoteDenom != "" - case "gluon.contract.OrderBody.direction": - return x.Direction != 0 - case "gluon.contract.OrderBody.type": - return x.Type_ != 0 - case "gluon.contract.OrderBody.amount": - return x.Amount != "" - case "gluon.contract.OrderBody.limit_price": - return x.LimitPrice != "" - case "gluon.contract.OrderBody.stop_price": - return x.StopPrice != "" - case "gluon.contract.OrderBody.expiry": - return x.Expiry != nil + case "gluon.contract.Order.index": + return x.Index != "" + case "gluon.contract.Order.user": + return x.User != "" + case "gluon.contract.Order.body": + return x.Body != nil + case "gluon.contract.Order.paring_id": + return x.ParingId != uint64(0) + case "gluon.contract.Order.signature": + return len(x.Signature) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) } - panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) } } @@ -209,31 +169,23 @@ func (x *fastReflection_OrderBody) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OrderBody) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Order) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "gluon.contract.OrderBody.address": - x.Address = "" - case "gluon.contract.OrderBody.base_denom": - x.BaseDenom = "" - case "gluon.contract.OrderBody.quote_denom": - x.QuoteDenom = "" - case "gluon.contract.OrderBody.direction": - x.Direction = 0 - case "gluon.contract.OrderBody.type": - x.Type_ = 0 - case "gluon.contract.OrderBody.amount": - x.Amount = "" - case "gluon.contract.OrderBody.limit_price": - x.LimitPrice = "" - case "gluon.contract.OrderBody.stop_price": - x.StopPrice = "" - case "gluon.contract.OrderBody.expiry": - x.Expiry = nil + case "gluon.contract.Order.index": + x.Index = "" + case "gluon.contract.Order.user": + x.User = "" + case "gluon.contract.Order.body": + x.Body = nil + case "gluon.contract.Order.paring_id": + x.ParingId = uint64(0) + case "gluon.contract.Order.signature": + x.Signature = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) } - panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) } } @@ -243,40 +195,28 @@ func (x *fastReflection_OrderBody) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_OrderBody) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Order) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "gluon.contract.OrderBody.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "gluon.contract.OrderBody.base_denom": - value := x.BaseDenom - return protoreflect.ValueOfString(value) - case "gluon.contract.OrderBody.quote_denom": - value := x.QuoteDenom + case "gluon.contract.Order.index": + value := x.Index return protoreflect.ValueOfString(value) - case "gluon.contract.OrderBody.direction": - value := x.Direction - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "gluon.contract.OrderBody.type": - value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "gluon.contract.OrderBody.amount": - value := x.Amount + case "gluon.contract.Order.user": + value := x.User return protoreflect.ValueOfString(value) - case "gluon.contract.OrderBody.limit_price": - value := x.LimitPrice - return protoreflect.ValueOfString(value) - case "gluon.contract.OrderBody.stop_price": - value := x.StopPrice - return protoreflect.ValueOfString(value) - case "gluon.contract.OrderBody.expiry": - value := x.Expiry + case "gluon.contract.Order.body": + value := x.Body return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "gluon.contract.Order.paring_id": + value := x.ParingId + return protoreflect.ValueOfUint64(value) + case "gluon.contract.Order.signature": + value := x.Signature + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) } - panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", descriptor.FullName())) } } @@ -290,31 +230,23 @@ func (x *fastReflection_OrderBody) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OrderBody) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Order) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "gluon.contract.OrderBody.address": - x.Address = value.Interface().(string) - case "gluon.contract.OrderBody.base_denom": - x.BaseDenom = value.Interface().(string) - case "gluon.contract.OrderBody.quote_denom": - x.QuoteDenom = value.Interface().(string) - case "gluon.contract.OrderBody.direction": - x.Direction = (OrderDirection)(value.Enum()) - case "gluon.contract.OrderBody.type": - x.Type_ = (OrderType)(value.Enum()) - case "gluon.contract.OrderBody.amount": - x.Amount = value.Interface().(string) - case "gluon.contract.OrderBody.limit_price": - x.LimitPrice = value.Interface().(string) - case "gluon.contract.OrderBody.stop_price": - x.StopPrice = value.Interface().(string) - case "gluon.contract.OrderBody.expiry": - x.Expiry = value.Message().Interface().(*timestamppb.Timestamp) + case "gluon.contract.Order.index": + x.Index = value.Interface().(string) + case "gluon.contract.Order.user": + x.User = value.Interface().(string) + case "gluon.contract.Order.body": + x.Body = value.Message().Interface().(*OrderBody) + case "gluon.contract.Order.paring_id": + x.ParingId = value.Uint() + case "gluon.contract.Order.signature": + x.Signature = value.Bytes() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) } - panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) } } @@ -328,76 +260,60 @@ func (x *fastReflection_OrderBody) Set(fd protoreflect.FieldDescriptor, value pr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OrderBody) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Order) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "gluon.contract.OrderBody.expiry": - if x.Expiry == nil { - x.Expiry = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) - case "gluon.contract.OrderBody.address": - panic(fmt.Errorf("field address of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.base_denom": - panic(fmt.Errorf("field base_denom of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.quote_denom": - panic(fmt.Errorf("field quote_denom of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.direction": - panic(fmt.Errorf("field direction of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.type": - panic(fmt.Errorf("field type of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.amount": - panic(fmt.Errorf("field amount of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.limit_price": - panic(fmt.Errorf("field limit_price of message gluon.contract.OrderBody is not mutable")) - case "gluon.contract.OrderBody.stop_price": - panic(fmt.Errorf("field stop_price of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.Order.body": + if x.Body == nil { + x.Body = new(OrderBody) + } + return protoreflect.ValueOfMessage(x.Body.ProtoReflect()) + case "gluon.contract.Order.index": + panic(fmt.Errorf("field index of message gluon.contract.Order is not mutable")) + case "gluon.contract.Order.user": + panic(fmt.Errorf("field user of message gluon.contract.Order is not mutable")) + case "gluon.contract.Order.paring_id": + panic(fmt.Errorf("field paring_id of message gluon.contract.Order is not mutable")) + case "gluon.contract.Order.signature": + panic(fmt.Errorf("field signature of message gluon.contract.Order is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) } - panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_OrderBody) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Order) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "gluon.contract.OrderBody.address": - return protoreflect.ValueOfString("") - case "gluon.contract.OrderBody.base_denom": - return protoreflect.ValueOfString("") - case "gluon.contract.OrderBody.quote_denom": - return protoreflect.ValueOfString("") - case "gluon.contract.OrderBody.direction": - return protoreflect.ValueOfEnum(0) - case "gluon.contract.OrderBody.type": - return protoreflect.ValueOfEnum(0) - case "gluon.contract.OrderBody.amount": - return protoreflect.ValueOfString("") - case "gluon.contract.OrderBody.limit_price": + case "gluon.contract.Order.index": return protoreflect.ValueOfString("") - case "gluon.contract.OrderBody.stop_price": + case "gluon.contract.Order.user": return protoreflect.ValueOfString("") - case "gluon.contract.OrderBody.expiry": - m := new(timestamppb.Timestamp) + case "gluon.contract.Order.body": + m := new(OrderBody) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "gluon.contract.Order.paring_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "gluon.contract.Order.signature": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) } - panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_OrderBody) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Order) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in gluon.contract.OrderBody", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.Order", d.FullName())) } panic("unreachable") } @@ -405,7 +321,7 @@ func (x *fastReflection_OrderBody) WhichOneof(d protoreflect.OneofDescriptor) pr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_OrderBody) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Order) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -416,7 +332,7 @@ func (x *fastReflection_OrderBody) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OrderBody) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Order) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -428,7 +344,7 @@ func (x *fastReflection_OrderBody) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_OrderBody) IsValid() bool { +func (x *fastReflection_Order) IsValid() bool { return x != nil } @@ -438,9 +354,9 @@ func (x *fastReflection_OrderBody) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*OrderBody) + x := input.Message.Interface().(*Order) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -452,40 +368,25 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BaseDenom) + l = len(x.Index) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.QuoteDenom) + l = len(x.User) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Direction != 0 { - n += 1 + runtime.Sov(uint64(x.Direction)) - } - if x.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) - } - l = len(x.Amount) - if l > 0 { + if x.Body != nil { + l = options.Size(x.Body) n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.LimitPrice) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.ParingId != 0 { + n += 1 + runtime.Sov(uint64(x.ParingId)) } - l = len(x.StopPrice) + l = len(x.Signature) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Expiry != nil { - l = options.Size(x.Expiry) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -496,7 +397,7 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*OrderBody) + x := input.Message.Interface().(*Order) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -515,8 +416,20 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Expiry != nil { - encoded, err := options.Marshal(x.Expiry) + if len(x.Signature) > 0 { + i -= len(x.Signature) + copy(dAtA[i:], x.Signature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) + i-- + dAtA[i] = 0x2a + } + if x.ParingId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ParingId)) + i-- + dAtA[i] = 0x20 + } + if x.Body != nil { + encoded, err := options.Marshal(x.Body) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -527,57 +440,19 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x4a - } - if len(x.StopPrice) > 0 { - i -= len(x.StopPrice) - copy(dAtA[i:], x.StopPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StopPrice))) - i-- - dAtA[i] = 0x42 - } - if len(x.LimitPrice) > 0 { - i -= len(x.LimitPrice) - copy(dAtA[i:], x.LimitPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LimitPrice))) - i-- - dAtA[i] = 0x3a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x32 - } - if x.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) - i-- - dAtA[i] = 0x28 - } - if x.Direction != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Direction)) - i-- - dAtA[i] = 0x20 - } - if len(x.QuoteDenom) > 0 { - i -= len(x.QuoteDenom) - copy(dAtA[i:], x.QuoteDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QuoteDenom))) - i-- dAtA[i] = 0x1a } - if len(x.BaseDenom) > 0 { - i -= len(x.BaseDenom) - copy(dAtA[i:], x.BaseDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + if len(x.User) > 0 { + i -= len(x.User) + copy(dAtA[i:], x.User) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.User))) i-- dAtA[i] = 0x12 } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) i-- dAtA[i] = 0xa } @@ -592,7 +467,7 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*OrderBody) + x := input.Message.Interface().(*Order) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -624,15 +499,15 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderBody: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Order: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderBody: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -660,11 +535,11 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Address = string(dAtA[iNdEx:postIndex]) + x.Index = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field User", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -692,13 +567,13 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.BaseDenom = string(dAtA[iNdEx:postIndex]) + x.User = 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 QuoteDenom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -708,29 +583,33 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen 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.QuoteDenom = string(dAtA[iNdEx:postIndex]) + if x.Body == nil { + x.Body = &OrderBody{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Body); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex case 4: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParingId", wireType) } - x.Direction = 0 + x.ParingId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -740,35 +619,16 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Direction |= OrderDirection(b&0x7F) << shift + x.ParingId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - x.Type_ = 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.Type_ |= OrderType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -778,132 +638,34 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen 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.Amount = string(dAtA[iNdEx:postIndex]) + x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) + if x.Signature == nil { + x.Signature = []byte{} + } iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LimitPrice", wireType) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if 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.LimitPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StopPrice", 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.StopPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) - } - var msglen int - 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++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - 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.Expiry == nil { - x.Expiry = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiry); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF @@ -932,29 +694,41 @@ func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { } var ( - md_Order protoreflect.MessageDescriptor - fd_Order_body protoreflect.FieldDescriptor - fd_Order_paring_id protoreflect.FieldDescriptor - fd_Order_signature protoreflect.FieldDescriptor + md_OrderBody protoreflect.MessageDescriptor + fd_OrderBody_address protoreflect.FieldDescriptor + fd_OrderBody_base_denom protoreflect.FieldDescriptor + fd_OrderBody_quote_denom protoreflect.FieldDescriptor + fd_OrderBody_direction protoreflect.FieldDescriptor + fd_OrderBody_type protoreflect.FieldDescriptor + fd_OrderBody_amount protoreflect.FieldDescriptor + fd_OrderBody_limit_price protoreflect.FieldDescriptor + fd_OrderBody_stop_price protoreflect.FieldDescriptor + fd_OrderBody_expiry protoreflect.FieldDescriptor ) func init() { file_gluon_contract_order_proto_init() - md_Order = File_gluon_contract_order_proto.Messages().ByName("Order") - fd_Order_body = md_Order.Fields().ByName("body") - fd_Order_paring_id = md_Order.Fields().ByName("paring_id") - fd_Order_signature = md_Order.Fields().ByName("signature") + md_OrderBody = File_gluon_contract_order_proto.Messages().ByName("OrderBody") + fd_OrderBody_address = md_OrderBody.Fields().ByName("address") + fd_OrderBody_base_denom = md_OrderBody.Fields().ByName("base_denom") + fd_OrderBody_quote_denom = md_OrderBody.Fields().ByName("quote_denom") + fd_OrderBody_direction = md_OrderBody.Fields().ByName("direction") + fd_OrderBody_type = md_OrderBody.Fields().ByName("type") + fd_OrderBody_amount = md_OrderBody.Fields().ByName("amount") + fd_OrderBody_limit_price = md_OrderBody.Fields().ByName("limit_price") + fd_OrderBody_stop_price = md_OrderBody.Fields().ByName("stop_price") + fd_OrderBody_expiry = md_OrderBody.Fields().ByName("expiry") } -var _ protoreflect.Message = (*fastReflection_Order)(nil) +var _ protoreflect.Message = (*fastReflection_OrderBody)(nil) -type fastReflection_Order Order +type fastReflection_OrderBody OrderBody -func (x *Order) ProtoReflect() protoreflect.Message { - return (*fastReflection_Order)(x) +func (x *OrderBody) ProtoReflect() protoreflect.Message { + return (*fastReflection_OrderBody)(x) } -func (x *Order) slowProtoReflect() protoreflect.Message { +func (x *OrderBody) slowProtoReflect() protoreflect.Message { mi := &file_gluon_contract_order_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -966,43 +740,43 @@ func (x *Order) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Order_messageType fastReflection_Order_messageType -var _ protoreflect.MessageType = fastReflection_Order_messageType{} +var _fastReflection_OrderBody_messageType fastReflection_OrderBody_messageType +var _ protoreflect.MessageType = fastReflection_OrderBody_messageType{} -type fastReflection_Order_messageType struct{} +type fastReflection_OrderBody_messageType struct{} -func (x fastReflection_Order_messageType) Zero() protoreflect.Message { - return (*fastReflection_Order)(nil) +func (x fastReflection_OrderBody_messageType) Zero() protoreflect.Message { + return (*fastReflection_OrderBody)(nil) } -func (x fastReflection_Order_messageType) New() protoreflect.Message { - return new(fastReflection_Order) +func (x fastReflection_OrderBody_messageType) New() protoreflect.Message { + return new(fastReflection_OrderBody) } -func (x fastReflection_Order_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Order +func (x fastReflection_OrderBody_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OrderBody } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Order) Descriptor() protoreflect.MessageDescriptor { - return md_Order +func (x *fastReflection_OrderBody) Descriptor() protoreflect.MessageDescriptor { + return md_OrderBody } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_Order) Type() protoreflect.MessageType { - return _fastReflection_Order_messageType +func (x *fastReflection_OrderBody) Type() protoreflect.MessageType { + return _fastReflection_OrderBody_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Order) New() protoreflect.Message { - return new(fastReflection_Order) +func (x *fastReflection_OrderBody) New() protoreflect.Message { + return new(fastReflection_OrderBody) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Order) Interface() protoreflect.ProtoMessage { - return (*Order)(x) +func (x *fastReflection_OrderBody) Interface() protoreflect.ProtoMessage { + return (*OrderBody)(x) } // Range iterates over every populated field in an undefined order, @@ -1010,22 +784,58 @@ func (x *fastReflection_Order) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Order) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Body != nil { - value := protoreflect.ValueOfMessage(x.Body.ProtoReflect()) - if !f(fd_Order_body, value) { +func (x *fastReflection_OrderBody) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_OrderBody_address, value) { return } } - if x.ParingId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ParingId) - if !f(fd_Order_paring_id, value) { + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_OrderBody_base_denom, value) { return } } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_Order_signature, value) { + if x.QuoteDenom != "" { + value := protoreflect.ValueOfString(x.QuoteDenom) + if !f(fd_OrderBody_quote_denom, value) { + return + } + } + if x.Direction != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Direction)) + if !f(fd_OrderBody_direction, value) { + return + } + } + if x.Type_ != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) + if !f(fd_OrderBody_type, value) { + return + } + } + if x.Amount != "" { + value := protoreflect.ValueOfString(x.Amount) + if !f(fd_OrderBody_amount, value) { + return + } + } + if x.LimitPrice != "" { + value := protoreflect.ValueOfString(x.LimitPrice) + if !f(fd_OrderBody_limit_price, value) { + return + } + } + if x.StopPrice != "" { + value := protoreflect.ValueOfString(x.StopPrice) + if !f(fd_OrderBody_stop_price, value) { + return + } + } + if x.Expiry != nil { + value := protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + if !f(fd_OrderBody_expiry, value) { return } } @@ -1042,19 +852,31 @@ func (x *fastReflection_Order) Range(f func(protoreflect.FieldDescriptor, protor // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Order) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_OrderBody) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "gluon.contract.Order.body": - return x.Body != nil - case "gluon.contract.Order.paring_id": - return x.ParingId != uint64(0) - case "gluon.contract.Order.signature": - return len(x.Signature) != 0 + case "gluon.contract.OrderBody.address": + return x.Address != "" + case "gluon.contract.OrderBody.base_denom": + return x.BaseDenom != "" + case "gluon.contract.OrderBody.quote_denom": + return x.QuoteDenom != "" + case "gluon.contract.OrderBody.direction": + return x.Direction != 0 + case "gluon.contract.OrderBody.type": + return x.Type_ != 0 + case "gluon.contract.OrderBody.amount": + return x.Amount != "" + case "gluon.contract.OrderBody.limit_price": + return x.LimitPrice != "" + case "gluon.contract.OrderBody.stop_price": + return x.StopPrice != "" + case "gluon.contract.OrderBody.expiry": + return x.Expiry != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) } - panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) } } @@ -1064,19 +886,31 @@ func (x *fastReflection_Order) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Order) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_OrderBody) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "gluon.contract.Order.body": - x.Body = nil - case "gluon.contract.Order.paring_id": - x.ParingId = uint64(0) - case "gluon.contract.Order.signature": - x.Signature = nil + case "gluon.contract.OrderBody.address": + x.Address = "" + case "gluon.contract.OrderBody.base_denom": + x.BaseDenom = "" + case "gluon.contract.OrderBody.quote_denom": + x.QuoteDenom = "" + case "gluon.contract.OrderBody.direction": + x.Direction = 0 + case "gluon.contract.OrderBody.type": + x.Type_ = 0 + case "gluon.contract.OrderBody.amount": + x.Amount = "" + case "gluon.contract.OrderBody.limit_price": + x.LimitPrice = "" + case "gluon.contract.OrderBody.stop_price": + x.StopPrice = "" + case "gluon.contract.OrderBody.expiry": + x.Expiry = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) } - panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) } } @@ -1086,22 +920,40 @@ func (x *fastReflection_Order) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Order) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OrderBody) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "gluon.contract.Order.body": - value := x.Body + case "gluon.contract.OrderBody.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.quote_denom": + value := x.QuoteDenom + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.direction": + value := x.Direction + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "gluon.contract.OrderBody.type": + value := x.Type_ + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "gluon.contract.OrderBody.amount": + value := x.Amount + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.limit_price": + value := x.LimitPrice + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.stop_price": + value := x.StopPrice + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.expiry": + value := x.Expiry return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "gluon.contract.Order.paring_id": - value := x.ParingId - return protoreflect.ValueOfUint64(value) - case "gluon.contract.Order.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) } - panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", descriptor.FullName())) } } @@ -1115,19 +967,31 @@ func (x *fastReflection_Order) Get(descriptor protoreflect.FieldDescriptor) prot // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Order) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_OrderBody) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "gluon.contract.Order.body": - x.Body = value.Message().Interface().(*OrderBody) - case "gluon.contract.Order.paring_id": - x.ParingId = value.Uint() - case "gluon.contract.Order.signature": - x.Signature = value.Bytes() + case "gluon.contract.OrderBody.address": + x.Address = value.Interface().(string) + case "gluon.contract.OrderBody.base_denom": + x.BaseDenom = value.Interface().(string) + case "gluon.contract.OrderBody.quote_denom": + x.QuoteDenom = value.Interface().(string) + case "gluon.contract.OrderBody.direction": + x.Direction = (OrderDirection)(value.Enum()) + case "gluon.contract.OrderBody.type": + x.Type_ = (OrderType)(value.Enum()) + case "gluon.contract.OrderBody.amount": + x.Amount = value.Interface().(string) + case "gluon.contract.OrderBody.limit_price": + x.LimitPrice = value.Interface().(string) + case "gluon.contract.OrderBody.stop_price": + x.StopPrice = value.Interface().(string) + case "gluon.contract.OrderBody.expiry": + x.Expiry = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) } - panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) } } @@ -1141,52 +1005,76 @@ func (x *fastReflection_Order) Set(fd protoreflect.FieldDescriptor, value protor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Order) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OrderBody) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "gluon.contract.Order.body": - if x.Body == nil { - x.Body = new(OrderBody) + case "gluon.contract.OrderBody.expiry": + if x.Expiry == nil { + x.Expiry = new(timestamppb.Timestamp) } - return protoreflect.ValueOfMessage(x.Body.ProtoReflect()) - case "gluon.contract.Order.paring_id": - panic(fmt.Errorf("field paring_id of message gluon.contract.Order is not mutable")) - case "gluon.contract.Order.signature": - panic(fmt.Errorf("field signature of message gluon.contract.Order is not mutable")) + return protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + case "gluon.contract.OrderBody.address": + panic(fmt.Errorf("field address of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.base_denom": + panic(fmt.Errorf("field base_denom of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.quote_denom": + panic(fmt.Errorf("field quote_denom of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.direction": + panic(fmt.Errorf("field direction of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.type": + panic(fmt.Errorf("field type of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.amount": + panic(fmt.Errorf("field amount of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.limit_price": + panic(fmt.Errorf("field limit_price of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.stop_price": + panic(fmt.Errorf("field stop_price of message gluon.contract.OrderBody is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) } - panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Order) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OrderBody) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "gluon.contract.Order.body": - m := new(OrderBody) + case "gluon.contract.OrderBody.address": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.base_denom": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.quote_denom": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.direction": + return protoreflect.ValueOfEnum(0) + case "gluon.contract.OrderBody.type": + return protoreflect.ValueOfEnum(0) + case "gluon.contract.OrderBody.amount": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.limit_price": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.stop_price": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.expiry": + m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "gluon.contract.Order.paring_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "gluon.contract.Order.signature": - return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.Order")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) } - panic(fmt.Errorf("message gluon.contract.Order does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Order) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_OrderBody) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in gluon.contract.Order", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.OrderBody", d.FullName())) } panic("unreachable") } @@ -1194,7 +1082,7 @@ func (x *fastReflection_Order) WhichOneof(d protoreflect.OneofDescriptor) protor // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Order) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_OrderBody) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1205,7 +1093,7 @@ func (x *fastReflection_Order) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Order) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_OrderBody) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1217,7 +1105,7 @@ func (x *fastReflection_Order) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Order) IsValid() bool { +func (x *fastReflection_OrderBody) IsValid() bool { return x != nil } @@ -1227,9 +1115,9 @@ func (x *fastReflection_Order) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Order) + x := input.Message.Interface().(*OrderBody) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1241,17 +1129,40 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Body != nil { - l = options.Size(x.Body) + l = len(x.Address) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.ParingId != 0 { - n += 1 + runtime.Sov(uint64(x.ParingId)) + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Signature) + l = len(x.QuoteDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Direction != 0 { + n += 1 + runtime.Sov(uint64(x.Direction)) + } + if x.Type_ != 0 { + n += 1 + runtime.Sov(uint64(x.Type_)) + } + l = len(x.Amount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.LimitPrice) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.StopPrice) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.Expiry != nil { + l = options.Size(x.Expiry) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1262,7 +1173,7 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Order) + x := input.Message.Interface().(*OrderBody) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1281,20 +1192,8 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x1a - } - if x.ParingId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ParingId)) - i-- - dAtA[i] = 0x10 - } - if x.Body != nil { - encoded, err := options.Marshal(x.Body) + if x.Expiry != nil { + encoded, err := options.Marshal(x.Expiry) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1305,6 +1204,58 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- + dAtA[i] = 0x4a + } + if len(x.StopPrice) > 0 { + i -= len(x.StopPrice) + copy(dAtA[i:], x.StopPrice) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StopPrice))) + i-- + dAtA[i] = 0x42 + } + if len(x.LimitPrice) > 0 { + i -= len(x.LimitPrice) + copy(dAtA[i:], x.LimitPrice) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LimitPrice))) + i-- + dAtA[i] = 0x3a + } + if len(x.Amount) > 0 { + i -= len(x.Amount) + copy(dAtA[i:], x.Amount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + i-- + dAtA[i] = 0x32 + } + if x.Type_ != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) + i-- + dAtA[i] = 0x28 + } + if x.Direction != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Direction)) + i-- + dAtA[i] = 0x20 + } + if len(x.QuoteDenom) > 0 { + i -= len(x.QuoteDenom) + copy(dAtA[i:], x.QuoteDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QuoteDenom))) + i-- + dAtA[i] = 0x1a + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -1318,7 +1269,7 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Order) + x := input.Message.Interface().(*OrderBody) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1337,30 +1288,164 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { 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 + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderBody: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderBody: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", 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.BaseDenom = 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 QuoteDenom", 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.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) + } + x.Direction = 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.Direction |= OrderDirection(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Order: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + x.Type_ = 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.Type_ |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 @@ -1370,33 +1455,61 @@ func (x *fastReflection_Order) 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.Body == nil { - x.Body = &OrderBody{} + x.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LimitPrice", wireType) } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Body); 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.LimitPrice = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParingId", wireType) + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StopPrice", wireType) } - x.ParingId = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1406,16 +1519,29 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.ParingId |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 3: + 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.StopPrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1425,24 +1551,26 @@ func (x *fastReflection_Order) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen 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.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} + if x.Expiry == nil { + x.Expiry = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiry); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: @@ -1588,6 +1716,73 @@ func (OrderType) EnumDescriptor() ([]byte, []int) { return file_gluon_contract_order_proto_rawDescGZIP(), []int{1} } +type Order struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + Body *OrderBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + ParingId uint64 `protobuf:"varint,4,opt,name=paring_id,json=paringId,proto3" json:"paring_id,omitempty"` + Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *Order) Reset() { + *x = Order{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_order_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Order) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Order) ProtoMessage() {} + +// Deprecated: Use Order.ProtoReflect.Descriptor instead. +func (*Order) Descriptor() ([]byte, []int) { + return file_gluon_contract_order_proto_rawDescGZIP(), []int{0} +} + +func (x *Order) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +func (x *Order) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *Order) GetBody() *OrderBody { + if x != nil { + return x.Body + } + return nil +} + +func (x *Order) GetParingId() uint64 { + if x != nil { + return x.ParingId + } + return 0 +} + +func (x *Order) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + type OrderBody struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1607,7 +1802,7 @@ type OrderBody struct { func (x *OrderBody) Reset() { *x = OrderBody{} if protoimpl.UnsafeEnabled { - mi := &file_gluon_contract_order_proto_msgTypes[0] + mi := &file_gluon_contract_order_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1621,7 +1816,7 @@ func (*OrderBody) ProtoMessage() {} // Deprecated: Use OrderBody.ProtoReflect.Descriptor instead. func (*OrderBody) Descriptor() ([]byte, []int) { - return file_gluon_contract_order_proto_rawDescGZIP(), []int{0} + return file_gluon_contract_order_proto_rawDescGZIP(), []int{1} } func (x *OrderBody) GetAddress() string { @@ -1687,57 +1882,6 @@ func (x *OrderBody) GetExpiry() *timestamppb.Timestamp { return nil } -type Order struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *OrderBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - ParingId uint64 `protobuf:"varint,2,opt,name=paring_id,json=paringId,proto3" json:"paring_id,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *Order) Reset() { - *x = Order{} - if protoimpl.UnsafeEnabled { - mi := &file_gluon_contract_order_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Order) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Order) ProtoMessage() {} - -// Deprecated: Use Order.ProtoReflect.Descriptor instead. -func (*Order) Descriptor() ([]byte, []int) { - return file_gluon_contract_order_proto_rawDescGZIP(), []int{1} -} - -func (x *Order) GetBody() *OrderBody { - if x != nil { - return x.Body - } - return nil -} - -func (x *Order) GetParingId() uint64 { - if x != nil { - return x.ParingId - } - return 0 -} - -func (x *Order) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - var File_gluon_contract_order_proto protoreflect.FileDescriptor var file_gluon_contract_order_proto_rawDesc = []byte{ @@ -1750,64 +1894,66 @@ var file_gluon_contract_order_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa4, 0x04, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x44, 0x65, - 0x6e, 0x6f, 0x6d, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x19, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x0b, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x36, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, - 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, - 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x09, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, - 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x77, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, 0x72, 0x69, 0x6e, - 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x2a, 0x30, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x42, 0x55, 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4c, - 0x4c, 0x10, 0x02, 0x2a, 0x21, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x4c, 0x41, 0x5a, 0x59, 0x10, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, - 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x0a, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, - 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0xa2, 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, - 0x75, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, - 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, - 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, - 0x6f, 0x6e, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, + 0x61, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xa4, 0x04, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, + 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, + 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x6c, 0x75, + 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, + 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x57, + 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, + 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3c, + 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x2a, 0x30, 0x0a, 0x0e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42, + 0x55, 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4c, 0x4c, 0x10, 0x02, 0x2a, 0x21, + 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x41, 0x5a, 0x59, 0x10, + 0x01, 0x42, 0x93, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0xa2, 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, 0x6e, + 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1827,15 +1973,15 @@ var file_gluon_contract_order_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_gluon_contract_order_proto_goTypes = []interface{}{ (OrderDirection)(0), // 0: gluon.contract.OrderDirection (OrderType)(0), // 1: gluon.contract.OrderType - (*OrderBody)(nil), // 2: gluon.contract.OrderBody - (*Order)(nil), // 3: gluon.contract.Order + (*Order)(nil), // 2: gluon.contract.Order + (*OrderBody)(nil), // 3: gluon.contract.OrderBody (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp } var file_gluon_contract_order_proto_depIdxs = []int32{ - 0, // 0: gluon.contract.OrderBody.direction:type_name -> gluon.contract.OrderDirection - 1, // 1: gluon.contract.OrderBody.type:type_name -> gluon.contract.OrderType - 4, // 2: gluon.contract.OrderBody.expiry:type_name -> google.protobuf.Timestamp - 2, // 3: gluon.contract.Order.body:type_name -> gluon.contract.OrderBody + 3, // 0: gluon.contract.Order.body:type_name -> gluon.contract.OrderBody + 0, // 1: gluon.contract.OrderBody.direction:type_name -> gluon.contract.OrderDirection + 1, // 2: gluon.contract.OrderBody.type:type_name -> gluon.contract.OrderType + 4, // 3: gluon.contract.OrderBody.expiry:type_name -> google.protobuf.Timestamp 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -1850,7 +1996,7 @@ func file_gluon_contract_order_proto_init() { } if !protoimpl.UnsafeEnabled { file_gluon_contract_order_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderBody); i { + switch v := v.(*Order); i { case 0: return &v.state case 1: @@ -1862,7 +2008,7 @@ func file_gluon_contract_order_proto_init() { } } file_gluon_contract_order_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Order); i { + switch v := v.(*OrderBody); i { case 0: return &v.state case 1: diff --git a/api/gluon/contract/order_old.pulsar.go b/api/gluon/contract/order_old.pulsar.go new file mode 100644 index 0000000..1bfd6da --- /dev/null +++ b/api/gluon/contract/order_old.pulsar.go @@ -0,0 +1,1897 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package contract + +import ( + fmt "fmt" + io "io" + reflect "reflect" + sync "sync" + + _ "cosmossdk.io/api/amino" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +var ( + md_OrderBody protoreflect.MessageDescriptor + fd_OrderBody_address protoreflect.FieldDescriptor + fd_OrderBody_base_denom protoreflect.FieldDescriptor + fd_OrderBody_quote_denom protoreflect.FieldDescriptor + fd_OrderBody_direction protoreflect.FieldDescriptor + fd_OrderBody_type protoreflect.FieldDescriptor + fd_OrderBody_amount protoreflect.FieldDescriptor + fd_OrderBody_limit_price protoreflect.FieldDescriptor + fd_OrderBody_stop_price protoreflect.FieldDescriptor + fd_OrderBody_expiry protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_order_old_proto_init() + md_OrderBody = File_gluon_contract_order_old_proto.Messages().ByName("OrderBody") + fd_OrderBody_address = md_OrderBody.Fields().ByName("address") + fd_OrderBody_base_denom = md_OrderBody.Fields().ByName("base_denom") + fd_OrderBody_quote_denom = md_OrderBody.Fields().ByName("quote_denom") + fd_OrderBody_direction = md_OrderBody.Fields().ByName("direction") + fd_OrderBody_type = md_OrderBody.Fields().ByName("type") + fd_OrderBody_amount = md_OrderBody.Fields().ByName("amount") + fd_OrderBody_limit_price = md_OrderBody.Fields().ByName("limit_price") + fd_OrderBody_stop_price = md_OrderBody.Fields().ByName("stop_price") + fd_OrderBody_expiry = md_OrderBody.Fields().ByName("expiry") +} + +var _ protoreflect.Message = (*fastReflection_OrderBody)(nil) + +type fastReflection_OrderBody OrderBody + +func (x *OrderBody) ProtoReflect() protoreflect.Message { + return (*fastReflection_OrderBody)(x) +} + +func (x *OrderBody) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_order_old_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_OrderBody_messageType fastReflection_OrderBody_messageType +var _ protoreflect.MessageType = fastReflection_OrderBody_messageType{} + +type fastReflection_OrderBody_messageType struct{} + +func (x fastReflection_OrderBody_messageType) Zero() protoreflect.Message { + return (*fastReflection_OrderBody)(nil) +} +func (x fastReflection_OrderBody_messageType) New() protoreflect.Message { + return new(fastReflection_OrderBody) +} +func (x fastReflection_OrderBody_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OrderBody +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_OrderBody) Descriptor() protoreflect.MessageDescriptor { + return md_OrderBody +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_OrderBody) Type() protoreflect.MessageType { + return _fastReflection_OrderBody_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_OrderBody) New() protoreflect.Message { + return new(fastReflection_OrderBody) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_OrderBody) Interface() protoreflect.ProtoMessage { + return (*OrderBody)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_OrderBody) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_OrderBody_address, value) { + return + } + } + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_OrderBody_base_denom, value) { + return + } + } + if x.QuoteDenom != "" { + value := protoreflect.ValueOfString(x.QuoteDenom) + if !f(fd_OrderBody_quote_denom, value) { + return + } + } + if x.Direction != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Direction)) + if !f(fd_OrderBody_direction, value) { + return + } + } + if x.Type_ != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) + if !f(fd_OrderBody_type, value) { + return + } + } + if x.Amount != "" { + value := protoreflect.ValueOfString(x.Amount) + if !f(fd_OrderBody_amount, value) { + return + } + } + if x.LimitPrice != "" { + value := protoreflect.ValueOfString(x.LimitPrice) + if !f(fd_OrderBody_limit_price, value) { + return + } + } + if x.StopPrice != "" { + value := protoreflect.ValueOfString(x.StopPrice) + if !f(fd_OrderBody_stop_price, value) { + return + } + } + if x.Expiry != nil { + value := protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + if !f(fd_OrderBody_expiry, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_OrderBody) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.OrderBody.address": + return x.Address != "" + case "gluon.contract.OrderBody.base_denom": + return x.BaseDenom != "" + case "gluon.contract.OrderBody.quote_denom": + return x.QuoteDenom != "" + case "gluon.contract.OrderBody.direction": + return x.Direction != 0 + case "gluon.contract.OrderBody.type": + return x.Type_ != 0 + case "gluon.contract.OrderBody.amount": + return x.Amount != "" + case "gluon.contract.OrderBody.limit_price": + return x.LimitPrice != "" + case "gluon.contract.OrderBody.stop_price": + return x.StopPrice != "" + case "gluon.contract.OrderBody.expiry": + return x.Expiry != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + } + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderBody) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.OrderBody.address": + x.Address = "" + case "gluon.contract.OrderBody.base_denom": + x.BaseDenom = "" + case "gluon.contract.OrderBody.quote_denom": + x.QuoteDenom = "" + case "gluon.contract.OrderBody.direction": + x.Direction = 0 + case "gluon.contract.OrderBody.type": + x.Type_ = 0 + case "gluon.contract.OrderBody.amount": + x.Amount = "" + case "gluon.contract.OrderBody.limit_price": + x.LimitPrice = "" + case "gluon.contract.OrderBody.stop_price": + x.StopPrice = "" + case "gluon.contract.OrderBody.expiry": + x.Expiry = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + } + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_OrderBody) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.OrderBody.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.quote_denom": + value := x.QuoteDenom + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.direction": + value := x.Direction + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "gluon.contract.OrderBody.type": + value := x.Type_ + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "gluon.contract.OrderBody.amount": + value := x.Amount + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.limit_price": + value := x.LimitPrice + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.stop_price": + value := x.StopPrice + return protoreflect.ValueOfString(value) + case "gluon.contract.OrderBody.expiry": + value := x.Expiry + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + } + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderBody) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.OrderBody.address": + x.Address = value.Interface().(string) + case "gluon.contract.OrderBody.base_denom": + x.BaseDenom = value.Interface().(string) + case "gluon.contract.OrderBody.quote_denom": + x.QuoteDenom = value.Interface().(string) + case "gluon.contract.OrderBody.direction": + x.Direction = (OrderDirection)(value.Enum()) + case "gluon.contract.OrderBody.type": + x.Type_ = (OrderType)(value.Enum()) + case "gluon.contract.OrderBody.amount": + x.Amount = value.Interface().(string) + case "gluon.contract.OrderBody.limit_price": + x.LimitPrice = value.Interface().(string) + case "gluon.contract.OrderBody.stop_price": + x.StopPrice = value.Interface().(string) + case "gluon.contract.OrderBody.expiry": + x.Expiry = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + } + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderBody) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.OrderBody.expiry": + if x.Expiry == nil { + x.Expiry = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Expiry.ProtoReflect()) + case "gluon.contract.OrderBody.address": + panic(fmt.Errorf("field address of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.base_denom": + panic(fmt.Errorf("field base_denom of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.quote_denom": + panic(fmt.Errorf("field quote_denom of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.direction": + panic(fmt.Errorf("field direction of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.type": + panic(fmt.Errorf("field type of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.amount": + panic(fmt.Errorf("field amount of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.limit_price": + panic(fmt.Errorf("field limit_price of message gluon.contract.OrderBody is not mutable")) + case "gluon.contract.OrderBody.stop_price": + panic(fmt.Errorf("field stop_price of message gluon.contract.OrderBody is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + } + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_OrderBody) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.OrderBody.address": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.base_denom": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.quote_denom": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.direction": + return protoreflect.ValueOfEnum(0) + case "gluon.contract.OrderBody.type": + return protoreflect.ValueOfEnum(0) + case "gluon.contract.OrderBody.amount": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.limit_price": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.stop_price": + return protoreflect.ValueOfString("") + case "gluon.contract.OrderBody.expiry": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderBody")) + } + panic(fmt.Errorf("message gluon.contract.OrderBody does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_OrderBody) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.OrderBody", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_OrderBody) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderBody) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_OrderBody) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_OrderBody) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*OrderBody) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.QuoteDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Direction != 0 { + n += 1 + runtime.Sov(uint64(x.Direction)) + } + if x.Type_ != 0 { + n += 1 + runtime.Sov(uint64(x.Type_)) + } + l = len(x.Amount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.LimitPrice) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.StopPrice) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Expiry != nil { + l = options.Size(x.Expiry) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*OrderBody) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Expiry != nil { + encoded, err := options.Marshal(x.Expiry) + 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))) + i-- + dAtA[i] = 0x4a + } + if len(x.StopPrice) > 0 { + i -= len(x.StopPrice) + copy(dAtA[i:], x.StopPrice) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StopPrice))) + i-- + dAtA[i] = 0x42 + } + if len(x.LimitPrice) > 0 { + i -= len(x.LimitPrice) + copy(dAtA[i:], x.LimitPrice) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LimitPrice))) + i-- + dAtA[i] = 0x3a + } + if len(x.Amount) > 0 { + i -= len(x.Amount) + copy(dAtA[i:], x.Amount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + i-- + dAtA[i] = 0x32 + } + if x.Type_ != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) + i-- + dAtA[i] = 0x28 + } + if x.Direction != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Direction)) + i-- + dAtA[i] = 0x20 + } + if len(x.QuoteDenom) > 0 { + i -= len(x.QuoteDenom) + copy(dAtA[i:], x.QuoteDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QuoteDenom))) + i-- + dAtA[i] = 0x1a + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*OrderBody) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderBody: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderBody: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", 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.BaseDenom = 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 QuoteDenom", 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.QuoteDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) + } + x.Direction = 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.Direction |= OrderDirection(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) + } + x.Type_ = 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.Type_ |= OrderType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LimitPrice", 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.LimitPrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StopPrice", 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.StopPrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Expiry == nil { + x.Expiry = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiry); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_OrderOld protoreflect.MessageDescriptor + fd_OrderOld_body protoreflect.FieldDescriptor + fd_OrderOld_paring_id protoreflect.FieldDescriptor + fd_OrderOld_signature protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_order_old_proto_init() + md_OrderOld = File_gluon_contract_order_old_proto.Messages().ByName("OrderOld") + fd_OrderOld_body = md_OrderOld.Fields().ByName("body") + fd_OrderOld_paring_id = md_OrderOld.Fields().ByName("paring_id") + fd_OrderOld_signature = md_OrderOld.Fields().ByName("signature") +} + +var _ protoreflect.Message = (*fastReflection_OrderOld)(nil) + +type fastReflection_OrderOld OrderOld + +func (x *OrderOld) ProtoReflect() protoreflect.Message { + return (*fastReflection_OrderOld)(x) +} + +func (x *OrderOld) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_order_old_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_OrderOld_messageType fastReflection_OrderOld_messageType +var _ protoreflect.MessageType = fastReflection_OrderOld_messageType{} + +type fastReflection_OrderOld_messageType struct{} + +func (x fastReflection_OrderOld_messageType) Zero() protoreflect.Message { + return (*fastReflection_OrderOld)(nil) +} +func (x fastReflection_OrderOld_messageType) New() protoreflect.Message { + return new(fastReflection_OrderOld) +} +func (x fastReflection_OrderOld_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OrderOld +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_OrderOld) Descriptor() protoreflect.MessageDescriptor { + return md_OrderOld +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_OrderOld) Type() protoreflect.MessageType { + return _fastReflection_OrderOld_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_OrderOld) New() protoreflect.Message { + return new(fastReflection_OrderOld) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_OrderOld) Interface() protoreflect.ProtoMessage { + return (*OrderOld)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_OrderOld) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Body != nil { + value := protoreflect.ValueOfMessage(x.Body.ProtoReflect()) + if !f(fd_OrderOld_body, value) { + return + } + } + if x.ParingId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ParingId) + if !f(fd_OrderOld_paring_id, value) { + return + } + } + if len(x.Signature) != 0 { + value := protoreflect.ValueOfBytes(x.Signature) + if !f(fd_OrderOld_signature, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_OrderOld) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.OrderOld.body": + return x.Body != nil + case "gluon.contract.OrderOld.paring_id": + return x.ParingId != uint64(0) + case "gluon.contract.OrderOld.signature": + return len(x.Signature) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderOld")) + } + panic(fmt.Errorf("message gluon.contract.OrderOld does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderOld) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.OrderOld.body": + x.Body = nil + case "gluon.contract.OrderOld.paring_id": + x.ParingId = uint64(0) + case "gluon.contract.OrderOld.signature": + x.Signature = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderOld")) + } + panic(fmt.Errorf("message gluon.contract.OrderOld does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_OrderOld) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.OrderOld.body": + value := x.Body + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "gluon.contract.OrderOld.paring_id": + value := x.ParingId + return protoreflect.ValueOfUint64(value) + case "gluon.contract.OrderOld.signature": + value := x.Signature + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderOld")) + } + panic(fmt.Errorf("message gluon.contract.OrderOld does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderOld) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.OrderOld.body": + x.Body = value.Message().Interface().(*OrderBody) + case "gluon.contract.OrderOld.paring_id": + x.ParingId = value.Uint() + case "gluon.contract.OrderOld.signature": + x.Signature = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderOld")) + } + panic(fmt.Errorf("message gluon.contract.OrderOld does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderOld) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.OrderOld.body": + if x.Body == nil { + x.Body = new(OrderBody) + } + return protoreflect.ValueOfMessage(x.Body.ProtoReflect()) + case "gluon.contract.OrderOld.paring_id": + panic(fmt.Errorf("field paring_id of message gluon.contract.OrderOld is not mutable")) + case "gluon.contract.OrderOld.signature": + panic(fmt.Errorf("field signature of message gluon.contract.OrderOld is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderOld")) + } + panic(fmt.Errorf("message gluon.contract.OrderOld does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_OrderOld) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.OrderOld.body": + m := new(OrderBody) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "gluon.contract.OrderOld.paring_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "gluon.contract.OrderOld.signature": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.OrderOld")) + } + panic(fmt.Errorf("message gluon.contract.OrderOld does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_OrderOld) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.OrderOld", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_OrderOld) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OrderOld) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_OrderOld) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_OrderOld) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*OrderOld) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Body != nil { + l = options.Size(x.Body) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ParingId != 0 { + n += 1 + runtime.Sov(uint64(x.ParingId)) + } + l = len(x.Signature) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*OrderOld) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signature) > 0 { + i -= len(x.Signature) + copy(dAtA[i:], x.Signature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) + i-- + dAtA[i] = 0x1a + } + if x.ParingId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ParingId)) + i-- + dAtA[i] = 0x10 + } + if x.Body != nil { + encoded, err := options.Marshal(x.Body) + 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))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*OrderOld) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderOld: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OrderOld: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Body == nil { + x.Body = &OrderBody{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Body); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParingId", wireType) + } + x.ParingId = 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.ParingId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + 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++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) + if x.Signature == nil { + x.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: gluon/contract/order_old.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OrderDirection int32 + +const ( + OrderDirection_UNKNOWN OrderDirection = 0 + OrderDirection_BUY OrderDirection = 1 + OrderDirection_SELL OrderDirection = 2 +) + +// Enum value maps for OrderDirection. +var ( + OrderDirection_name = map[int32]string{ + 0: "UNKNOWN", + 1: "BUY", + 2: "SELL", + } + OrderDirection_value = map[string]int32{ + "UNKNOWN": 0, + "BUY": 1, + "SELL": 2, + } +) + +func (x OrderDirection) Enum() *OrderDirection { + p := new(OrderDirection) + *p = x + return p +} + +func (x OrderDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OrderDirection) Descriptor() protoreflect.EnumDescriptor { + return file_gluon_contract_order_old_proto_enumTypes[0].Descriptor() +} + +func (OrderDirection) Type() protoreflect.EnumType { + return &file_gluon_contract_order_old_proto_enumTypes[0] +} + +func (x OrderDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OrderDirection.Descriptor instead. +func (OrderDirection) EnumDescriptor() ([]byte, []int) { + return file_gluon_contract_order_old_proto_rawDescGZIP(), []int{0} +} + +type OrderType int32 + +const ( + OrderType_NORMAL OrderType = 0 + OrderType_LAZY OrderType = 1 +) + +// Enum value maps for OrderType. +var ( + OrderType_name = map[int32]string{ + 0: "NORMAL", + 1: "LAZY", + } + OrderType_value = map[string]int32{ + "NORMAL": 0, + "LAZY": 1, + } +) + +func (x OrderType) Enum() *OrderType { + p := new(OrderType) + *p = x + return p +} + +func (x OrderType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OrderType) Descriptor() protoreflect.EnumDescriptor { + return file_gluon_contract_order_old_proto_enumTypes[1].Descriptor() +} + +func (OrderType) Type() protoreflect.EnumType { + return &file_gluon_contract_order_old_proto_enumTypes[1] +} + +func (x OrderType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OrderType.Descriptor instead. +func (OrderType) EnumDescriptor() ([]byte, []int) { + return file_gluon_contract_order_old_proto_rawDescGZIP(), []int{1} +} + +type OrderBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + BaseDenom string `protobuf:"bytes,2,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + QuoteDenom string `protobuf:"bytes,3,opt,name=quote_denom,json=quoteDenom,proto3" json:"quote_denom,omitempty"` + Direction OrderDirection `protobuf:"varint,4,opt,name=direction,proto3,enum=gluon.contract.OrderDirection" json:"direction,omitempty"` + Type_ OrderType `protobuf:"varint,5,opt,name=type,proto3,enum=gluon.contract.OrderType" json:"type,omitempty"` + Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` + LimitPrice string `protobuf:"bytes,7,opt,name=limit_price,json=limitPrice,proto3" json:"limit_price,omitempty"` + StopPrice string `protobuf:"bytes,8,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"` + Expiry *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (x *OrderBody) Reset() { + *x = OrderBody{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_order_old_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderBody) ProtoMessage() {} + +// Deprecated: Use OrderBody.ProtoReflect.Descriptor instead. +func (*OrderBody) Descriptor() ([]byte, []int) { + return file_gluon_contract_order_old_proto_rawDescGZIP(), []int{0} +} + +func (x *OrderBody) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *OrderBody) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *OrderBody) GetQuoteDenom() string { + if x != nil { + return x.QuoteDenom + } + return "" +} + +func (x *OrderBody) GetDirection() OrderDirection { + if x != nil { + return x.Direction + } + return OrderDirection_UNKNOWN +} + +func (x *OrderBody) GetType_() OrderType { + if x != nil { + return x.Type_ + } + return OrderType_NORMAL +} + +func (x *OrderBody) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *OrderBody) GetLimitPrice() string { + if x != nil { + return x.LimitPrice + } + return "" +} + +func (x *OrderBody) GetStopPrice() string { + if x != nil { + return x.StopPrice + } + return "" +} + +func (x *OrderBody) GetExpiry() *timestamppb.Timestamp { + if x != nil { + return x.Expiry + } + return nil +} + +type OrderOld struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Body *OrderBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + ParingId uint64 `protobuf:"varint,2,opt,name=paring_id,json=paringId,proto3" json:"paring_id,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *OrderOld) Reset() { + *x = OrderOld{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_order_old_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderOld) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderOld) ProtoMessage() {} + +// Deprecated: Use OrderOld.ProtoReflect.Descriptor instead. +func (*OrderOld) Descriptor() ([]byte, []int) { + return file_gluon_contract_order_old_proto_rawDescGZIP(), []int{1} +} + +func (x *OrderOld) GetBody() *OrderBody { + if x != nil { + return x.Body + } + return nil +} + +func (x *OrderOld) GetParingId() uint64 { + if x != nil { + return x.ParingId + } + return 0 +} + +func (x *OrderOld) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +var File_gluon_contract_order_old_proto protoreflect.FileDescriptor + +var file_gluon_contract_order_old_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x04, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, + 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, + 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x6c, 0x75, + 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, + 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, + 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x57, + 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, + 0x01, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3c, + 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x7a, 0x0a, 0x08, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4f, 0x6c, 0x64, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x6f, 0x64, + 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x70, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2a, 0x30, 0x0a, 0x0e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x55, 0x59, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4c, 0x4c, 0x10, 0x02, 0x2a, 0x21, 0x0a, 0x09, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, + 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x41, 0x5a, 0x59, 0x10, 0x01, 0x42, 0x96, 0x01, + 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x42, 0x0d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4f, 0x6c, 0x64, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xa2, + 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gluon_contract_order_old_proto_rawDescOnce sync.Once + file_gluon_contract_order_old_proto_rawDescData = file_gluon_contract_order_old_proto_rawDesc +) + +func file_gluon_contract_order_old_proto_rawDescGZIP() []byte { + file_gluon_contract_order_old_proto_rawDescOnce.Do(func() { + file_gluon_contract_order_old_proto_rawDescData = protoimpl.X.CompressGZIP(file_gluon_contract_order_old_proto_rawDescData) + }) + return file_gluon_contract_order_old_proto_rawDescData +} + +var file_gluon_contract_order_old_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_gluon_contract_order_old_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_gluon_contract_order_old_proto_goTypes = []interface{}{ + (OrderDirection)(0), // 0: gluon.contract.OrderDirection + (OrderType)(0), // 1: gluon.contract.OrderType + (*OrderBody)(nil), // 2: gluon.contract.OrderBody + (*OrderOld)(nil), // 3: gluon.contract.OrderOld + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_gluon_contract_order_old_proto_depIdxs = []int32{ + 0, // 0: gluon.contract.OrderBody.direction:type_name -> gluon.contract.OrderDirection + 1, // 1: gluon.contract.OrderBody.type:type_name -> gluon.contract.OrderType + 4, // 2: gluon.contract.OrderBody.expiry:type_name -> google.protobuf.Timestamp + 2, // 3: gluon.contract.OrderOld.body:type_name -> gluon.contract.OrderBody + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] 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_gluon_contract_order_old_proto_init() } +func file_gluon_contract_order_old_proto_init() { + if File_gluon_contract_order_old_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gluon_contract_order_old_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_order_old_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderOld); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gluon_contract_order_old_proto_rawDesc, + NumEnums: 2, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gluon_contract_order_old_proto_goTypes, + DependencyIndexes: file_gluon_contract_order_old_proto_depIdxs, + EnumInfos: file_gluon_contract_order_old_proto_enumTypes, + MessageInfos: file_gluon_contract_order_old_proto_msgTypes, + }.Build() + File_gluon_contract_order_old_proto = out.File + file_gluon_contract_order_old_proto_rawDesc = nil + file_gluon_contract_order_old_proto_goTypes = nil + file_gluon_contract_order_old_proto_depIdxs = nil +} diff --git a/api/gluon/contract/query.pulsar.go b/api/gluon/contract/query.pulsar.go index 11bb7d9..3d7e32d 100644 --- a/api/gluon/contract/query.pulsar.go +++ b/api/gluon/contract/query.pulsar.go @@ -3,7 +3,7 @@ package contract import ( _ "cosmossdk.io/api/amino" - _ "cosmossdk.io/api/cosmos/base/query/v1beta1" + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -807,6 +807,1869 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QueryGetOrderRequest protoreflect.MessageDescriptor + fd_QueryGetOrderRequest_index protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_query_proto_init() + md_QueryGetOrderRequest = File_gluon_contract_query_proto.Messages().ByName("QueryGetOrderRequest") + fd_QueryGetOrderRequest_index = md_QueryGetOrderRequest.Fields().ByName("index") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetOrderRequest)(nil) + +type fastReflection_QueryGetOrderRequest QueryGetOrderRequest + +func (x *QueryGetOrderRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetOrderRequest)(x) +} + +func (x *QueryGetOrderRequest) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryGetOrderRequest_messageType fastReflection_QueryGetOrderRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetOrderRequest_messageType{} + +type fastReflection_QueryGetOrderRequest_messageType struct{} + +func (x fastReflection_QueryGetOrderRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetOrderRequest)(nil) +} +func (x fastReflection_QueryGetOrderRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetOrderRequest) +} +func (x fastReflection_QueryGetOrderRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetOrderRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetOrderRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetOrderRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetOrderRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetOrderRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetOrderRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetOrderRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetOrderRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetOrderRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetOrderRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_QueryGetOrderRequest_index, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetOrderRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderRequest.index": + return x.Index != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderRequest.index": + x.Index = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetOrderRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.QueryGetOrderRequest.index": + value := x.Index + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderRequest.index": + x.Index = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderRequest.index": + panic(fmt.Errorf("field index of message gluon.contract.QueryGetOrderRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetOrderRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderRequest.index": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetOrderRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.QueryGetOrderRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetOrderRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetOrderRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetOrderRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetOrderRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetOrderRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetOrderRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryGetOrderResponse protoreflect.MessageDescriptor + fd_QueryGetOrderResponse_order protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_query_proto_init() + md_QueryGetOrderResponse = File_gluon_contract_query_proto.Messages().ByName("QueryGetOrderResponse") + fd_QueryGetOrderResponse_order = md_QueryGetOrderResponse.Fields().ByName("order") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetOrderResponse)(nil) + +type fastReflection_QueryGetOrderResponse QueryGetOrderResponse + +func (x *QueryGetOrderResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetOrderResponse)(x) +} + +func (x *QueryGetOrderResponse) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryGetOrderResponse_messageType fastReflection_QueryGetOrderResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetOrderResponse_messageType{} + +type fastReflection_QueryGetOrderResponse_messageType struct{} + +func (x fastReflection_QueryGetOrderResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetOrderResponse)(nil) +} +func (x fastReflection_QueryGetOrderResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetOrderResponse) +} +func (x fastReflection_QueryGetOrderResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetOrderResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetOrderResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetOrderResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetOrderResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetOrderResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetOrderResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetOrderResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetOrderResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetOrderResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetOrderResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Order != nil { + value := protoreflect.ValueOfMessage(x.Order.ProtoReflect()) + if !f(fd_QueryGetOrderResponse_order, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetOrderResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderResponse.order": + return x.Order != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderResponse.order": + x.Order = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetOrderResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.QueryGetOrderResponse.order": + value := x.Order + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderResponse.order": + x.Order = value.Message().Interface().(*Order) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderResponse.order": + if x.Order == nil { + x.Order = new(Order) + } + return protoreflect.ValueOfMessage(x.Order.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetOrderResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryGetOrderResponse.order": + m := new(Order) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryGetOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryGetOrderResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetOrderResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.QueryGetOrderResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetOrderResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetOrderResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetOrderResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetOrderResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetOrderResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Order != nil { + l = options.Size(x.Order) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetOrderResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Order != nil { + encoded, err := options.Marshal(x.Order) + 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))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetOrderResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Order == nil { + x.Order = &Order{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Order); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAllOrderRequest protoreflect.MessageDescriptor + fd_QueryAllOrderRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_query_proto_init() + md_QueryAllOrderRequest = File_gluon_contract_query_proto.Messages().ByName("QueryAllOrderRequest") + fd_QueryAllOrderRequest_pagination = md_QueryAllOrderRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllOrderRequest)(nil) + +type fastReflection_QueryAllOrderRequest QueryAllOrderRequest + +func (x *QueryAllOrderRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllOrderRequest)(x) +} + +func (x *QueryAllOrderRequest) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllOrderRequest_messageType fastReflection_QueryAllOrderRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllOrderRequest_messageType{} + +type fastReflection_QueryAllOrderRequest_messageType struct{} + +func (x fastReflection_QueryAllOrderRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllOrderRequest)(nil) +} +func (x fastReflection_QueryAllOrderRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllOrderRequest) +} +func (x fastReflection_QueryAllOrderRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllOrderRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllOrderRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllOrderRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAllOrderRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllOrderRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllOrderRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllOrderRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllOrderRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllOrderRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAllOrderRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllOrderRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllOrderRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAllOrderRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.QueryAllOrderRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAllOrderRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderRequest")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAllOrderRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.QueryAllOrderRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAllOrderRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAllOrderRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAllOrderRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllOrderRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllOrderRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllOrderRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAllOrderResponse_1_list)(nil) + +type _QueryAllOrderResponse_1_list struct { + list *[]*Order +} + +func (x *_QueryAllOrderResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllOrderResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllOrderResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Order) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllOrderResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Order) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllOrderResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Order) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllOrderResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllOrderResponse_1_list) NewElement() protoreflect.Value { + v := new(Order) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllOrderResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllOrderResponse protoreflect.MessageDescriptor + fd_QueryAllOrderResponse_order protoreflect.FieldDescriptor + fd_QueryAllOrderResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_query_proto_init() + md_QueryAllOrderResponse = File_gluon_contract_query_proto.Messages().ByName("QueryAllOrderResponse") + fd_QueryAllOrderResponse_order = md_QueryAllOrderResponse.Fields().ByName("order") + fd_QueryAllOrderResponse_pagination = md_QueryAllOrderResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllOrderResponse)(nil) + +type fastReflection_QueryAllOrderResponse QueryAllOrderResponse + +func (x *QueryAllOrderResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllOrderResponse)(x) +} + +func (x *QueryAllOrderResponse) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllOrderResponse_messageType fastReflection_QueryAllOrderResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllOrderResponse_messageType{} + +type fastReflection_QueryAllOrderResponse_messageType struct{} + +func (x fastReflection_QueryAllOrderResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllOrderResponse)(nil) +} +func (x fastReflection_QueryAllOrderResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllOrderResponse) +} +func (x fastReflection_QueryAllOrderResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllOrderResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllOrderResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllOrderResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAllOrderResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllOrderResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllOrderResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllOrderResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllOrderResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllOrderResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAllOrderResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Order) != 0 { + value := protoreflect.ValueOfList(&_QueryAllOrderResponse_1_list{list: &x.Order}) + if !f(fd_QueryAllOrderResponse_order, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllOrderResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllOrderResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderResponse.order": + return len(x.Order) != 0 + case "gluon.contract.QueryAllOrderResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderResponse.order": + x.Order = nil + case "gluon.contract.QueryAllOrderResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAllOrderResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.QueryAllOrderResponse.order": + if len(x.Order) == 0 { + return protoreflect.ValueOfList(&_QueryAllOrderResponse_1_list{}) + } + listValue := &_QueryAllOrderResponse_1_list{list: &x.Order} + return protoreflect.ValueOfList(listValue) + case "gluon.contract.QueryAllOrderResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderResponse.order": + lv := value.List() + clv := lv.(*_QueryAllOrderResponse_1_list) + x.Order = *clv.list + case "gluon.contract.QueryAllOrderResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderResponse.order": + if x.Order == nil { + x.Order = []*Order{} + } + value := &_QueryAllOrderResponse_1_list{list: &x.Order} + return protoreflect.ValueOfList(value) + case "gluon.contract.QueryAllOrderResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAllOrderResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.QueryAllOrderResponse.order": + list := []*Order{} + return protoreflect.ValueOfList(&_QueryAllOrderResponse_1_list{list: &list}) + case "gluon.contract.QueryAllOrderResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.QueryAllOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.QueryAllOrderResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAllOrderResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.QueryAllOrderResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAllOrderResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllOrderResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAllOrderResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAllOrderResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllOrderResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Order) > 0 { + for _, e := range x.Order { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllOrderResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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))) + i-- + dAtA[i] = 0x12 + } + if len(x.Order) > 0 { + for iNdEx := len(x.Order) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Order[iNdEx]) + 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))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllOrderResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Order = append(x.Order, &Order{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Order[len(x.Order)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -884,6 +2747,154 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } +type QueryGetOrderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *QueryGetOrderRequest) Reset() { + *x = QueryGetOrderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetOrderRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetOrderRequest.ProtoReflect.Descriptor instead. +func (*QueryGetOrderRequest) Descriptor() ([]byte, []int) { + return file_gluon_contract_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryGetOrderRequest) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +type QueryGetOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` +} + +func (x *QueryGetOrderResponse) Reset() { + *x = QueryGetOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetOrderResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetOrderResponse.ProtoReflect.Descriptor instead. +func (*QueryGetOrderResponse) Descriptor() ([]byte, []int) { + return file_gluon_contract_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryGetOrderResponse) GetOrder() *Order { + if x != nil { + return x.Order + } + return nil +} + +type QueryAllOrderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllOrderRequest) Reset() { + *x = QueryAllOrderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllOrderRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllOrderRequest.ProtoReflect.Descriptor instead. +func (*QueryAllOrderRequest) Descriptor() ([]byte, []int) { + return file_gluon_contract_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryAllOrderRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryAllOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Order []*Order `protobuf:"bytes,1,rep,name=order,proto3" json:"order,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllOrderResponse) Reset() { + *x = QueryAllOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllOrderResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllOrderResponse.ProtoReflect.Descriptor instead. +func (*QueryAllOrderResponse) Descriptor() ([]byte, []int) { + return file_gluon_contract_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryAllOrderResponse) GetOrder() []*Order { + if x != nil { + return x.Order + } + return nil +} + +func (x *QueryAllOrderResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + var File_gluon_contract_query_proto protoreflect.FileDescriptor var file_gluon_contract_query_proto_rawDesc = []byte{ @@ -898,31 +2909,71 @@ var file_gluon_contract_query_proto_rawDesc = []byte{ 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6c, 0x75, 0x6f, - 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x32, 0x7a, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x71, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x6c, - 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, - 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x93, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xa2, - 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6c, + 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x22, 0x2c, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x4a, + 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x5e, 0x0a, 0x14, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x15, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x32, 0xef, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x71, 0x0a, 0x06, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7b, 0x0a, + 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, + 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x67, 0x6c, + 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x12, 0x76, 0x0a, 0x08, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x41, 0x6c, 0x6c, 0x12, 0x24, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, + 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x67, 0x6c, + 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x42, 0x93, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0xa2, 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, + 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, + 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -937,21 +2988,36 @@ func file_gluon_contract_query_proto_rawDescGZIP() []byte { return file_gluon_contract_query_proto_rawDescData } -var file_gluon_contract_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_gluon_contract_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_gluon_contract_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: gluon.contract.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: gluon.contract.QueryParamsResponse - (*Params)(nil), // 2: gluon.contract.Params + (*QueryParamsRequest)(nil), // 0: gluon.contract.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: gluon.contract.QueryParamsResponse + (*QueryGetOrderRequest)(nil), // 2: gluon.contract.QueryGetOrderRequest + (*QueryGetOrderResponse)(nil), // 3: gluon.contract.QueryGetOrderResponse + (*QueryAllOrderRequest)(nil), // 4: gluon.contract.QueryAllOrderRequest + (*QueryAllOrderResponse)(nil), // 5: gluon.contract.QueryAllOrderResponse + (*Params)(nil), // 6: gluon.contract.Params + (*Order)(nil), // 7: gluon.contract.Order + (*v1beta1.PageRequest)(nil), // 8: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 9: cosmos.base.query.v1beta1.PageResponse } var file_gluon_contract_query_proto_depIdxs = []int32{ - 2, // 0: gluon.contract.QueryParamsResponse.params:type_name -> gluon.contract.Params - 0, // 1: gluon.contract.Query.Params:input_type -> gluon.contract.QueryParamsRequest - 1, // 2: gluon.contract.Query.Params:output_type -> gluon.contract.QueryParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 6, // 0: gluon.contract.QueryParamsResponse.params:type_name -> gluon.contract.Params + 7, // 1: gluon.contract.QueryGetOrderResponse.order:type_name -> gluon.contract.Order + 8, // 2: gluon.contract.QueryAllOrderRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 7, // 3: gluon.contract.QueryAllOrderResponse.order:type_name -> gluon.contract.Order + 9, // 4: gluon.contract.QueryAllOrderResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 5: gluon.contract.Query.Params:input_type -> gluon.contract.QueryParamsRequest + 2, // 6: gluon.contract.Query.Order:input_type -> gluon.contract.QueryGetOrderRequest + 4, // 7: gluon.contract.Query.OrderAll:input_type -> gluon.contract.QueryAllOrderRequest + 1, // 8: gluon.contract.Query.Params:output_type -> gluon.contract.QueryParamsResponse + 3, // 9: gluon.contract.Query.Order:output_type -> gluon.contract.QueryGetOrderResponse + 5, // 10: gluon.contract.Query.OrderAll:output_type -> gluon.contract.QueryAllOrderResponse + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] 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 } func init() { file_gluon_contract_query_proto_init() } @@ -960,6 +3026,7 @@ func file_gluon_contract_query_proto_init() { return } file_gluon_contract_params_proto_init() + file_gluon_contract_order_proto_init() if !protoimpl.UnsafeEnabled { file_gluon_contract_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { @@ -985,6 +3052,54 @@ func file_gluon_contract_query_proto_init() { return nil } } + file_gluon_contract_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -992,7 +3107,7 @@ func file_gluon_contract_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gluon_contract_query_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/gluon/contract/query_grpc.pb.go b/api/gluon/contract/query_grpc.pb.go index 3f8d36d..9962e2b 100644 --- a/api/gluon/contract/query_grpc.pb.go +++ b/api/gluon/contract/query_grpc.pb.go @@ -19,7 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/gluon.contract.Query/Params" + Query_Params_FullMethodName = "/gluon.contract.Query/Params" + Query_Order_FullMethodName = "/gluon.contract.Query/Order" + Query_OrderAll_FullMethodName = "/gluon.contract.Query/OrderAll" ) // QueryClient is the client API for Query service. @@ -28,6 +30,9 @@ const ( type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Order items. + Order(ctx context.Context, in *QueryGetOrderRequest, opts ...grpc.CallOption) (*QueryGetOrderResponse, error) + OrderAll(ctx context.Context, in *QueryAllOrderRequest, opts ...grpc.CallOption) (*QueryAllOrderResponse, error) } type queryClient struct { @@ -47,12 +52,33 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) Order(ctx context.Context, in *QueryGetOrderRequest, opts ...grpc.CallOption) (*QueryGetOrderResponse, error) { + out := new(QueryGetOrderResponse) + err := c.cc.Invoke(ctx, Query_Order_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) OrderAll(ctx context.Context, in *QueryAllOrderRequest, opts ...grpc.CallOption) (*QueryAllOrderResponse, error) { + out := new(QueryAllOrderResponse) + err := c.cc.Invoke(ctx, Query_OrderAll_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Order items. + Order(context.Context, *QueryGetOrderRequest) (*QueryGetOrderResponse, error) + OrderAll(context.Context, *QueryAllOrderRequest) (*QueryAllOrderResponse, error) mustEmbedUnimplementedQueryServer() } @@ -63,6 +89,12 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) Order(context.Context, *QueryGetOrderRequest) (*QueryGetOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Order not implemented") +} +func (UnimplementedQueryServer) OrderAll(context.Context, *QueryAllOrderRequest) (*QueryAllOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OrderAll not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -94,6 +126,42 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_Order_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Order(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Order_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Order(ctx, req.(*QueryGetOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_OrderAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).OrderAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_OrderAll_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).OrderAll(ctx, req.(*QueryAllOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -105,6 +173,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "Order", + Handler: _Query_Order_Handler, + }, + { + MethodName: "OrderAll", + Handler: _Query_OrderAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gluon/contract/query.proto", diff --git a/api/gluon/contract/tx.pulsar.go b/api/gluon/contract/tx.pulsar.go index 9493b39..6c7130c 100644 --- a/api/gluon/contract/tx.pulsar.go +++ b/api/gluon/contract/tx.pulsar.go @@ -2611,6 +2611,2526 @@ func (x *fastReflection_MsgMatchLazyOrderResponse) ProtoMethods() *protoiface.Me } } +var ( + md_MsgCreateOrder protoreflect.MessageDescriptor + fd_MsgCreateOrder_user protoreflect.FieldDescriptor + fd_MsgCreateOrder_index protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_tx_proto_init() + md_MsgCreateOrder = File_gluon_contract_tx_proto.Messages().ByName("MsgCreateOrder") + fd_MsgCreateOrder_user = md_MsgCreateOrder.Fields().ByName("user") + fd_MsgCreateOrder_index = md_MsgCreateOrder.Fields().ByName("index") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateOrder)(nil) + +type fastReflection_MsgCreateOrder MsgCreateOrder + +func (x *MsgCreateOrder) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateOrder)(x) +} + +func (x *MsgCreateOrder) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateOrder_messageType fastReflection_MsgCreateOrder_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateOrder_messageType{} + +type fastReflection_MsgCreateOrder_messageType struct{} + +func (x fastReflection_MsgCreateOrder_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateOrder)(nil) +} +func (x fastReflection_MsgCreateOrder_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateOrder) +} +func (x fastReflection_MsgCreateOrder_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateOrder +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateOrder) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateOrder +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCreateOrder) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateOrder_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateOrder) New() protoreflect.Message { + return new(fastReflection_MsgCreateOrder) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateOrder) Interface() protoreflect.ProtoMessage { + return (*MsgCreateOrder)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCreateOrder) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.User != "" { + value := protoreflect.ValueOfString(x.User) + if !f(fd_MsgCreateOrder_user, value) { + return + } + } + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_MsgCreateOrder_index, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateOrder) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.MsgCreateOrder.user": + return x.User != "" + case "gluon.contract.MsgCreateOrder.index": + return x.Index != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrder does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrder) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.MsgCreateOrder.user": + x.User = "" + case "gluon.contract.MsgCreateOrder.index": + x.Index = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrder does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCreateOrder) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.MsgCreateOrder.user": + value := x.User + return protoreflect.ValueOfString(value) + case "gluon.contract.MsgCreateOrder.index": + value := x.Index + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrder does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrder) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.MsgCreateOrder.user": + x.User = value.Interface().(string) + case "gluon.contract.MsgCreateOrder.index": + x.Index = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrder does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrder) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.MsgCreateOrder.user": + panic(fmt.Errorf("field user of message gluon.contract.MsgCreateOrder is not mutable")) + case "gluon.contract.MsgCreateOrder.index": + panic(fmt.Errorf("field index of message gluon.contract.MsgCreateOrder is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrder does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCreateOrder) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.MsgCreateOrder.user": + return protoreflect.ValueOfString("") + case "gluon.contract.MsgCreateOrder.index": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrder does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCreateOrder) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.MsgCreateOrder", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCreateOrder) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrder) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCreateOrder) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCreateOrder) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateOrder) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.User) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateOrder) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0x12 + } + if len(x.User) > 0 { + i -= len(x.User) + copy(dAtA[i:], x.User) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.User))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateOrder) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field User", 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.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCreateOrderResponse protoreflect.MessageDescriptor +) + +func init() { + file_gluon_contract_tx_proto_init() + md_MsgCreateOrderResponse = File_gluon_contract_tx_proto.Messages().ByName("MsgCreateOrderResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateOrderResponse)(nil) + +type fastReflection_MsgCreateOrderResponse MsgCreateOrderResponse + +func (x *MsgCreateOrderResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateOrderResponse)(x) +} + +func (x *MsgCreateOrderResponse) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateOrderResponse_messageType fastReflection_MsgCreateOrderResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateOrderResponse_messageType{} + +type fastReflection_MsgCreateOrderResponse_messageType struct{} + +func (x fastReflection_MsgCreateOrderResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateOrderResponse)(nil) +} +func (x fastReflection_MsgCreateOrderResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateOrderResponse) +} +func (x fastReflection_MsgCreateOrderResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateOrderResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateOrderResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateOrderResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCreateOrderResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateOrderResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateOrderResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateOrderResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateOrderResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateOrderResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCreateOrderResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateOrderResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrderResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCreateOrderResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrderResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrderResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrderResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCreateOrderResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgCreateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgCreateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCreateOrderResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.MsgCreateOrderResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCreateOrderResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateOrderResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCreateOrderResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCreateOrderResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateOrderResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateOrderResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateOrderResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateOrder protoreflect.MessageDescriptor + fd_MsgUpdateOrder_user protoreflect.FieldDescriptor + fd_MsgUpdateOrder_index protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_tx_proto_init() + md_MsgUpdateOrder = File_gluon_contract_tx_proto.Messages().ByName("MsgUpdateOrder") + fd_MsgUpdateOrder_user = md_MsgUpdateOrder.Fields().ByName("user") + fd_MsgUpdateOrder_index = md_MsgUpdateOrder.Fields().ByName("index") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateOrder)(nil) + +type fastReflection_MsgUpdateOrder MsgUpdateOrder + +func (x *MsgUpdateOrder) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateOrder)(x) +} + +func (x *MsgUpdateOrder) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateOrder_messageType fastReflection_MsgUpdateOrder_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateOrder_messageType{} + +type fastReflection_MsgUpdateOrder_messageType struct{} + +func (x fastReflection_MsgUpdateOrder_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateOrder)(nil) +} +func (x fastReflection_MsgUpdateOrder_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateOrder) +} +func (x fastReflection_MsgUpdateOrder_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateOrder +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateOrder) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateOrder +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateOrder) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateOrder_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateOrder) New() protoreflect.Message { + return new(fastReflection_MsgUpdateOrder) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateOrder) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateOrder)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateOrder) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.User != "" { + value := protoreflect.ValueOfString(x.User) + if !f(fd_MsgUpdateOrder_user, value) { + return + } + } + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_MsgUpdateOrder_index, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateOrder) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.MsgUpdateOrder.user": + return x.User != "" + case "gluon.contract.MsgUpdateOrder.index": + return x.Index != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrder does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrder) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.MsgUpdateOrder.user": + x.User = "" + case "gluon.contract.MsgUpdateOrder.index": + x.Index = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrder does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateOrder) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.MsgUpdateOrder.user": + value := x.User + return protoreflect.ValueOfString(value) + case "gluon.contract.MsgUpdateOrder.index": + value := x.Index + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrder does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrder) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.MsgUpdateOrder.user": + x.User = value.Interface().(string) + case "gluon.contract.MsgUpdateOrder.index": + x.Index = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrder does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrder) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.MsgUpdateOrder.user": + panic(fmt.Errorf("field user of message gluon.contract.MsgUpdateOrder is not mutable")) + case "gluon.contract.MsgUpdateOrder.index": + panic(fmt.Errorf("field index of message gluon.contract.MsgUpdateOrder is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrder does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateOrder) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.MsgUpdateOrder.user": + return protoreflect.ValueOfString("") + case "gluon.contract.MsgUpdateOrder.index": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrder does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateOrder) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.MsgUpdateOrder", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateOrder) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrder) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateOrder) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateOrder) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateOrder) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.User) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateOrder) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0x12 + } + if len(x.User) > 0 { + i -= len(x.User) + copy(dAtA[i:], x.User) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.User))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateOrder) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field User", 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.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateOrderResponse protoreflect.MessageDescriptor +) + +func init() { + file_gluon_contract_tx_proto_init() + md_MsgUpdateOrderResponse = File_gluon_contract_tx_proto.Messages().ByName("MsgUpdateOrderResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateOrderResponse)(nil) + +type fastReflection_MsgUpdateOrderResponse MsgUpdateOrderResponse + +func (x *MsgUpdateOrderResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateOrderResponse)(x) +} + +func (x *MsgUpdateOrderResponse) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateOrderResponse_messageType fastReflection_MsgUpdateOrderResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateOrderResponse_messageType{} + +type fastReflection_MsgUpdateOrderResponse_messageType struct{} + +func (x fastReflection_MsgUpdateOrderResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateOrderResponse)(nil) +} +func (x fastReflection_MsgUpdateOrderResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateOrderResponse) +} +func (x fastReflection_MsgUpdateOrderResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateOrderResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateOrderResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateOrderResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateOrderResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateOrderResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateOrderResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateOrderResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateOrderResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateOrderResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateOrderResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateOrderResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrderResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateOrderResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrderResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrderResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrderResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateOrderResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgUpdateOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgUpdateOrderResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateOrderResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.MsgUpdateOrderResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateOrderResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateOrderResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateOrderResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateOrderResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateOrderResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateOrderResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateOrderResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDeleteOrder protoreflect.MessageDescriptor + fd_MsgDeleteOrder_user protoreflect.FieldDescriptor + fd_MsgDeleteOrder_index protoreflect.FieldDescriptor +) + +func init() { + file_gluon_contract_tx_proto_init() + md_MsgDeleteOrder = File_gluon_contract_tx_proto.Messages().ByName("MsgDeleteOrder") + fd_MsgDeleteOrder_user = md_MsgDeleteOrder.Fields().ByName("user") + fd_MsgDeleteOrder_index = md_MsgDeleteOrder.Fields().ByName("index") +} + +var _ protoreflect.Message = (*fastReflection_MsgDeleteOrder)(nil) + +type fastReflection_MsgDeleteOrder MsgDeleteOrder + +func (x *MsgDeleteOrder) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeleteOrder)(x) +} + +func (x *MsgDeleteOrder) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDeleteOrder_messageType fastReflection_MsgDeleteOrder_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeleteOrder_messageType{} + +type fastReflection_MsgDeleteOrder_messageType struct{} + +func (x fastReflection_MsgDeleteOrder_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeleteOrder)(nil) +} +func (x fastReflection_MsgDeleteOrder_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeleteOrder) +} +func (x fastReflection_MsgDeleteOrder_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeleteOrder +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDeleteOrder) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeleteOrder +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDeleteOrder) Type() protoreflect.MessageType { + return _fastReflection_MsgDeleteOrder_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDeleteOrder) New() protoreflect.Message { + return new(fastReflection_MsgDeleteOrder) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDeleteOrder) Interface() protoreflect.ProtoMessage { + return (*MsgDeleteOrder)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDeleteOrder) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.User != "" { + value := protoreflect.ValueOfString(x.User) + if !f(fd_MsgDeleteOrder_user, value) { + return + } + } + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_MsgDeleteOrder_index, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDeleteOrder) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "gluon.contract.MsgDeleteOrder.user": + return x.User != "" + case "gluon.contract.MsgDeleteOrder.index": + return x.Index != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrder does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrder) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "gluon.contract.MsgDeleteOrder.user": + x.User = "" + case "gluon.contract.MsgDeleteOrder.index": + x.Index = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrder does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDeleteOrder) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "gluon.contract.MsgDeleteOrder.user": + value := x.User + return protoreflect.ValueOfString(value) + case "gluon.contract.MsgDeleteOrder.index": + value := x.Index + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrder does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrder) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "gluon.contract.MsgDeleteOrder.user": + x.User = value.Interface().(string) + case "gluon.contract.MsgDeleteOrder.index": + x.Index = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrder does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrder) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.MsgDeleteOrder.user": + panic(fmt.Errorf("field user of message gluon.contract.MsgDeleteOrder is not mutable")) + case "gluon.contract.MsgDeleteOrder.index": + panic(fmt.Errorf("field index of message gluon.contract.MsgDeleteOrder is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrder does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDeleteOrder) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "gluon.contract.MsgDeleteOrder.user": + return protoreflect.ValueOfString("") + case "gluon.contract.MsgDeleteOrder.index": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrder")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrder does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDeleteOrder) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.MsgDeleteOrder", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDeleteOrder) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrder) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDeleteOrder) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDeleteOrder) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDeleteOrder) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.User) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDeleteOrder) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0x12 + } + if len(x.User) > 0 { + i -= len(x.User) + copy(dAtA[i:], x.User) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.User))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDeleteOrder) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field User", 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.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDeleteOrderResponse protoreflect.MessageDescriptor +) + +func init() { + file_gluon_contract_tx_proto_init() + md_MsgDeleteOrderResponse = File_gluon_contract_tx_proto.Messages().ByName("MsgDeleteOrderResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgDeleteOrderResponse)(nil) + +type fastReflection_MsgDeleteOrderResponse MsgDeleteOrderResponse + +func (x *MsgDeleteOrderResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeleteOrderResponse)(x) +} + +func (x *MsgDeleteOrderResponse) slowProtoReflect() protoreflect.Message { + mi := &file_gluon_contract_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDeleteOrderResponse_messageType fastReflection_MsgDeleteOrderResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeleteOrderResponse_messageType{} + +type fastReflection_MsgDeleteOrderResponse_messageType struct{} + +func (x fastReflection_MsgDeleteOrderResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeleteOrderResponse)(nil) +} +func (x fastReflection_MsgDeleteOrderResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeleteOrderResponse) +} +func (x fastReflection_MsgDeleteOrderResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeleteOrderResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDeleteOrderResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeleteOrderResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDeleteOrderResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDeleteOrderResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDeleteOrderResponse) New() protoreflect.Message { + return new(fastReflection_MsgDeleteOrderResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDeleteOrderResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDeleteOrderResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDeleteOrderResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDeleteOrderResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrderResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDeleteOrderResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrderResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrderResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrderResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrderResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrderResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDeleteOrderResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: gluon.contract.MsgDeleteOrderResponse")) + } + panic(fmt.Errorf("message gluon.contract.MsgDeleteOrderResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDeleteOrderResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in gluon.contract.MsgDeleteOrderResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDeleteOrderResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeleteOrderResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDeleteOrderResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDeleteOrderResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDeleteOrderResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDeleteOrderResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDeleteOrderResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2836,6 +5356,213 @@ func (*MsgMatchLazyOrderResponse) Descriptor() ([]byte, []int) { return file_gluon_contract_tx_proto_rawDescGZIP(), []int{5} } +type MsgCreateOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *MsgCreateOrder) Reset() { + *x = MsgCreateOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateOrder) ProtoMessage() {} + +// Deprecated: Use MsgCreateOrder.ProtoReflect.Descriptor instead. +func (*MsgCreateOrder) Descriptor() ([]byte, []int) { + return file_gluon_contract_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgCreateOrder) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *MsgCreateOrder) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +type MsgCreateOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCreateOrderResponse) Reset() { + *x = MsgCreateOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateOrderResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateOrderResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateOrderResponse) Descriptor() ([]byte, []int) { + return file_gluon_contract_tx_proto_rawDescGZIP(), []int{7} +} + +type MsgUpdateOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *MsgUpdateOrder) Reset() { + *x = MsgUpdateOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateOrder) ProtoMessage() {} + +// Deprecated: Use MsgUpdateOrder.ProtoReflect.Descriptor instead. +func (*MsgUpdateOrder) Descriptor() ([]byte, []int) { + return file_gluon_contract_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgUpdateOrder) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *MsgUpdateOrder) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +type MsgUpdateOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateOrderResponse) Reset() { + *x = MsgUpdateOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateOrderResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateOrderResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateOrderResponse) Descriptor() ([]byte, []int) { + return file_gluon_contract_tx_proto_rawDescGZIP(), []int{9} +} + +type MsgDeleteOrder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *MsgDeleteOrder) Reset() { + *x = MsgDeleteOrder{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDeleteOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDeleteOrder) ProtoMessage() {} + +// Deprecated: Use MsgDeleteOrder.ProtoReflect.Descriptor instead. +func (*MsgDeleteOrder) Descriptor() ([]byte, []int) { + return file_gluon_contract_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgDeleteOrder) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *MsgDeleteOrder) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +type MsgDeleteOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgDeleteOrderResponse) Reset() { + *x = MsgDeleteOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gluon_contract_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDeleteOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDeleteOrderResponse) ProtoMessage() {} + +// Deprecated: Use MsgDeleteOrderResponse.ProtoReflect.Descriptor instead. +func (*MsgDeleteOrderResponse) Descriptor() ([]byte, []int) { + return file_gluon_contract_tx_proto_rawDescGZIP(), []int{11} +} + var File_gluon_contract_tx_proto protoreflect.FileDescriptor var file_gluon_contract_tx_proto_rawDesc = []byte{ @@ -2889,35 +5616,69 @@ var file_gluon_contract_tx_proto_rawDesc = []byte{ 0x72, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x82, 0xe7, 0xb0, 0x2a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, 0x7a, 0x79, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, - 0x0a, 0x0a, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x67, - 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, - 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x67, 0x6c, - 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, 0x7a, 0x79, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, - 0x7a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x29, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x0e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x09, 0x82, 0xe7, 0xb0, 0x2a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, + 0x0e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x09, 0x82, 0xe7, 0xb0, 0x2a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, + 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x09, 0x82, 0xe7, 0xb0, 0x2a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0x9f, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x1d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x25, + 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, + 0x4d, 0x73, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, + 0x7a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x4c, 0x61, 0x7a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x90, 0x01, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, - 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0xa2, 0x02, 0x03, 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, - 0x75, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, - 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, - 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, - 0x6f, 0x6e, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x4c, 0x61, 0x7a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x29, 0x2e, 0x67, 0x6c, 0x75, + 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, 0x7a, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x1a, 0x26, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0b, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x67, 0x6c, + 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x26, 0x2e, 0x67, 0x6c, + 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x1a, 0x26, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0x90, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x18, 0x67, 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x6c, 0x75, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0xa2, 0x02, 0x03, + 0x47, 0x43, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0xca, 0x02, 0x0e, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0xe2, 0x02, 0x1a, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x5c, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0f, 0x47, 0x6c, 0x75, 0x6f, 0x6e, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2932,7 +5693,7 @@ func file_gluon_contract_tx_proto_rawDescGZIP() []byte { return file_gluon_contract_tx_proto_rawDescData } -var file_gluon_contract_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_gluon_contract_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_gluon_contract_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: gluon.contract.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: gluon.contract.MsgUpdateParamsResponse @@ -2940,26 +5701,38 @@ var file_gluon_contract_tx_proto_goTypes = []interface{}{ (*MsgMatchOrderResponse)(nil), // 3: gluon.contract.MsgMatchOrderResponse (*MsgMatchLazyOrder)(nil), // 4: gluon.contract.MsgMatchLazyOrder (*MsgMatchLazyOrderResponse)(nil), // 5: gluon.contract.MsgMatchLazyOrderResponse - (*Params)(nil), // 6: gluon.contract.Params - (*Order)(nil), // 7: gluon.contract.Order + (*MsgCreateOrder)(nil), // 6: gluon.contract.MsgCreateOrder + (*MsgCreateOrderResponse)(nil), // 7: gluon.contract.MsgCreateOrderResponse + (*MsgUpdateOrder)(nil), // 8: gluon.contract.MsgUpdateOrder + (*MsgUpdateOrderResponse)(nil), // 9: gluon.contract.MsgUpdateOrderResponse + (*MsgDeleteOrder)(nil), // 10: gluon.contract.MsgDeleteOrder + (*MsgDeleteOrderResponse)(nil), // 11: gluon.contract.MsgDeleteOrderResponse + (*Params)(nil), // 12: gluon.contract.Params + (*Order)(nil), // 13: gluon.contract.Order } var file_gluon_contract_tx_proto_depIdxs = []int32{ - 6, // 0: gluon.contract.MsgUpdateParams.params:type_name -> gluon.contract.Params - 7, // 1: gluon.contract.MsgMatchOrder.earlier:type_name -> gluon.contract.Order - 7, // 2: gluon.contract.MsgMatchOrder.later:type_name -> gluon.contract.Order - 7, // 3: gluon.contract.MsgMatchLazyOrder.earlier:type_name -> gluon.contract.Order - 7, // 4: gluon.contract.MsgMatchLazyOrder.later:type_name -> gluon.contract.Order - 0, // 5: gluon.contract.Msg.UpdateParams:input_type -> gluon.contract.MsgUpdateParams - 2, // 6: gluon.contract.Msg.MatchOrder:input_type -> gluon.contract.MsgMatchOrder - 4, // 7: gluon.contract.Msg.MatchLazyOrder:input_type -> gluon.contract.MsgMatchLazyOrder - 1, // 8: gluon.contract.Msg.UpdateParams:output_type -> gluon.contract.MsgUpdateParamsResponse - 3, // 9: gluon.contract.Msg.MatchOrder:output_type -> gluon.contract.MsgMatchOrderResponse - 5, // 10: gluon.contract.Msg.MatchLazyOrder:output_type -> gluon.contract.MsgMatchLazyOrderResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] 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 + 12, // 0: gluon.contract.MsgUpdateParams.params:type_name -> gluon.contract.Params + 13, // 1: gluon.contract.MsgMatchOrder.earlier:type_name -> gluon.contract.Order + 13, // 2: gluon.contract.MsgMatchOrder.later:type_name -> gluon.contract.Order + 13, // 3: gluon.contract.MsgMatchLazyOrder.earlier:type_name -> gluon.contract.Order + 13, // 4: gluon.contract.MsgMatchLazyOrder.later:type_name -> gluon.contract.Order + 0, // 5: gluon.contract.Msg.UpdateParams:input_type -> gluon.contract.MsgUpdateParams + 2, // 6: gluon.contract.Msg.MatchOrder:input_type -> gluon.contract.MsgMatchOrder + 4, // 7: gluon.contract.Msg.MatchLazyOrder:input_type -> gluon.contract.MsgMatchLazyOrder + 6, // 8: gluon.contract.Msg.CreateOrder:input_type -> gluon.contract.MsgCreateOrder + 8, // 9: gluon.contract.Msg.UpdateOrder:input_type -> gluon.contract.MsgUpdateOrder + 10, // 10: gluon.contract.Msg.DeleteOrder:input_type -> gluon.contract.MsgDeleteOrder + 1, // 11: gluon.contract.Msg.UpdateParams:output_type -> gluon.contract.MsgUpdateParamsResponse + 3, // 12: gluon.contract.Msg.MatchOrder:output_type -> gluon.contract.MsgMatchOrderResponse + 5, // 13: gluon.contract.Msg.MatchLazyOrder:output_type -> gluon.contract.MsgMatchLazyOrderResponse + 7, // 14: gluon.contract.Msg.CreateOrder:output_type -> gluon.contract.MsgCreateOrderResponse + 9, // 15: gluon.contract.Msg.UpdateOrder:output_type -> gluon.contract.MsgUpdateOrderResponse + 11, // 16: gluon.contract.Msg.DeleteOrder:output_type -> gluon.contract.MsgDeleteOrderResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] 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 } func init() { file_gluon_contract_tx_proto_init() } @@ -3042,6 +5815,78 @@ func file_gluon_contract_tx_proto_init() { return nil } } + file_gluon_contract_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeleteOrder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gluon_contract_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeleteOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3049,7 +5894,7 @@ func file_gluon_contract_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gluon_contract_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/gluon/contract/tx_grpc.pb.go b/api/gluon/contract/tx_grpc.pb.go index 31c7799..ce2a1a7 100644 --- a/api/gluon/contract/tx_grpc.pb.go +++ b/api/gluon/contract/tx_grpc.pb.go @@ -22,6 +22,9 @@ const ( Msg_UpdateParams_FullMethodName = "/gluon.contract.Msg/UpdateParams" Msg_MatchOrder_FullMethodName = "/gluon.contract.Msg/MatchOrder" Msg_MatchLazyOrder_FullMethodName = "/gluon.contract.Msg/MatchLazyOrder" + Msg_CreateOrder_FullMethodName = "/gluon.contract.Msg/CreateOrder" + Msg_UpdateOrder_FullMethodName = "/gluon.contract.Msg/UpdateOrder" + Msg_DeleteOrder_FullMethodName = "/gluon.contract.Msg/DeleteOrder" ) // MsgClient is the client API for Msg service. @@ -33,6 +36,9 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) MatchOrder(ctx context.Context, in *MsgMatchOrder, opts ...grpc.CallOption) (*MsgMatchOrderResponse, error) MatchLazyOrder(ctx context.Context, in *MsgMatchLazyOrder, opts ...grpc.CallOption) (*MsgMatchLazyOrderResponse, error) + CreateOrder(ctx context.Context, in *MsgCreateOrder, opts ...grpc.CallOption) (*MsgCreateOrderResponse, error) + UpdateOrder(ctx context.Context, in *MsgUpdateOrder, opts ...grpc.CallOption) (*MsgUpdateOrderResponse, error) + DeleteOrder(ctx context.Context, in *MsgDeleteOrder, opts ...grpc.CallOption) (*MsgDeleteOrderResponse, error) } type msgClient struct { @@ -70,6 +76,33 @@ func (c *msgClient) MatchLazyOrder(ctx context.Context, in *MsgMatchLazyOrder, o return out, nil } +func (c *msgClient) CreateOrder(ctx context.Context, in *MsgCreateOrder, opts ...grpc.CallOption) (*MsgCreateOrderResponse, error) { + out := new(MsgCreateOrderResponse) + err := c.cc.Invoke(ctx, Msg_CreateOrder_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateOrder(ctx context.Context, in *MsgUpdateOrder, opts ...grpc.CallOption) (*MsgUpdateOrderResponse, error) { + out := new(MsgUpdateOrderResponse) + err := c.cc.Invoke(ctx, Msg_UpdateOrder_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteOrder(ctx context.Context, in *MsgDeleteOrder, opts ...grpc.CallOption) (*MsgDeleteOrderResponse, error) { + out := new(MsgDeleteOrderResponse) + err := c.cc.Invoke(ctx, Msg_DeleteOrder_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -79,6 +112,9 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) MatchOrder(context.Context, *MsgMatchOrder) (*MsgMatchOrderResponse, error) MatchLazyOrder(context.Context, *MsgMatchLazyOrder) (*MsgMatchLazyOrderResponse, error) + CreateOrder(context.Context, *MsgCreateOrder) (*MsgCreateOrderResponse, error) + UpdateOrder(context.Context, *MsgUpdateOrder) (*MsgUpdateOrderResponse, error) + DeleteOrder(context.Context, *MsgDeleteOrder) (*MsgDeleteOrderResponse, error) mustEmbedUnimplementedMsgServer() } @@ -95,6 +131,15 @@ func (UnimplementedMsgServer) MatchOrder(context.Context, *MsgMatchOrder) (*MsgM func (UnimplementedMsgServer) MatchLazyOrder(context.Context, *MsgMatchLazyOrder) (*MsgMatchLazyOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MatchLazyOrder not implemented") } +func (UnimplementedMsgServer) CreateOrder(context.Context, *MsgCreateOrder) (*MsgCreateOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOrder not implemented") +} +func (UnimplementedMsgServer) UpdateOrder(context.Context, *MsgUpdateOrder) (*MsgUpdateOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOrder not implemented") +} +func (UnimplementedMsgServer) DeleteOrder(context.Context, *MsgDeleteOrder) (*MsgDeleteOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOrder not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -162,6 +207,60 @@ func _Msg_MatchLazyOrder_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_CreateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateOrder(ctx, req.(*MsgCreateOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateOrder(ctx, req.(*MsgUpdateOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DeleteOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteOrder(ctx, req.(*MsgDeleteOrder)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -181,6 +280,18 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "MatchLazyOrder", Handler: _Msg_MatchLazyOrder_Handler, }, + { + MethodName: "CreateOrder", + Handler: _Msg_CreateOrder_Handler, + }, + { + MethodName: "UpdateOrder", + Handler: _Msg_UpdateOrder_Handler, + }, + { + MethodName: "DeleteOrder", + Handler: _Msg_DeleteOrder_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gluon/contract/tx.proto", diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 60a2dbb..3c169d6 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -1 +1 @@ -{"id":"gluon","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain gluon REST API","title":"HTTP API Console","contact":{"name":"gluon"},"version":"version not set"},"paths":{"/gluon.contract.Msg/MatchLazyOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_MatchLazyOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgMatchLazyOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgMatchLazyOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/MatchOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_MatchOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgMatchOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgMatchOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GluonMsg_UpdateParams","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/CreatePairing":{"post":{"tags":["Msg"],"operationId":"GluonMsg_CreatePairing","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgCreatePairing"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgCreatePairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/DeletePairing":{"post":{"tags":["Msg"],"operationId":"GluonMsg_DeletePairing","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgDeletePairing"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgDeletePairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/UpdatePairing":{"post":{"tags":["Msg"],"operationId":"GluonMsg_UpdatePairing","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgUpdatePairing"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgUpdatePairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GluonMsg_UpdateParamsMixin10","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/contract/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GluonQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/customauth/pairing":{"get":{"tags":["Query"],"operationId":"GluonQuery_PairingAll","parameters":[{"type":"string","format":"byte","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","name":"pagination.key","in":"query"},{"type":"string","format":"uint64","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","name":"pagination.offset","in":"query"},{"type":"string","format":"uint64","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","name":"pagination.limit","in":"query"},{"type":"boolean","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.QueryAllPairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/customauth/pairing/{id}":{"get":{"tags":["Query"],"summary":"Queries a list of Pairing items.","operationId":"GluonQuery_Pairing","parameters":[{"type":"string","format":"uint64","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.QueryGetPairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/customauth/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GluonQuery_ParamsMixin9","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"count_total":{"description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"boolean"},"key":{"description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"string","format":"byte"},"limit":{"description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"string","format":"uint64"},"offset":{"description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }","type":"object","properties":{"next_key":{"description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"gluon.contract.MsgMatchLazyOrder":{"type":"object","properties":{"earlier":{"$ref":"#/definitions/gluon.contract.Order"},"later":{"$ref":"#/definitions/gluon.contract.Order"}}},"gluon.contract.MsgMatchLazyOrderResponse":{"type":"object"},"gluon.contract.MsgMatchOrder":{"type":"object","properties":{"earlier":{"$ref":"#/definitions/gluon.contract.Order"},"later":{"$ref":"#/definitions/gluon.contract.Order"}}},"gluon.contract.MsgMatchOrderResponse":{"type":"object"},"gluon.contract.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless overwritten).","type":"string"},"params":{"description":"NOTE: All parameters must be supplied.","$ref":"#/definitions/gluon.contract.Params"}}},"gluon.contract.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"gluon.contract.Order":{"type":"object","properties":{"address":{"type":"string"},"amount":{"type":"string"},"direction":{"$ref":"#/definitions/gluon.contract.OrderDirection"},"limit_price":{"type":"string"},"stop_price":{"type":"string"},"type":{"$ref":"#/definitions/gluon.contract.OrderType"}}},"gluon.contract.OrderDirection":{"type":"string","default":"UNKNOWN","enum":["UNKNOWN","BUY","SELL"]},"gluon.contract.OrderType":{"type":"string","default":"NORMAL","enum":["NORMAL","LAZY"]},"gluon.contract.Params":{"description":"Params defines the parameters for the module.","type":"object"},"gluon.contract.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/gluon.contract.Params"}}},"gluon.customauth.MsgCreatePairing":{"type":"object","properties":{"address":{"type":"string"},"publicKey":{"type":"string"},"user":{"type":"string"}}},"gluon.customauth.MsgCreatePairingResponse":{"type":"object","properties":{"id":{"type":"string","format":"uint64"}}},"gluon.customauth.MsgDeletePairing":{"type":"object","properties":{"id":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"gluon.customauth.MsgDeletePairingResponse":{"type":"object"},"gluon.customauth.MsgUpdatePairing":{"type":"object","properties":{"address":{"type":"string"},"id":{"type":"string","format":"uint64"},"publicKey":{"type":"string"},"user":{"type":"string"}}},"gluon.customauth.MsgUpdatePairingResponse":{"type":"object"},"gluon.customauth.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless overwritten).","type":"string"},"params":{"description":"NOTE: All parameters must be supplied.","$ref":"#/definitions/gluon.customauth.Params"}}},"gluon.customauth.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"gluon.customauth.Pairing":{"type":"object","properties":{"address":{"type":"string"},"id":{"type":"string","format":"uint64"},"publicKey":{"type":"string"},"user":{"type":"string"}}},"gluon.customauth.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"operator":{"type":"string"}}},"gluon.customauth.QueryAllPairingResponse":{"type":"object","properties":{"Pairing":{"type":"array","items":{"type":"object","$ref":"#/definitions/gluon.customauth.Pairing"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"gluon.customauth.QueryGetPairingResponse":{"type":"object","properties":{"Pairing":{"$ref":"#/definitions/gluon.customauth.Pairing"}}},"gluon.customauth.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/gluon.customauth.Params"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}}},"tags":[{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file +{"id":"gluon","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain gluon REST API","title":"HTTP API Console","contact":{"name":"gluon"},"version":"version not set"},"paths":{"/gluon.contract.Msg/CreateOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_CreateOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgCreateOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgCreateOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/DeleteOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_DeleteOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgDeleteOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgDeleteOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/MatchLazyOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_MatchLazyOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgMatchLazyOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgMatchLazyOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/MatchOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_MatchOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgMatchOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgMatchOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/UpdateOrder":{"post":{"tags":["Msg"],"operationId":"GluonMsg_UpdateOrder","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgUpdateOrder"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgUpdateOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.contract.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GluonMsg_UpdateParams","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.contract.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/CreatePairing":{"post":{"tags":["Msg"],"operationId":"GluonMsg_CreatePairing","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgCreatePairing"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgCreatePairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/DeletePairing":{"post":{"tags":["Msg"],"operationId":"GluonMsg_DeletePairing","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgDeletePairing"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgDeletePairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon.customauth.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GluonMsg_UpdateParamsMixin12","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/gluon.customauth.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/contract/order":{"get":{"tags":["Query"],"operationId":"GluonQuery_OrderAll","parameters":[{"type":"string","format":"byte","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","name":"pagination.key","in":"query"},{"type":"string","format":"uint64","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","name":"pagination.offset","in":"query"},{"type":"string","format":"uint64","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","name":"pagination.limit","in":"query"},{"type":"boolean","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.QueryAllOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/contract/order/{index}":{"get":{"tags":["Query"],"summary":"Queries a list of Order items.","operationId":"GluonQuery_Order","parameters":[{"type":"string","name":"index","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.QueryGetOrderResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/contract/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GluonQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.contract.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/customauth/pairing/{address}":{"get":{"tags":["Query"],"operationId":"GluonQuery_PairingAll","parameters":[{"type":"string","name":"address","in":"path","required":true},{"type":"string","format":"byte","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","name":"pagination.key","in":"query"},{"type":"string","format":"uint64","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","name":"pagination.offset","in":"query"},{"type":"string","format":"uint64","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","name":"pagination.limit","in":"query"},{"type":"boolean","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.QueryAllPairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/customauth/pairing/{address}/{id}":{"get":{"tags":["Query"],"summary":"Queries a list of Pairing items.","operationId":"GluonQuery_Pairing","parameters":[{"type":"string","name":"address","in":"path","required":true},{"type":"string","format":"uint64","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.QueryGetPairingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/gluon/customauth/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GluonQuery_ParamsMixin11","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/gluon.customauth.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"count_total":{"description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"boolean"},"key":{"description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"string","format":"byte"},"limit":{"description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"string","format":"uint64"},"offset":{"description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }","type":"object","properties":{"next_key":{"description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"gluon.contract.MsgCreateOrder":{"type":"object","properties":{"index":{"type":"string"},"user":{"type":"string"}}},"gluon.contract.MsgCreateOrderResponse":{"type":"object"},"gluon.contract.MsgDeleteOrder":{"type":"object","properties":{"index":{"type":"string"},"user":{"type":"string"}}},"gluon.contract.MsgDeleteOrderResponse":{"type":"object"},"gluon.contract.MsgMatchLazyOrder":{"type":"object","properties":{"earlier":{"$ref":"#/definitions/gluon.contract.Order"},"later":{"$ref":"#/definitions/gluon.contract.Order"}}},"gluon.contract.MsgMatchLazyOrderResponse":{"type":"object"},"gluon.contract.MsgMatchOrder":{"type":"object","properties":{"earlier":{"$ref":"#/definitions/gluon.contract.Order"},"later":{"$ref":"#/definitions/gluon.contract.Order"}}},"gluon.contract.MsgMatchOrderResponse":{"type":"object"},"gluon.contract.MsgUpdateOrder":{"type":"object","properties":{"index":{"type":"string"},"user":{"type":"string"}}},"gluon.contract.MsgUpdateOrderResponse":{"type":"object"},"gluon.contract.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless overwritten).","type":"string"},"params":{"description":"NOTE: All parameters must be supplied.","$ref":"#/definitions/gluon.contract.Params"}}},"gluon.contract.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"gluon.contract.Order":{"type":"object","properties":{"index":{"type":"string"},"user":{"type":"string"}}},"gluon.contract.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"lazy_contract_period":{"type":"string"}}},"gluon.contract.QueryAllOrderResponse":{"type":"object","properties":{"order":{"type":"array","items":{"type":"object","$ref":"#/definitions/gluon.contract.Order"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"gluon.contract.QueryGetOrderResponse":{"type":"object","properties":{"order":{"$ref":"#/definitions/gluon.contract.Order"}}},"gluon.contract.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/gluon.contract.Params"}}},"gluon.customauth.MsgCreatePairing":{"type":"object","properties":{"public_key":{"$ref":"#/definitions/google.protobuf.Any"},"user":{"type":"string"}}},"gluon.customauth.MsgCreatePairingResponse":{"type":"object","properties":{"id":{"type":"string","format":"uint64"}}},"gluon.customauth.MsgDeletePairing":{"type":"object","properties":{"id":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"gluon.customauth.MsgDeletePairingResponse":{"type":"object"},"gluon.customauth.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless overwritten).","type":"string"},"params":{"description":"NOTE: All parameters must be supplied.","$ref":"#/definitions/gluon.customauth.Params"}}},"gluon.customauth.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"gluon.customauth.Pairing":{"type":"object","properties":{"address":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uint64"},"public_key":{"$ref":"#/definitions/google.protobuf.Any"}}},"gluon.customauth.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"operator_public_key":{"$ref":"#/definitions/google.protobuf.Any"},"paring_delay":{"type":"string"}}},"gluon.customauth.QueryAllPairingResponse":{"type":"object","properties":{"Pairing":{"type":"array","items":{"type":"object","$ref":"#/definitions/gluon.customauth.Pairing"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"gluon.customauth.QueryGetPairingResponse":{"type":"object","properties":{"Pairing":{"$ref":"#/definitions/gluon.customauth.Pairing"}}},"gluon.customauth.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/gluon.customauth.Params"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}}},"tags":[{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file diff --git a/proto/gluon/contract/genesis.proto b/proto/gluon/contract/genesis.proto index 0092c79..59b8c29 100644 --- a/proto/gluon/contract/genesis.proto +++ b/proto/gluon/contract/genesis.proto @@ -5,6 +5,7 @@ package gluon.contract; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "gluon/contract/params.proto"; +import "gluon/contract/order.proto"; option go_package = "gluon/x/contract/types"; @@ -12,7 +13,8 @@ option go_package = "gluon/x/contract/types"; message GenesisState { // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string port_id = 2; + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + string port_id = 2; + repeated Order orderList = 3 [(gogoproto.nullable) = false] ; } diff --git a/proto/gluon/contract/order.proto b/proto/gluon/contract/order.proto index 1050b4b..4c05242 100644 --- a/proto/gluon/contract/order.proto +++ b/proto/gluon/contract/order.proto @@ -1,5 +1,4 @@ syntax = "proto3"; - package gluon.contract; import "amino/amino.proto"; @@ -9,49 +8,52 @@ import "google/protobuf/timestamp.proto"; option go_package = "gluon/x/contract/types"; +message Order { + string index = 1; + string user = 2; + OrderBody body = 3 [ (gogoproto.nullable) = false ]; + uint64 paring_id = 4; + bytes signature = 5; +} + + enum OrderDirection { - UNKNOWN = 0; - BUY = 1; - SELL = 2; + UNKNOWN = 0; + BUY = 1; + SELL = 2; } enum OrderType { - NORMAL = 0; - LAZY = 1; + NORMAL = 0; + LAZY = 1; } message OrderBody { - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string base_denom = 2; - string quote_denom = 3; - OrderDirection direction = 4; - OrderType type = 5; - string amount = 6 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - string limit_price = 7 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = true, - (amino.dont_omitempty) = true - ]; - string stop_price = 8 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = true, - (amino.dont_omitempty) = true - ]; - google.protobuf.Timestamp expiry = 9 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; +string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +string base_denom = 2; +string quote_denom = 3; +OrderDirection direction = 4; +OrderType type = 5; +string amount = 6 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true +]; +string limit_price = 7 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = true, + (amino.dont_omitempty) = true +]; +string stop_price = 8 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = true, + (amino.dont_omitempty) = true +]; +google.protobuf.Timestamp expiry = 9 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true +]; } - -message Order { - OrderBody body = 1 [ (gogoproto.nullable) = false ]; - uint64 paring_id = 2; - bytes signature = 3; -} \ No newline at end of file diff --git a/proto/gluon/contract/query.proto b/proto/gluon/contract/query.proto index d521e52..ba44a3e 100644 --- a/proto/gluon/contract/query.proto +++ b/proto/gluon/contract/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package gluon.contract; import "amino/amino.proto"; @@ -6,25 +7,53 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gluon/contract/params.proto"; +import "gluon/contract/order.proto"; option go_package = "gluon/x/contract/types"; // Query defines the gRPC querier service. service Query { + // Parameters queries the parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/gluon/contract/params"; + + } + + // Queries a list of Order items. + rpc Order (QueryGetOrderRequest) returns (QueryGetOrderResponse) { + option (google.api.http).get = "/gluon/contract/order/{index}"; + + } + rpc OrderAll (QueryAllOrderRequest) returns (QueryAllOrderResponse) { + option (google.api.http).get = "/gluon/contract/order"; + } } - // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. message QueryParamsResponse { + // params holds all the parameters of this module. - Params params = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} \ No newline at end of file + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +message QueryGetOrderRequest { + string index = 1; +} + +message QueryGetOrderResponse { + Order order = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllOrderRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllOrderResponse { + repeated Order order = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + diff --git a/proto/gluon/contract/tx.proto b/proto/gluon/contract/tx.proto index 8f74716..6df5be2 100644 --- a/proto/gluon/contract/tx.proto +++ b/proto/gluon/contract/tx.proto @@ -7,7 +7,6 @@ import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "gluon/contract/params.proto"; - import "gluon/contract/order.proto"; option go_package = "gluon/x/contract/types"; @@ -21,6 +20,9 @@ service Msg { rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse ); rpc MatchOrder (MsgMatchOrder ) returns (MsgMatchOrderResponse ); rpc MatchLazyOrder (MsgMatchLazyOrder) returns (MsgMatchLazyOrderResponse); + rpc CreateOrder (MsgCreateOrder ) returns (MsgCreateOrderResponse ); + rpc UpdateOrder (MsgUpdateOrder ) returns (MsgUpdateOrderResponse ); + rpc DeleteOrder (MsgDeleteOrder ) returns (MsgDeleteOrderResponse ); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { @@ -42,33 +44,43 @@ message MsgUpdateParamsResponse {} message MsgMatchOrder { option (cosmos.msg.v1.signer) = "earlier.address"; - option (cosmos.msg.v1.signer) = "later.address"; - - gluon.contract.Order earlier = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - gluon.contract.Order later = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; + option (cosmos.msg.v1.signer) = "later.address"; + gluon.contract.Order earlier = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + gluon.contract.Order later = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } message MsgMatchOrderResponse {} message MsgMatchLazyOrder { option (cosmos.msg.v1.signer) = "earlier.address"; - option (cosmos.msg.v1.signer) = "later.address"; - - gluon.contract.Order earlier = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - gluon.contract.Order later = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; + option (cosmos.msg.v1.signer) = "later.address"; + gluon.contract.Order earlier = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + gluon.contract.Order later = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } message MsgMatchLazyOrderResponse {} +message MsgCreateOrder { + option (cosmos.msg.v1.signer) = "user"; + string user = 1; + string index = 2; +} + +message MsgCreateOrderResponse {} + +message MsgUpdateOrder { + option (cosmos.msg.v1.signer) = "user"; + string user = 1; + string index = 2; +} + +message MsgUpdateOrderResponse {} + +message MsgDeleteOrder { + option (cosmos.msg.v1.signer) = "user"; + string user = 1; + string index = 2; +} + +message MsgDeleteOrderResponse {} + diff --git a/x/contract/keeper/msg_server_order.go b/x/contract/keeper/msg_server_order.go new file mode 100644 index 0000000..d173a3a --- /dev/null +++ b/x/contract/keeper/msg_server_order.go @@ -0,0 +1,87 @@ +package keeper + +import ( + "context" + + "gluon/x/contract/types" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +func (k msgServer) CreateOrder(goCtx context.Context, msg *types.MsgCreateOrder) (*types.MsgCreateOrderResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Check if the value already exists + _, isFound := k.GetOrder( + ctx, + msg.Index, + ) + if isFound { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "index already set") + } + + var order = types.Order{ + User: msg.User, + Index: msg.Index, + } + + k.SetOrder( + ctx, + order, + ) + return &types.MsgCreateOrderResponse{}, nil +} + +func (k msgServer) UpdateOrder(goCtx context.Context, msg *types.MsgUpdateOrder) (*types.MsgUpdateOrderResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Check if the value exists + valFound, isFound := k.GetOrder( + ctx, + msg.Index, + ) + if !isFound { + return nil, errorsmod.Wrap(sdkerrors.ErrKeyNotFound, "index not set") + } + + // Checks if the msg user is the same as the current owner + if msg.User != valFound.User { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") + } + + var order = types.Order{ + User: msg.User, + Index: msg.Index, + } + + k.SetOrder(ctx, order) + + return &types.MsgUpdateOrderResponse{}, nil +} + +func (k msgServer) DeleteOrder(goCtx context.Context, msg *types.MsgDeleteOrder) (*types.MsgDeleteOrderResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Check if the value exists + valFound, isFound := k.GetOrder( + ctx, + msg.Index, + ) + if !isFound { + return nil, errorsmod.Wrap(sdkerrors.ErrKeyNotFound, "index not set") + } + + // Checks if the msg user is the same as the current owner + if msg.User != valFound.User { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") + } + + k.RemoveOrder( + ctx, + msg.Index, + ) + + return &types.MsgDeleteOrderResponse{}, nil +} diff --git a/x/contract/keeper/msg_server_order_test.go b/x/contract/keeper/msg_server_order_test.go new file mode 100644 index 0000000..5ea7073 --- /dev/null +++ b/x/contract/keeper/msg_server_order_test.go @@ -0,0 +1,140 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + + keepertest "gluon/testutil/keeper" + "gluon/x/contract/keeper" + "gluon/x/contract/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestOrderMsgServerCreate(t *testing.T) { + k, ctx := keepertest.ContractKeeper(t) + srv := keeper.NewMsgServerImpl(k) + user := "A" + for i := 0; i < 5; i++ { + expected := &types.MsgCreateOrder{User: user, + Index: strconv.Itoa(i), + } + _, err := srv.CreateOrder(ctx, expected) + require.NoError(t, err) + rst, found := k.GetOrder(ctx, + expected.Index, + ) + require.True(t, found) + require.Equal(t, expected.User, rst.User) + } +} + +func TestOrderMsgServerUpdate(t *testing.T) { + user := "A" + + tests := []struct { + desc string + request *types.MsgUpdateOrder + err error + }{ + { + desc: "Completed", + request: &types.MsgUpdateOrder{User: user, + Index: strconv.Itoa(0), + }, + }, + { + desc: "Unauthorized", + request: &types.MsgUpdateOrder{User: "B", + Index: strconv.Itoa(0), + }, + err: sdkerrors.ErrUnauthorized, + }, + { + desc: "KeyNotFound", + request: &types.MsgUpdateOrder{User: user, + Index: strconv.Itoa(100000), + }, + err: sdkerrors.ErrKeyNotFound, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + k, ctx := keepertest.ContractKeeper(t) + srv := keeper.NewMsgServerImpl(k) + expected := &types.MsgCreateOrder{User: user, + Index: strconv.Itoa(0), + } + _, err := srv.CreateOrder(ctx, expected) + require.NoError(t, err) + + _, err = srv.UpdateOrder(ctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + rst, found := k.GetOrder(ctx, + expected.Index, + ) + require.True(t, found) + require.Equal(t, expected.User, rst.User) + } + }) + } +} + +func TestOrderMsgServerDelete(t *testing.T) { + user := "A" + + tests := []struct { + desc string + request *types.MsgDeleteOrder + err error + }{ + { + desc: "Completed", + request: &types.MsgDeleteOrder{User: user, + Index: strconv.Itoa(0), + }, + }, + { + desc: "Unauthorized", + request: &types.MsgDeleteOrder{User: "B", + Index: strconv.Itoa(0), + }, + err: sdkerrors.ErrUnauthorized, + }, + { + desc: "KeyNotFound", + request: &types.MsgDeleteOrder{User: user, + Index: strconv.Itoa(100000), + }, + err: sdkerrors.ErrKeyNotFound, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + k, ctx := keepertest.ContractKeeper(t) + srv := keeper.NewMsgServerImpl(k) + + _, err := srv.CreateOrder(ctx, &types.MsgCreateOrder{User: user, + Index: strconv.Itoa(0), + }) + require.NoError(t, err) + _, err = srv.DeleteOrder(ctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + _, found := k.GetOrder(ctx, + tc.request.Index, + ) + require.False(t, found) + } + }) + } +} diff --git a/x/contract/keeper/order.go b/x/contract/keeper/order.go new file mode 100644 index 0000000..8835f59 --- /dev/null +++ b/x/contract/keeper/order.go @@ -0,0 +1,71 @@ +package keeper + +import ( + "context" + + "gluon/x/contract/types" + + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" +) + +// SetOrder set a specific order in the store from its index +func (k Keeper) SetOrder(ctx context.Context, order types.Order) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.OrderKeyPrefix)) + b := k.cdc.MustMarshal(&order) + store.Set(types.OrderKey( + order.Index, + ), b) +} + +// GetOrder returns a order from its index +func (k Keeper) GetOrder( + ctx context.Context, + index string, + +) (val types.Order, found bool) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.OrderKeyPrefix)) + + b := store.Get(types.OrderKey( + index, + )) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveOrder removes a order from the store +func (k Keeper) RemoveOrder( + ctx context.Context, + index string, + +) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.OrderKeyPrefix)) + store.Delete(types.OrderKey( + index, + )) +} + +// GetAllOrder returns all order +func (k Keeper) GetAllOrder(ctx context.Context) (list []types.Order) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.OrderKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.Order + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} diff --git a/x/contract/keeper/order_test.go b/x/contract/keeper/order_test.go new file mode 100644 index 0000000..7fdb7de --- /dev/null +++ b/x/contract/keeper/order_test.go @@ -0,0 +1,64 @@ +package keeper_test + +import ( + "context" + "strconv" + "testing" + + keepertest "gluon/testutil/keeper" + "gluon/testutil/nullify" + "gluon/x/contract/keeper" + "gluon/x/contract/types" + + "github.com/stretchr/testify/require" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func createNOrder(keeper keeper.Keeper, ctx context.Context, n int) []types.Order { + items := make([]types.Order, n) + for i := range items { + items[i].Index = strconv.Itoa(i) + + keeper.SetOrder(ctx, items[i]) + } + return items +} + +func TestOrderGet(t *testing.T) { + keeper, ctx := keepertest.ContractKeeper(t) + items := createNOrder(keeper, ctx, 10) + for _, item := range items { + rst, found := keeper.GetOrder(ctx, + item.Index, + ) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&rst), + ) + } +} +func TestOrderRemove(t *testing.T) { + keeper, ctx := keepertest.ContractKeeper(t) + items := createNOrder(keeper, ctx, 10) + for _, item := range items { + keeper.RemoveOrder(ctx, + item.Index, + ) + _, found := keeper.GetOrder(ctx, + item.Index, + ) + require.False(t, found) + } +} + +func TestOrderGetAll(t *testing.T) { + keeper, ctx := keepertest.ContractKeeper(t) + items := createNOrder(keeper, ctx, 10) + require.ElementsMatch(t, + nullify.Fill(items), + nullify.Fill(keeper.GetAllOrder(ctx)), + ) +} diff --git a/x/contract/keeper/query_order.go b/x/contract/keeper/query_order.go new file mode 100644 index 0000000..6ff2d92 --- /dev/null +++ b/x/contract/keeper/query_order.go @@ -0,0 +1,56 @@ +package keeper + +import ( + "context" + + "gluon/x/contract/types" + + "cosmossdk.io/store/prefix" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) OrderAll(ctx context.Context, req *types.QueryAllOrderRequest) (*types.QueryAllOrderResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var orders []types.Order + + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + orderStore := prefix.NewStore(store, types.KeyPrefix(types.OrderKeyPrefix)) + + pageRes, err := query.Paginate(orderStore, req.Pagination, func(key []byte, value []byte) error { + var order types.Order + if err := k.cdc.Unmarshal(value, &order); err != nil { + return err + } + + orders = append(orders, order) + return nil + }) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAllOrderResponse{Order: orders, Pagination: pageRes}, nil +} + +func (k Keeper) Order(ctx context.Context, req *types.QueryGetOrderRequest) (*types.QueryGetOrderResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + val, found := k.GetOrder( + ctx, + req.Index, + ) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + return &types.QueryGetOrderResponse{Order: val}, nil +} diff --git a/x/contract/keeper/query_order_test.go b/x/contract/keeper/query_order_test.go new file mode 100644 index 0000000..0642ca5 --- /dev/null +++ b/x/contract/keeper/query_order_test.go @@ -0,0 +1,124 @@ +package keeper_test + +import ( + "strconv" + "testing" + + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "gluon/testutil/keeper" + "gluon/testutil/nullify" + "gluon/x/contract/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestOrderQuerySingle(t *testing.T) { + keeper, ctx := keepertest.ContractKeeper(t) + msgs := createNOrder(keeper, ctx, 2) + tests := []struct { + desc string + request *types.QueryGetOrderRequest + response *types.QueryGetOrderResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetOrderRequest{ + Index: msgs[0].Index, + }, + response: &types.QueryGetOrderResponse{Order: msgs[0]}, + }, + { + desc: "Second", + request: &types.QueryGetOrderRequest{ + Index: msgs[1].Index, + }, + response: &types.QueryGetOrderResponse{Order: msgs[1]}, + }, + { + desc: "KeyNotFound", + request: &types.QueryGetOrderRequest{ + Index: strconv.Itoa(100000), + }, + err: status.Error(codes.NotFound, "not found"), + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.Order(ctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + +func TestOrderQueryPaginated(t *testing.T) { + keeper, ctx := keepertest.ContractKeeper(t) + msgs := createNOrder(keeper, ctx, 5) + + request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllOrderRequest { + return &types.QueryAllOrderRequest{ + Pagination: &query.PageRequest{ + Key: next, + Offset: offset, + Limit: limit, + CountTotal: total, + }, + } + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(msgs); i += step { + resp, err := keeper.OrderAll(ctx, request(nil, uint64(i), uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.Order), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.Order), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(msgs); i += step { + resp, err := keeper.OrderAll(ctx, request(next, 0, uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.Order), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.Order), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + resp, err := keeper.OrderAll(ctx, request(nil, 0, 0, true)) + require.NoError(t, err) + require.Equal(t, len(msgs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(msgs), + nullify.Fill(resp.Order), + ) + }) + t.Run("InvalidRequest", func(t *testing.T) { + _, err := keeper.OrderAll(ctx, nil) + require.ErrorIs(t, err, status.Error(codes.InvalidArgument, "invalid request")) + }) +} diff --git a/x/contract/module/autocli.go b/x/contract/module/autocli.go index 7d0e1f9..ad8f96d 100644 --- a/x/contract/module/autocli.go +++ b/x/contract/module/autocli.go @@ -17,6 +17,17 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Use: "params", Short: "Shows the parameters of the module", }, + { + RpcMethod: "OrderAll", + Use: "list-order", + Short: "List all order", + }, + { + RpcMethod: "Order", + Use: "show-order [id]", + Short: "Shows a order", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "index"}}, + }, // this line is used by ignite scaffolding # autocli/query }, }, @@ -40,6 +51,24 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Send a match-lazy-order tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, }, + { + RpcMethod: "CreateOrder", + Use: "create-order [index]", + Short: "Create a new order", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "index"}}, + }, + { + RpcMethod: "UpdateOrder", + Use: "update-order [index]", + Short: "Update order", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "index"}}, + }, + { + RpcMethod: "DeleteOrder", + Use: "delete-order [index]", + Short: "Delete order", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "index"}}, + }, // this line is used by ignite scaffolding # autocli/tx }, }, diff --git a/x/contract/module/genesis.go b/x/contract/module/genesis.go index 2369833..c0b9e5a 100644 --- a/x/contract/module/genesis.go +++ b/x/contract/module/genesis.go @@ -9,6 +9,10 @@ import ( // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { + // Set all the order + for _, elem := range genState.OrderList { + k.SetOrder(ctx, elem) + } // this line is used by starport scaffolding # genesis/module/init k.SetPort(ctx, genState.PortId) // Only try to bind to port if it is not already bound, since we may already own @@ -32,6 +36,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.Params = k.GetParams(ctx) genesis.PortId = k.GetPort(ctx) + genesis.OrderList = k.GetAllOrder(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/contract/module/genesis_test.go b/x/contract/module/genesis_test.go index 4e41d14..7cc00a0 100644 --- a/x/contract/module/genesis_test.go +++ b/x/contract/module/genesis_test.go @@ -15,6 +15,14 @@ func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), PortId: types.PortID, + OrderList: []types.Order{ + { + Index: "0", + }, + { + Index: "1", + }, + }, // this line is used by starport scaffolding # genesis/test/state } @@ -28,5 +36,6 @@ func TestGenesis(t *testing.T) { require.Equal(t, genesisState.PortId, got.PortId) + require.ElementsMatch(t, genesisState.OrderList, got.OrderList) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/contract/module/simulation.go b/x/contract/module/simulation.go index 46cd3ac..03e3772 100644 --- a/x/contract/module/simulation.go +++ b/x/contract/module/simulation.go @@ -31,6 +31,18 @@ const ( // TODO: Determine the simulation weight value defaultWeightMsgMatchLazyOrder int = 100 + opWeightMsgCreateOrder = "op_weight_msg_order" + // TODO: Determine the simulation weight value + defaultWeightMsgCreateOrder int = 100 + + opWeightMsgUpdateOrder = "op_weight_msg_order" + // TODO: Determine the simulation weight value + defaultWeightMsgUpdateOrder int = 100 + + opWeightMsgDeleteOrder = "op_weight_msg_order" + // TODO: Determine the simulation weight value + defaultWeightMsgDeleteOrder int = 100 + // this line is used by starport scaffolding # simapp/module/const ) @@ -43,6 +55,16 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { contractGenesis := types.GenesisState{ Params: types.DefaultParams(), PortId: types.PortID, + OrderList: []types.Order{ + { + User: sample.AccAddress(), + Index: "0", + }, + { + User: sample.AccAddress(), + Index: "1", + }, + }, // this line is used by starport scaffolding # simapp/module/genesisState } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&contractGenesis) @@ -77,6 +99,39 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp contractsimulation.SimulateMsgMatchLazyOrder(am.accountKeeper, am.bankKeeper, am.keeper), )) + var weightMsgCreateOrder int + simState.AppParams.GetOrGenerate(opWeightMsgCreateOrder, &weightMsgCreateOrder, nil, + func(_ *rand.Rand) { + weightMsgCreateOrder = defaultWeightMsgCreateOrder + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgCreateOrder, + contractsimulation.SimulateMsgCreateOrder(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgUpdateOrder int + simState.AppParams.GetOrGenerate(opWeightMsgUpdateOrder, &weightMsgUpdateOrder, nil, + func(_ *rand.Rand) { + weightMsgUpdateOrder = defaultWeightMsgUpdateOrder + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgUpdateOrder, + contractsimulation.SimulateMsgUpdateOrder(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgDeleteOrder int + simState.AppParams.GetOrGenerate(opWeightMsgDeleteOrder, &weightMsgDeleteOrder, nil, + func(_ *rand.Rand) { + weightMsgDeleteOrder = defaultWeightMsgDeleteOrder + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgDeleteOrder, + contractsimulation.SimulateMsgDeleteOrder(am.accountKeeper, am.bankKeeper, am.keeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations @@ -101,6 +156,30 @@ func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.Wei return nil }, ), + simulation.NewWeightedProposalMsg( + opWeightMsgCreateOrder, + defaultWeightMsgCreateOrder, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + contractsimulation.SimulateMsgCreateOrder(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), + simulation.NewWeightedProposalMsg( + opWeightMsgUpdateOrder, + defaultWeightMsgUpdateOrder, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + contractsimulation.SimulateMsgUpdateOrder(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), + simulation.NewWeightedProposalMsg( + opWeightMsgDeleteOrder, + defaultWeightMsgDeleteOrder, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + contractsimulation.SimulateMsgDeleteOrder(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), // this line is used by starport scaffolding # simapp/module/OpMsg } } diff --git a/x/contract/simulation/order.go b/x/contract/simulation/order.go new file mode 100644 index 0000000..cb95e0b --- /dev/null +++ b/x/contract/simulation/order.go @@ -0,0 +1,145 @@ +package simulation + +import ( + "math/rand" + "strconv" + + "gluon/x/contract/keeper" + "gluon/x/contract/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func SimulateMsgCreateOrder( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + + i := r.Int() + msg := &types.MsgCreateOrder{ + User: simAccount.Address.String(), + Index: strconv.Itoa(i), + } + + _, found := k.GetOrder(ctx, msg.Index) + if found { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "Order already exist"), nil, nil + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: moduletestutil.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +func SimulateMsgUpdateOrder( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + var ( + simAccount = simtypes.Account{} + order = types.Order{} + msg = &types.MsgUpdateOrder{} + allOrder = k.GetAllOrder(ctx) + found = false + ) + for _, obj := range allOrder { + simAccount, found = FindAccount(accs, obj.User) + if found { + order = obj + break + } + } + if !found { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "order user not found"), nil, nil + } + msg.User = simAccount.Address.String() + + msg.Index = order.Index + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: moduletestutil.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +func SimulateMsgDeleteOrder( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + var ( + simAccount = simtypes.Account{} + order = types.Order{} + msg = &types.MsgUpdateOrder{} + allOrder = k.GetAllOrder(ctx) + found = false + ) + for _, obj := range allOrder { + simAccount, found = FindAccount(accs, obj.User) + if found { + order = obj + break + } + } + if !found { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "order user not found"), nil, nil + } + msg.User = simAccount.Address.String() + + msg.Index = order.Index + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: moduletestutil.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} diff --git a/x/contract/types/codec.go b/x/contract/types/codec.go index d3b2a6b..bfe8d92 100644 --- a/x/contract/types/codec.go +++ b/x/contract/types/codec.go @@ -15,6 +15,11 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgMatchLazyOrder{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateOrder{}, + &MsgUpdateOrder{}, + &MsgDeleteOrder{}, + ) // this line is used by starport scaffolding # 3 registry.RegisterImplementations((*sdk.Msg)(nil), diff --git a/x/contract/types/genesis.go b/x/contract/types/genesis.go index 77391d3..194ca3a 100644 --- a/x/contract/types/genesis.go +++ b/x/contract/types/genesis.go @@ -1,8 +1,9 @@ package types import ( + "fmt" + host "github.com/cosmos/ibc-go/v8/modules/core/24-host" - // this line is used by starport scaffolding # genesis/types/import ) // DefaultIndex is the default global index @@ -11,7 +12,8 @@ const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - PortId: PortID, + PortId: PortID, + OrderList: []Order{}, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), } @@ -23,6 +25,16 @@ func (gs GenesisState) Validate() error { if err := host.PortIdentifierValidator(gs.PortId); err != nil { return err } + // Check for duplicated index in order + orderIndexMap := make(map[string]struct{}) + + for _, elem := range gs.OrderList { + index := string(OrderKey(elem.Index)) + if _, ok := orderIndexMap[index]; ok { + return fmt.Errorf("duplicated index for order") + } + orderIndexMap[index] = struct{}{} + } // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() diff --git a/x/contract/types/genesis.pb.go b/x/contract/types/genesis.pb.go index 0915132..b6b9a53 100644 --- a/x/contract/types/genesis.pb.go +++ b/x/contract/types/genesis.pb.go @@ -27,8 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the contract module's genesis state. type GenesisState struct { // params defines all the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + OrderList []Order `protobuf:"bytes,3,rep,name=orderList,proto3" json:"orderList"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -78,6 +79,13 @@ func (m *GenesisState) GetPortId() string { return "" } +func (m *GenesisState) GetOrderList() []Order { + if m != nil { + return m.OrderList + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "gluon.contract.GenesisState") } @@ -85,21 +93,23 @@ func init() { func init() { proto.RegisterFile("gluon/contract/genesis.proto", fileDescriptor_68ad30bcc80aa088) } var fileDescriptor_68ad30bcc80aa088 = []byte{ - // 211 bytes of a gzipped FileDescriptorProto + // 254 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcf, 0x29, 0xcd, 0xcf, 0xd3, 0x4f, 0xce, 0xcf, 0x2b, 0x29, 0x4a, 0x4c, 0x2e, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0xcb, 0xea, 0xc1, 0x64, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x89, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0xa5, 0xd1, 0x8c, 0x2d, 0x48, 0x2c, 0x4a, 0xcc, 0x85, - 0x9a, 0xaa, 0x94, 0xc4, 0xc5, 0xe3, 0x0e, 0xb1, 0x26, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x92, - 0x8b, 0x0d, 0x22, 0x2f, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa6, 0x87, 0x6a, 0xad, 0x5e, - 0x00, 0x58, 0xd6, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86, 0x15, 0xcf, 0x37, 0x68, 0x31, 0x06, 0x41, - 0x35, 0x08, 0x89, 0x73, 0xb1, 0x17, 0xe4, 0x17, 0x95, 0xc4, 0x67, 0xa6, 0x48, 0x30, 0x29, 0x30, - 0x6a, 0x70, 0x06, 0xb1, 0x81, 0xb8, 0x9e, 0x29, 0x4e, 0x06, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, - 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, - 0x78, 0x2c, 0xc7, 0x10, 0x25, 0x06, 0x71, 0x5a, 0x05, 0xc2, 0x71, 0x25, 0x95, 0x05, 0xa9, 0xc5, - 0x49, 0x6c, 0x60, 0xc7, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xe8, 0x83, 0xd4, 0x12, - 0x01, 0x00, 0x00, + 0x9a, 0x2a, 0x25, 0x85, 0x26, 0x99, 0x5f, 0x94, 0x92, 0x5a, 0x04, 0x91, 0x53, 0x9a, 0xcb, 0xc8, + 0xc5, 0xe3, 0x0e, 0x71, 0x43, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x25, 0x17, 0x1b, 0x44, 0xb3, + 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x98, 0x1e, 0xaa, 0x9b, 0xf4, 0x02, 0xc0, 0xb2, 0x4e, + 0x9c, 0x27, 0xee, 0xc9, 0x33, 0xac, 0x78, 0xbe, 0x41, 0x8b, 0x31, 0x08, 0xaa, 0x41, 0x48, 0x9c, + 0x8b, 0xbd, 0x20, 0xbf, 0xa8, 0x24, 0x3e, 0x33, 0x45, 0x82, 0x49, 0x81, 0x51, 0x83, 0x33, 0x88, + 0x0d, 0xc4, 0xf5, 0x4c, 0x11, 0xb2, 0xe4, 0xe2, 0x04, 0xdb, 0xe9, 0x93, 0x59, 0x5c, 0x22, 0xc1, + 0xac, 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0x8a, 0x6e, 0xac, 0x3f, 0x48, 0x81, 0x13, 0x0b, 0xc8, 0xd4, + 0x20, 0x84, 0x6a, 0x27, 0x83, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, + 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x12, + 0x83, 0xf8, 0xaa, 0x02, 0xe1, 0xaf, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xc7, 0x8c, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7c, 0xc6, 0x52, 0xa7, 0x6a, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -122,6 +132,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.OrderList) > 0 { + for iNdEx := len(m.OrderList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OrderList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } if len(m.PortId) > 0 { i -= len(m.PortId) copy(dAtA[i:], m.PortId) @@ -165,6 +189,12 @@ func (m *GenesisState) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } + if len(m.OrderList) > 0 { + for _, e := range m.OrderList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -268,6 +298,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } m.PortId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderList = append(m.OrderList, Order{}) + if err := m.OrderList[len(m.OrderList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/contract/types/genesis_test.go b/x/contract/types/genesis_test.go index 0992915..efd3a4a 100644 --- a/x/contract/types/genesis_test.go +++ b/x/contract/types/genesis_test.go @@ -23,10 +23,32 @@ func TestGenesisState_Validate(t *testing.T) { desc: "valid genesis state", genState: &types.GenesisState{ PortId: types.PortID, + OrderList: []types.Order{ + { + Index: "0", + }, + { + Index: "1", + }, + }, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, }, + { + desc: "duplicated order", + genState: &types.GenesisState{ + OrderList: []types.Order{ + { + Index: "0", + }, + { + Index: "0", + }, + }, + }, + valid: false, + }, // this line is used by starport scaffolding # types/genesis/testcase } for _, tc := range tests { diff --git a/x/contract/types/key_order.go b/x/contract/types/key_order.go new file mode 100644 index 0000000..42d516a --- /dev/null +++ b/x/contract/types/key_order.go @@ -0,0 +1,23 @@ +package types + +import "encoding/binary" + +var _ binary.ByteOrder + +const ( + // OrderKeyPrefix is the prefix to retrieve all Order + OrderKeyPrefix = "Order/value/" +) + +// OrderKey returns the store key to retrieve a Order from the index fields +func OrderKey( + index string, +) []byte { + var key []byte + + indexBytes := []byte(index) + key = append(key, indexBytes...) + key = append(key, []byte("/")...) + + return key +} diff --git a/x/contract/types/messages_order.go b/x/contract/types/messages_order.go new file mode 100644 index 0000000..830f2a0 --- /dev/null +++ b/x/contract/types/messages_order.go @@ -0,0 +1,70 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgCreateOrder{} + +func NewMsgCreateOrder( + user string, + index string, + +) *MsgCreateOrder { + return &MsgCreateOrder{ + User: user, + Index: index, + } +} + +func (msg *MsgCreateOrder) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.User) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid user address (%s)", err) + } + return nil +} + +var _ sdk.Msg = &MsgUpdateOrder{} + +func NewMsgUpdateOrder( + user string, + index string, + +) *MsgUpdateOrder { + return &MsgUpdateOrder{ + User: user, + Index: index, + } +} + +func (msg *MsgUpdateOrder) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.User) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid user address (%s)", err) + } + return nil +} + +var _ sdk.Msg = &MsgDeleteOrder{} + +func NewMsgDeleteOrder( + user string, + index string, + +) *MsgDeleteOrder { + return &MsgDeleteOrder{ + User: user, + Index: index, + } +} + +func (msg *MsgDeleteOrder) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.User) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid user address (%s)", err) + } + return nil +} diff --git a/x/contract/types/messages_order_test.go b/x/contract/types/messages_order_test.go new file mode 100644 index 0000000..bb85e3b --- /dev/null +++ b/x/contract/types/messages_order_test.go @@ -0,0 +1,103 @@ +package types + +import ( + "testing" + + "gluon/testutil/sample" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgCreateOrder_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgCreateOrder + err error + }{ + { + name: "invalid address", + msg: MsgCreateOrder{ + User: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgCreateOrder{ + User: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMsgUpdateOrder_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgUpdateOrder + err error + }{ + { + name: "invalid address", + msg: MsgUpdateOrder{ + User: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgUpdateOrder{ + User: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMsgDeleteOrder_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgDeleteOrder + err error + }{ + { + name: "invalid address", + msg: MsgDeleteOrder{ + User: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgDeleteOrder{ + User: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/contract/types/order.pb.go b/x/contract/types/order.pb.go index a47539c..ece474a 100644 --- a/x/contract/types/order.pb.go +++ b/x/contract/types/order.pb.go @@ -83,6 +83,82 @@ func (OrderType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a010d6fb1943fa40, []int{1} } +type Order struct { + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + Body OrderBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body"` + ParingId uint64 `protobuf:"varint,4,opt,name=paring_id,json=paringId,proto3" json:"paring_id,omitempty"` + Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *Order) Reset() { *m = Order{} } +func (m *Order) String() string { return proto.CompactTextString(m) } +func (*Order) ProtoMessage() {} +func (*Order) Descriptor() ([]byte, []int) { + return fileDescriptor_a010d6fb1943fa40, []int{0} +} +func (m *Order) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Order.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Order) XXX_Merge(src proto.Message) { + xxx_messageInfo_Order.Merge(m, src) +} +func (m *Order) XXX_Size() int { + return m.Size() +} +func (m *Order) XXX_DiscardUnknown() { + xxx_messageInfo_Order.DiscardUnknown(m) +} + +var xxx_messageInfo_Order proto.InternalMessageInfo + +func (m *Order) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +func (m *Order) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *Order) GetBody() OrderBody { + if m != nil { + return m.Body + } + return OrderBody{} +} + +func (m *Order) GetParingId() uint64 { + if m != nil { + return m.ParingId + } + return 0 +} + +func (m *Order) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + type OrderBody struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` BaseDenom string `protobuf:"bytes,2,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` @@ -99,7 +175,7 @@ func (m *OrderBody) Reset() { *m = OrderBody{} } func (m *OrderBody) String() string { return proto.CompactTextString(m) } func (*OrderBody) ProtoMessage() {} func (*OrderBody) Descriptor() ([]byte, []int) { - return fileDescriptor_a010d6fb1943fa40, []int{0} + return fileDescriptor_a010d6fb1943fa40, []int{1} } func (m *OrderBody) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,114 +246,114 @@ func (m *OrderBody) GetExpiry() time.Time { return time.Time{} } -type Order struct { - Body OrderBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body"` - ParingId uint64 `protobuf:"varint,2,opt,name=paring_id,json=paringId,proto3" json:"paring_id,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *Order) Reset() { *m = Order{} } -func (m *Order) String() string { return proto.CompactTextString(m) } -func (*Order) ProtoMessage() {} -func (*Order) Descriptor() ([]byte, []int) { - return fileDescriptor_a010d6fb1943fa40, []int{1} -} -func (m *Order) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Order.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Order) XXX_Merge(src proto.Message) { - xxx_messageInfo_Order.Merge(m, src) -} -func (m *Order) XXX_Size() int { - return m.Size() -} -func (m *Order) XXX_DiscardUnknown() { - xxx_messageInfo_Order.DiscardUnknown(m) +func init() { + proto.RegisterEnum("gluon.contract.OrderDirection", OrderDirection_name, OrderDirection_value) + proto.RegisterEnum("gluon.contract.OrderType", OrderType_name, OrderType_value) + proto.RegisterType((*Order)(nil), "gluon.contract.Order") + proto.RegisterType((*OrderBody)(nil), "gluon.contract.OrderBody") } -var xxx_messageInfo_Order proto.InternalMessageInfo - -func (m *Order) GetBody() OrderBody { - if m != nil { - return m.Body - } - return OrderBody{} -} +func init() { proto.RegisterFile("gluon/contract/order.proto", fileDescriptor_a010d6fb1943fa40) } -func (m *Order) GetParingId() uint64 { - if m != nil { - return m.ParingId - } - return 0 +var fileDescriptor_a010d6fb1943fa40 = []byte{ + // 604 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x41, 0x4f, 0xd4, 0x40, + 0x14, 0xc7, 0x77, 0xa0, 0xec, 0x6e, 0xdf, 0x9a, 0xcd, 0x3a, 0x41, 0x53, 0x16, 0x6d, 0x57, 0x4e, + 0x1b, 0x12, 0x5a, 0x02, 0x89, 0x27, 0x2e, 0x6c, 0xd6, 0x44, 0xe2, 0xba, 0x98, 0x02, 0x21, 0x70, + 0xd9, 0x74, 0xdb, 0xb1, 0x4e, 0xa4, 0x9d, 0xda, 0x4e, 0x13, 0xfa, 0x2d, 0xf8, 0x0a, 0x26, 0x1e, + 0x3c, 0x7a, 0xe0, 0x43, 0x70, 0x24, 0x9c, 0x0c, 0x87, 0xd5, 0xc0, 0xc1, 0xaf, 0x61, 0x66, 0xa6, + 0x15, 0x89, 0x7a, 0xf2, 0xd2, 0xf4, 0xfd, 0xdf, 0x7f, 0x7e, 0x79, 0xef, 0xcd, 0x1b, 0xe8, 0x86, + 0x27, 0x39, 0x8b, 0x1d, 0x9f, 0xc5, 0x3c, 0xf5, 0x7c, 0xee, 0xb0, 0x34, 0x20, 0xa9, 0x9d, 0xa4, + 0x8c, 0x33, 0xdc, 0x96, 0x39, 0xbb, 0xca, 0x75, 0x1f, 0x7a, 0x11, 0x8d, 0x99, 0x23, 0xbf, 0xca, + 0xd2, 0x5d, 0xf2, 0x59, 0x16, 0xb1, 0x6c, 0x22, 0x23, 0x47, 0x05, 0x65, 0x6a, 0x31, 0x64, 0x21, + 0x53, 0xba, 0xf8, 0x2b, 0x55, 0x2b, 0x64, 0x2c, 0x3c, 0x21, 0x8e, 0x8c, 0xa6, 0xf9, 0x5b, 0x87, + 0xd3, 0x88, 0x64, 0xdc, 0x8b, 0x12, 0x65, 0x58, 0xf9, 0x88, 0x60, 0x61, 0x57, 0x14, 0x81, 0x17, + 0x61, 0x81, 0xc6, 0x01, 0x39, 0x35, 0x50, 0x0f, 0xf5, 0x75, 0x57, 0x05, 0x18, 0x83, 0x96, 0x67, + 0x24, 0x35, 0xe6, 0xa4, 0x28, 0xff, 0xf1, 0x26, 0x68, 0x53, 0x16, 0x14, 0xc6, 0x7c, 0x0f, 0xf5, + 0x5b, 0x1b, 0x4b, 0xf6, 0xfd, 0xba, 0x6d, 0x89, 0x1b, 0xb0, 0xa0, 0x18, 0x68, 0x17, 0x33, 0xab, + 0xe6, 0x4a, 0x33, 0x5e, 0x06, 0x3d, 0xf1, 0x52, 0x1a, 0x87, 0x13, 0x1a, 0x18, 0x5a, 0x0f, 0xf5, + 0x35, 0xb7, 0xa9, 0x84, 0x9d, 0x00, 0x3f, 0x01, 0x3d, 0xa3, 0x61, 0xec, 0xf1, 0x3c, 0x25, 0xc6, + 0x42, 0x0f, 0xf5, 0x1f, 0xb8, 0x77, 0xc2, 0xca, 0x27, 0x0d, 0xf4, 0x5f, 0x50, 0xbc, 0x01, 0x0d, + 0x2f, 0x08, 0x52, 0x92, 0x65, 0xaa, 0xd2, 0x81, 0x71, 0x75, 0xbe, 0xb6, 0x58, 0xce, 0x62, 0x5b, + 0x65, 0xf6, 0xb8, 0x00, 0xbb, 0x95, 0x11, 0x3f, 0x05, 0x98, 0x7a, 0x19, 0x99, 0x04, 0x24, 0x66, + 0x51, 0xd9, 0x8b, 0x2e, 0x94, 0xa1, 0x10, 0xb0, 0x05, 0xad, 0x0f, 0x39, 0xe3, 0x55, 0x7e, 0x5e, + 0xe6, 0x41, 0x4a, 0xca, 0xb0, 0x05, 0x7a, 0x40, 0x53, 0xe2, 0x73, 0xca, 0x62, 0x59, 0x7c, 0x7b, + 0xc3, 0xfc, 0x6b, 0xdb, 0xc3, 0xca, 0xe5, 0xde, 0x1d, 0xc0, 0x6b, 0xa0, 0xf1, 0x22, 0x51, 0x8d, + 0xb5, 0xff, 0x31, 0xaf, 0xfd, 0x22, 0x21, 0xae, 0xb4, 0xe1, 0x97, 0x50, 0xf7, 0x22, 0x96, 0xc7, + 0xdc, 0xa8, 0xcb, 0xfe, 0xd6, 0xc5, 0x14, 0xaf, 0x67, 0xd6, 0x23, 0xd5, 0x63, 0x16, 0xbc, 0xb7, + 0x29, 0x73, 0x22, 0x8f, 0xbf, 0xb3, 0x77, 0x62, 0x7e, 0x75, 0xbe, 0x06, 0x65, 0xf3, 0x3b, 0x31, + 0xff, 0xfc, 0xe3, 0xcb, 0x2a, 0x72, 0xcb, 0xf3, 0xf8, 0x10, 0x5a, 0x27, 0x34, 0xa2, 0x7c, 0x92, + 0xa4, 0xd4, 0x27, 0x46, 0x43, 0xe2, 0x9e, 0x5f, 0xcc, 0x2c, 0x74, 0x3d, 0xb3, 0x96, 0xff, 0xc4, + 0x8d, 0x48, 0xe8, 0xf9, 0xc5, 0x90, 0xf8, 0xbf, 0x41, 0x87, 0xc4, 0x57, 0x50, 0x90, 0xa8, 0x37, + 0x82, 0x84, 0x0f, 0x00, 0x32, 0xce, 0x92, 0x92, 0xdb, 0xfc, 0x2f, 0xae, 0x2e, 0x48, 0x0a, 0xbb, + 0x05, 0x75, 0x72, 0x9a, 0xd0, 0xb4, 0x30, 0x74, 0xb9, 0x5a, 0x5d, 0x5b, 0xad, 0xaf, 0x5d, 0xad, + 0xaf, 0xbd, 0x5f, 0xad, 0xef, 0xa0, 0x29, 0xa6, 0x72, 0xf6, 0xcd, 0x42, 0x6e, 0x79, 0x66, 0x75, + 0x1d, 0xda, 0xf7, 0xef, 0x00, 0xb7, 0xa0, 0x71, 0x30, 0x7e, 0x35, 0xde, 0x3d, 0x1c, 0x77, 0x6a, + 0xb8, 0x01, 0xf3, 0x83, 0x83, 0xa3, 0x0e, 0xc2, 0x4d, 0xd0, 0xf6, 0x5e, 0x8c, 0x46, 0x9d, 0xb9, + 0xd5, 0x67, 0xe5, 0x5e, 0x89, 0xe1, 0x63, 0x80, 0xfa, 0x78, 0xd7, 0x7d, 0xbd, 0x3d, 0xea, 0xd4, + 0x84, 0x65, 0xb4, 0x7d, 0x7c, 0xd4, 0x41, 0x83, 0xf5, 0x8b, 0x1b, 0x13, 0x5d, 0xde, 0x98, 0xe8, + 0xfb, 0x8d, 0x89, 0xce, 0x6e, 0xcd, 0xda, 0xe5, 0xad, 0x59, 0xfb, 0x7a, 0x6b, 0xd6, 0x8e, 0x1f, + 0xab, 0xa7, 0x7c, 0x7a, 0xf7, 0x98, 0xc5, 0xed, 0x65, 0xd3, 0xba, 0x2c, 0x76, 0xf3, 0x67, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x18, 0x2d, 0x84, 0x0a, 0xeb, 0x03, 0x00, 0x00, } -func (m *Order) GetSignature() []byte { - if m != nil { - return m.Signature +func (m *Order) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return nil + return dAtA[:n], nil } -func init() { - proto.RegisterEnum("gluon.contract.OrderDirection", OrderDirection_name, OrderDirection_value) - proto.RegisterEnum("gluon.contract.OrderType", OrderType_name, OrderType_value) - proto.RegisterType((*OrderBody)(nil), "gluon.contract.OrderBody") - proto.RegisterType((*Order)(nil), "gluon.contract.Order") +func (m *Order) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func init() { proto.RegisterFile("gluon/contract/order.proto", fileDescriptor_a010d6fb1943fa40) } - -var fileDescriptor_a010d6fb1943fa40 = []byte{ - // 582 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcf, 0x4e, 0xdb, 0x3e, - 0x1c, 0x8f, 0x21, 0xb4, 0xcd, 0xb7, 0x3f, 0xa1, 0xfe, 0x2c, 0x36, 0x85, 0xb2, 0x25, 0x8c, 0x13, - 0x42, 0x22, 0x41, 0x20, 0xed, 0xc4, 0x85, 0xa8, 0x93, 0x86, 0xd6, 0x95, 0x29, 0x80, 0x10, 0x5c, - 0xaa, 0x34, 0xf1, 0x32, 0x6b, 0x24, 0xce, 0x12, 0x57, 0x23, 0x6f, 0xc1, 0x43, 0xec, 0xb0, 0xe3, - 0x0e, 0x3c, 0x04, 0x47, 0xc4, 0x69, 0xe2, 0xd0, 0x4d, 0xf4, 0xb0, 0xd7, 0x98, 0x6c, 0x27, 0xea, - 0xd0, 0xb6, 0xd3, 0x2e, 0x55, 0xfd, 0xf9, 0x17, 0xfb, 0xeb, 0x8f, 0xa1, 0x1b, 0x9f, 0x8f, 0x59, - 0xea, 0x86, 0x2c, 0xe5, 0x79, 0x10, 0x72, 0x97, 0xe5, 0x11, 0xc9, 0x9d, 0x2c, 0x67, 0x9c, 0xe1, - 0x45, 0xc9, 0x39, 0x35, 0xd7, 0xfd, 0x3f, 0x48, 0x68, 0xca, 0x5c, 0xf9, 0xab, 0x24, 0xdd, 0xe5, - 0x90, 0x15, 0x09, 0x2b, 0x86, 0x72, 0xe5, 0xaa, 0x45, 0x45, 0x2d, 0xc5, 0x2c, 0x66, 0x0a, 0x17, - 0xff, 0x2a, 0xd4, 0x8e, 0x19, 0x8b, 0xcf, 0x89, 0x2b, 0x57, 0xa3, 0xf1, 0x5b, 0x97, 0xd3, 0x84, - 0x14, 0x3c, 0x48, 0x32, 0x25, 0x58, 0xfb, 0xa4, 0x83, 0x71, 0x20, 0x36, 0xe1, 0xb1, 0xa8, 0xc4, - 0xdb, 0xd0, 0x0c, 0xa2, 0x28, 0x27, 0x45, 0x61, 0xa2, 0x55, 0xb4, 0x6e, 0x78, 0xe6, 0xed, 0xd5, - 0xe6, 0x52, 0xf5, 0x9d, 0x3d, 0xc5, 0x1c, 0xf2, 0x9c, 0xa6, 0xb1, 0x5f, 0x0b, 0xf1, 0x53, 0x80, - 0x51, 0x50, 0x90, 0x61, 0x44, 0x52, 0x96, 0x98, 0x73, 0xc2, 0xe6, 0x1b, 0x02, 0xe9, 0x09, 0x00, - 0xdb, 0xd0, 0xfe, 0x30, 0x66, 0xbc, 0xe6, 0xe7, 0x25, 0x0f, 0x12, 0x52, 0x82, 0x5d, 0x30, 0x22, - 0x9a, 0x93, 0x90, 0x53, 0x96, 0x9a, 0xfa, 0x2a, 0x5a, 0x5f, 0xdc, 0xb6, 0x9c, 0x87, 0xa3, 0x70, - 0xe4, 0x0e, 0x7b, 0xb5, 0xca, 0x9f, 0x19, 0xf0, 0x26, 0xe8, 0xbc, 0xcc, 0x88, 0xb9, 0x20, 0x8d, - 0xcb, 0x7f, 0x34, 0x1e, 0x95, 0x19, 0xf1, 0xa5, 0x0c, 0xbf, 0x84, 0x46, 0x90, 0xb0, 0x71, 0xca, - 0xcd, 0x86, 0x3c, 0xdf, 0xd6, 0xf5, 0xc4, 0xd6, 0xee, 0x26, 0xf6, 0x23, 0x75, 0xc6, 0x22, 0x7a, - 0xef, 0x50, 0xe6, 0x26, 0x01, 0x7f, 0xe7, 0xec, 0xa7, 0xfc, 0xf6, 0x6a, 0x13, 0xaa, 0xc3, 0xef, - 0xa7, 0xfc, 0xf3, 0x8f, 0x2f, 0x1b, 0xc8, 0xaf, 0xfc, 0xf8, 0x04, 0xda, 0xe7, 0x34, 0xa1, 0x7c, - 0x98, 0xe5, 0x34, 0x24, 0x66, 0x53, 0xc6, 0x3d, 0xbf, 0x9e, 0xd8, 0xe8, 0x6e, 0x62, 0xaf, 0xfc, - 0x1e, 0xd7, 0x27, 0x71, 0x10, 0x96, 0x3d, 0x12, 0xfe, 0x12, 0xda, 0x23, 0xa1, 0x0a, 0x05, 0x19, - 0xf5, 0x46, 0x24, 0xe1, 0x63, 0x80, 0x82, 0xb3, 0xac, 0xca, 0x6d, 0xfd, 0x53, 0xae, 0x21, 0x92, - 0x54, 0xec, 0x2e, 0x34, 0xc8, 0x45, 0x46, 0xf3, 0xd2, 0x34, 0x56, 0xd1, 0x7a, 0x7b, 0xbb, 0xeb, - 0xa8, 0x6a, 0x38, 0x75, 0x35, 0x9c, 0xa3, 0xba, 0x1a, 0x5e, 0x4b, 0x4c, 0xe5, 0xf2, 0x9b, 0x8d, - 0xfc, 0xca, 0xb3, 0xf6, 0x11, 0x16, 0xe4, 0x28, 0xf1, 0x0e, 0xe8, 0x23, 0x16, 0x95, 0xb2, 0x1e, - 0xed, 0xbf, 0xcc, 0x5b, 0x54, 0xc9, 0xd3, 0x45, 0x86, 0x2f, 0xc5, 0x78, 0x05, 0x8c, 0x2c, 0x10, - 0xad, 0x19, 0xd2, 0x48, 0x36, 0x44, 0xf7, 0x5b, 0x0a, 0xd8, 0x8f, 0xf0, 0x13, 0x30, 0x0a, 0x1a, - 0xa7, 0x01, 0x1f, 0xe7, 0x44, 0xd6, 0xe3, 0x3f, 0x7f, 0x06, 0x6c, 0x6c, 0xc1, 0xe2, 0xc3, 0xcb, - 0xc7, 0x6d, 0x68, 0x1e, 0x0f, 0x5e, 0x0d, 0x0e, 0x4e, 0x06, 0x1d, 0x0d, 0x37, 0x61, 0xde, 0x3b, - 0x3e, 0xed, 0x20, 0xdc, 0x02, 0xfd, 0xf0, 0x45, 0xbf, 0xdf, 0x99, 0xdb, 0x78, 0x56, 0x15, 0x5a, - 0xdc, 0x3a, 0x06, 0x68, 0x0c, 0x0e, 0xfc, 0xd7, 0x7b, 0xfd, 0x8e, 0x26, 0x24, 0xfd, 0xbd, 0xb3, - 0xd3, 0x0e, 0xf2, 0xb6, 0xae, 0xef, 0x2d, 0x74, 0x73, 0x6f, 0xa1, 0xef, 0xf7, 0x16, 0xba, 0x9c, - 0x5a, 0xda, 0xcd, 0xd4, 0xd2, 0xbe, 0x4e, 0x2d, 0xed, 0xec, 0xb1, 0x7a, 0x9f, 0x17, 0xb3, 0x17, - 0x2a, 0x6a, 0x53, 0x8c, 0x1a, 0x72, 0x4a, 0x3b, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xca, - 0x88, 0x78, 0xc0, 0x03, 0x00, 0x00, +func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x2a + } + if m.ParingId != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.ParingId)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.User) > 0 { + i -= len(m.User) + copy(dAtA[i:], m.User) + i = encodeVarintOrder(dAtA, i, uint64(len(m.User))) + i-- + dAtA[i] = 0x12 + } + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *OrderBody) Marshal() (dAtA []byte, err error) { @@ -300,12 +376,12 @@ func (m *OrderBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Expiry, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiry):]) - if err1 != nil { - return 0, err1 + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Expiry, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiry):]) + if err2 != nil { + return 0, err2 } - i -= n1 - i = encodeVarintOrder(dAtA, i, uint64(n1)) + i -= n2 + i = encodeVarintOrder(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x4a if m.StopPrice != nil { @@ -376,124 +452,287 @@ func (m *OrderBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Order) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintOrder(dAtA []byte, offset int, v uint64) int { + offset -= sovOrder(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil + dAtA[offset] = uint8(v) + return base } - -func (m *Order) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Order) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + l = len(m.User) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + l = m.Body.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.ParingId != 0 { + n += 1 + sovOrder(uint64(m.ParingId)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n } -func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *OrderBody) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintOrder(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a + l = len(m.Address) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) } - if m.ParingId != 0 { - i = encodeVarintOrder(dAtA, i, uint64(m.ParingId)) - i-- - dAtA[i] = 0x10 + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) } - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + l = len(m.QuoteDenom) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + if m.Direction != 0 { + n += 1 + sovOrder(uint64(m.Direction)) + } + if m.Type != 0 { + n += 1 + sovOrder(uint64(m.Type)) + } + l = m.Amount.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.LimitPrice != nil { + l = m.LimitPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + if m.StopPrice != nil { + l = m.StopPrice.Size() + n += 1 + l + sovOrder(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiry) + n += 1 + l + sovOrder(uint64(l)) + return n +} + +func sovOrder(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOrder(x uint64) (n int) { + return sovOrder(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Order) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Order: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ParingId", wireType) + } + m.ParingId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ParingId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - i -= size - i = encodeVarintOrder(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintOrder(dAtA []byte, offset int, v uint64) int { - offset -= sovOrder(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *OrderBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovOrder(uint64(l)) - } - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovOrder(uint64(l)) - } - l = len(m.QuoteDenom) - if l > 0 { - n += 1 + l + sovOrder(uint64(l)) - } - if m.Direction != 0 { - n += 1 + sovOrder(uint64(m.Direction)) - } - if m.Type != 0 { - n += 1 + sovOrder(uint64(m.Type)) - } - l = m.Amount.Size() - n += 1 + l + sovOrder(uint64(l)) - if m.LimitPrice != nil { - l = m.LimitPrice.Size() - n += 1 + l + sovOrder(uint64(l)) - } - if m.StopPrice != nil { - l = m.StopPrice.Size() - n += 1 + l + sovOrder(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiry) - n += 1 + l + sovOrder(uint64(l)) - return n -} -func (m *Order) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Body.Size() - n += 1 + l + sovOrder(uint64(l)) - if m.ParingId != 0 { - n += 1 + sovOrder(uint64(m.ParingId)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovOrder(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovOrder(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozOrder(x uint64) (n int) { - return sovOrder(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } func (m *OrderBody) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -818,142 +1057,6 @@ func (m *OrderBody) Unmarshal(dAtA []byte) error { } return nil } -func (m *Order) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrder - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Order: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrder - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOrder - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOrder - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ParingId", wireType) - } - m.ParingId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrder - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ParingId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrder - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthOrder - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthOrder - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOrder(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOrder - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipOrder(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/contract/types/query.pb.go b/x/contract/types/query.pb.go index 580868c..c799dc1 100644 --- a/x/contract/types/query.pb.go +++ b/x/contract/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -114,34 +114,234 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } +type QueryGetOrderRequest struct { + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` +} + +func (m *QueryGetOrderRequest) Reset() { *m = QueryGetOrderRequest{} } +func (m *QueryGetOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetOrderRequest) ProtoMessage() {} +func (*QueryGetOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6b5a0b042300b082, []int{2} +} +func (m *QueryGetOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetOrderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetOrderRequest.Merge(m, src) +} +func (m *QueryGetOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetOrderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetOrderRequest proto.InternalMessageInfo + +func (m *QueryGetOrderRequest) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +type QueryGetOrderResponse struct { + Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"` +} + +func (m *QueryGetOrderResponse) Reset() { *m = QueryGetOrderResponse{} } +func (m *QueryGetOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetOrderResponse) ProtoMessage() {} +func (*QueryGetOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6b5a0b042300b082, []int{3} +} +func (m *QueryGetOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetOrderResponse.Merge(m, src) +} +func (m *QueryGetOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetOrderResponse proto.InternalMessageInfo + +func (m *QueryGetOrderResponse) GetOrder() Order { + if m != nil { + return m.Order + } + return Order{} +} + +type QueryAllOrderRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllOrderRequest) Reset() { *m = QueryAllOrderRequest{} } +func (m *QueryAllOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllOrderRequest) ProtoMessage() {} +func (*QueryAllOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6b5a0b042300b082, []int{4} +} +func (m *QueryAllOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllOrderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAllOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllOrderRequest.Merge(m, src) +} +func (m *QueryAllOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllOrderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllOrderRequest proto.InternalMessageInfo + +func (m *QueryAllOrderRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllOrderResponse struct { + Order []Order `protobuf:"bytes,1,rep,name=order,proto3" json:"order"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllOrderResponse) Reset() { *m = QueryAllOrderResponse{} } +func (m *QueryAllOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllOrderResponse) ProtoMessage() {} +func (*QueryAllOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6b5a0b042300b082, []int{5} +} +func (m *QueryAllOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAllOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllOrderResponse.Merge(m, src) +} +func (m *QueryAllOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllOrderResponse proto.InternalMessageInfo + +func (m *QueryAllOrderResponse) GetOrder() []Order { + if m != nil { + return m.Order + } + return nil +} + +func (m *QueryAllOrderResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "gluon.contract.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "gluon.contract.QueryParamsResponse") + proto.RegisterType((*QueryGetOrderRequest)(nil), "gluon.contract.QueryGetOrderRequest") + proto.RegisterType((*QueryGetOrderResponse)(nil), "gluon.contract.QueryGetOrderResponse") + proto.RegisterType((*QueryAllOrderRequest)(nil), "gluon.contract.QueryAllOrderRequest") + proto.RegisterType((*QueryAllOrderResponse)(nil), "gluon.contract.QueryAllOrderResponse") } func init() { proto.RegisterFile("gluon/contract/query.proto", fileDescriptor_6b5a0b042300b082) } var fileDescriptor_6b5a0b042300b082 = []byte{ - // 298 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcf, 0x29, 0xcd, - 0xcf, 0xd3, 0x4f, 0xce, 0xcf, 0x2b, 0x29, 0x4a, 0x4c, 0x2e, 0xd1, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, - 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0xcb, 0xe9, 0xc1, 0xe4, 0xa4, 0x04, 0x13, - 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x89, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, - 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 0x32, - 0xf5, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0xa1, 0xb2, 0x5a, 0xc9, - 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xfa, 0x49, 0x89, 0xc5, 0xa9, 0x10, 0xfb, 0xf4, 0xcb, 0x0c, 0x93, - 0x52, 0x4b, 0x12, 0x0d, 0xf5, 0x0b, 0x12, 0xd3, 0x33, 0xf3, 0xc0, 0x8a, 0xa1, 0x6a, 0xa5, 0xd1, - 0x9c, 0x57, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, 0x48, 0x49, 0x84, 0x4b, 0x28, 0x10, 0xa4, 0x3d, - 0x00, 0x2c, 0x18, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0xa2, 0x14, 0xc0, 0x25, 0x8c, 0x22, 0x5a, - 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x64, 0xc9, 0xc5, 0x06, 0xd1, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, - 0xc1, 0x6d, 0x24, 0xa6, 0x87, 0xea, 0x3b, 0x3d, 0x88, 0x7a, 0x27, 0xce, 0x13, 0xf7, 0xe4, 0x19, - 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd5, 0x60, 0x54, 0xc5, 0xc5, 0x0a, 0x36, 0x51, 0xa8, - 0x90, 0x8b, 0x0d, 0xa2, 0x4a, 0x48, 0x09, 0x5d, 0x37, 0xa6, 0x43, 0xa4, 0x94, 0xf1, 0xaa, 0x81, - 0x38, 0x4b, 0x49, 0xae, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0x12, 0x42, 0x62, 0xfa, 0x58, 0x7d, 0xea, - 0x64, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, - 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x62, 0x10, 0x0d, 0x15, - 0x08, 0x2d, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0xc0, 0x31, 0x06, 0x04, 0x00, 0x00, - 0xff, 0xff, 0x01, 0xbe, 0xfe, 0xc3, 0xda, 0x01, 0x00, 0x00, + // 489 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xb3, 0xd1, 0x04, 0x3b, 0x82, 0xe0, 0x98, 0xc4, 0xb2, 0xda, 0xad, 0x8c, 0x56, 0xa5, + 0xc8, 0x8c, 0xa9, 0x27, 0x8f, 0xcd, 0xc1, 0x82, 0x17, 0xe3, 0x1e, 0x3d, 0x08, 0x93, 0x74, 0x58, + 0x16, 0x36, 0x33, 0x9b, 0x9d, 0x49, 0x69, 0x29, 0x5e, 0xfc, 0x04, 0x42, 0xbf, 0x84, 0x47, 0x3f, + 0x46, 0x8f, 0x05, 0x2f, 0x9e, 0x44, 0x12, 0xc1, 0xa3, 0x5f, 0x41, 0xf6, 0xcd, 0x94, 0x74, 0xa7, + 0x5b, 0xd3, 0x4b, 0x98, 0xcc, 0xfb, 0xbf, 0xf7, 0xff, 0xcd, 0x7b, 0x6f, 0x51, 0x98, 0x64, 0x33, + 0x25, 0xd9, 0x58, 0x49, 0x53, 0xf0, 0xb1, 0x61, 0xd3, 0x99, 0x28, 0x8e, 0x68, 0x5e, 0x28, 0xa3, + 0xf0, 0x1d, 0x88, 0xd1, 0xf3, 0x58, 0x78, 0x97, 0x4f, 0x52, 0xa9, 0x18, 0xfc, 0x5a, 0x49, 0xd8, + 0x49, 0x54, 0xa2, 0xe0, 0xc8, 0xca, 0x93, 0xbb, 0x7d, 0x98, 0x28, 0x95, 0x64, 0x82, 0xf1, 0x3c, + 0x65, 0x5c, 0x4a, 0x65, 0xb8, 0x49, 0x95, 0xd4, 0x2e, 0xba, 0x3d, 0x56, 0x7a, 0xa2, 0x34, 0x1b, + 0x71, 0x2d, 0xac, 0x1f, 0x3b, 0xe8, 0x8f, 0x84, 0xe1, 0x7d, 0x96, 0xf3, 0x24, 0x95, 0x20, 0x76, + 0xda, 0x07, 0x1e, 0x5e, 0xce, 0x0b, 0x3e, 0x39, 0x2f, 0xe4, 0xb3, 0xab, 0x62, 0x5f, 0x14, 0x36, + 0x46, 0x3a, 0x08, 0xbf, 0x2f, 0x4b, 0x0f, 0x21, 0x21, 0x16, 0xd3, 0x99, 0xd0, 0x86, 0x0c, 0xd1, + 0xbd, 0xca, 0xad, 0xce, 0x95, 0xd4, 0x02, 0xbf, 0x46, 0x6d, 0x5b, 0x78, 0x3d, 0x78, 0x14, 0x3c, + 0xbf, 0xbd, 0xd3, 0xa3, 0xd5, 0x97, 0x53, 0xab, 0x1f, 0xac, 0x9d, 0xfe, 0xdc, 0x6c, 0x7c, 0xfd, + 0xf3, 0x6d, 0x3b, 0x88, 0x5d, 0x02, 0x79, 0x81, 0x3a, 0x50, 0x71, 0x4f, 0x98, 0x77, 0xa5, 0xbd, + 0x73, 0xc2, 0x1d, 0xd4, 0x4a, 0xe5, 0xbe, 0x38, 0x84, 0x8a, 0x6b, 0xb1, 0xfd, 0x43, 0xde, 0xa2, + 0xae, 0xa7, 0x76, 0x04, 0x7d, 0xd4, 0x02, 0x7a, 0x07, 0xd0, 0xf5, 0x01, 0x40, 0x3d, 0xb8, 0x59, + 0xfa, 0xc7, 0x56, 0x49, 0x3e, 0x3a, 0xe7, 0xdd, 0x2c, 0xab, 0x38, 0xbf, 0x41, 0x68, 0xd9, 0x46, + 0x57, 0xef, 0x29, 0xb5, 0x3d, 0xa7, 0x65, 0xcf, 0xa9, 0x9d, 0xb1, 0xeb, 0x39, 0x1d, 0xf2, 0x44, + 0xb8, 0xdc, 0xf8, 0x42, 0x26, 0x39, 0x09, 0x1c, 0xec, 0xd2, 0xe0, 0x32, 0xec, 0x8d, 0xeb, 0xc1, + 0xe2, 0xbd, 0x0a, 0x54, 0x13, 0xa0, 0x9e, 0xad, 0x84, 0xb2, 0x7e, 0x17, 0xa9, 0x76, 0xfe, 0x36, + 0x51, 0x0b, 0xa8, 0xf0, 0x14, 0xb5, 0xed, 0x58, 0x30, 0xf1, 0x01, 0x2e, 0x4f, 0x3e, 0x7c, 0xfc, + 0x5f, 0x8d, 0x35, 0x22, 0xd1, 0xe7, 0xef, 0xbf, 0x4f, 0x9a, 0xeb, 0xb8, 0xc7, 0x6a, 0xd7, 0x0e, + 0x1f, 0xa3, 0x16, 0xbc, 0x0d, 0x3f, 0xa9, 0xad, 0xe6, 0xed, 0x40, 0xb8, 0xb5, 0x42, 0xe5, 0x5c, + 0xb7, 0xc0, 0x75, 0x13, 0x6f, 0xb0, 0xba, 0x7d, 0x66, 0xc7, 0xb0, 0x3a, 0x9f, 0xf0, 0x01, 0xba, + 0x05, 0x79, 0xbb, 0x59, 0x76, 0x85, 0xbf, 0xb7, 0x09, 0x57, 0xf8, 0xfb, 0xe3, 0x24, 0x1b, 0xe0, + 0x7f, 0x1f, 0x77, 0x6b, 0xfd, 0x07, 0x2f, 0x4f, 0xe7, 0x51, 0x70, 0x36, 0x8f, 0x82, 0x5f, 0xf3, + 0x28, 0xf8, 0xb2, 0x88, 0x1a, 0x67, 0x8b, 0xa8, 0xf1, 0x63, 0x11, 0x35, 0x3e, 0xf4, 0xac, 0xfe, + 0x70, 0x99, 0x61, 0x8e, 0x72, 0xa1, 0x47, 0x6d, 0xf8, 0x04, 0x5f, 0xfd, 0x0b, 0x00, 0x00, 0xff, + 0xff, 0x37, 0x78, 0xab, 0x00, 0x5c, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -158,6 +358,9 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a list of Order items. + Order(ctx context.Context, in *QueryGetOrderRequest, opts ...grpc.CallOption) (*QueryGetOrderResponse, error) + OrderAll(ctx context.Context, in *QueryAllOrderRequest, opts ...grpc.CallOption) (*QueryAllOrderResponse, error) } type queryClient struct { @@ -177,10 +380,31 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) Order(ctx context.Context, in *QueryGetOrderRequest, opts ...grpc.CallOption) (*QueryGetOrderResponse, error) { + out := new(QueryGetOrderResponse) + err := c.cc.Invoke(ctx, "/gluon.contract.Query/Order", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) OrderAll(ctx context.Context, in *QueryAllOrderRequest, opts ...grpc.CallOption) (*QueryAllOrderResponse, error) { + out := new(QueryAllOrderResponse) + err := c.cc.Invoke(ctx, "/gluon.contract.Query/OrderAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a list of Order items. + Order(context.Context, *QueryGetOrderRequest) (*QueryGetOrderResponse, error) + OrderAll(context.Context, *QueryAllOrderRequest) (*QueryAllOrderResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -190,6 +414,12 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) Order(ctx context.Context, req *QueryGetOrderRequest) (*QueryGetOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Order not implemented") +} +func (*UnimplementedQueryServer) OrderAll(ctx context.Context, req *QueryAllOrderRequest) (*QueryAllOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OrderAll not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -213,6 +443,42 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_Order_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Order(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gluon.contract.Query/Order", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Order(ctx, req.(*QueryGetOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_OrderAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).OrderAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gluon.contract.Query/OrderAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).OrderAll(ctx, req.(*QueryAllOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "gluon.contract.Query", @@ -222,6 +488,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "Order", + Handler: _Query_Order_Handler, + }, + { + MethodName: "OrderAll", + Handler: _Query_OrderAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gluon/contract/query.proto", @@ -283,6 +557,153 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryGetOrderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllOrderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Order) > 0 { + for iNdEx := len(m.Order) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Order[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -314,7 +735,63 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func sovQuery(x uint64) (n int) { +func (m *QueryGetOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Order) > 0 { + for _, e := range m.Order { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { @@ -453,6 +930,377 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetOrderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + 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.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllOrderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllOrderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Order = append(m.Order, Order{}) + if err := m.Order[len(m.Order)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/contract/types/query.pb.gw.go b/x/contract/types/query.pb.gw.go index c2c3f4d..a86658f 100644 --- a/x/contract/types/query.pb.gw.go +++ b/x/contract/types/query.pb.gw.go @@ -51,6 +51,96 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_Order_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetOrderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["index"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "index") + } + + protoReq.Index, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "index", err) + } + + msg, err := client.Order(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Order_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetOrderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["index"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "index") + } + + protoReq.Index, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "index", err) + } + + msg, err := server.Order(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_OrderAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_OrderAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllOrderRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_OrderAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.OrderAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_OrderAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllOrderRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_OrderAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.OrderAll(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -80,6 +170,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Order_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Order_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OrderAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_OrderAll_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OrderAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +277,61 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Order_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Order_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OrderAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_OrderAll_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OrderAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"gluon", "contract", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"gluon", "contract", "order", "index"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_OrderAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"gluon", "contract", "order"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Order_0 = runtime.ForwardResponseMessage + + forward_Query_OrderAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/contract/types/tx.pb.go b/x/contract/types/tx.pb.go index fbb3f1c..ed3d986 100644 --- a/x/contract/types/tx.pb.go +++ b/x/contract/types/tx.pb.go @@ -300,6 +300,270 @@ func (m *MsgMatchLazyOrderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMatchLazyOrderResponse proto.InternalMessageInfo +type MsgCreateOrder struct { + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (m *MsgCreateOrder) Reset() { *m = MsgCreateOrder{} } +func (m *MsgCreateOrder) String() string { return proto.CompactTextString(m) } +func (*MsgCreateOrder) ProtoMessage() {} +func (*MsgCreateOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_a41fd393ca4bcbb6, []int{6} +} +func (m *MsgCreateOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateOrder.Merge(m, src) +} +func (m *MsgCreateOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateOrder proto.InternalMessageInfo + +func (m *MsgCreateOrder) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *MsgCreateOrder) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +type MsgCreateOrderResponse struct { +} + +func (m *MsgCreateOrderResponse) Reset() { *m = MsgCreateOrderResponse{} } +func (m *MsgCreateOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateOrderResponse) ProtoMessage() {} +func (*MsgCreateOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a41fd393ca4bcbb6, []int{7} +} +func (m *MsgCreateOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateOrderResponse.Merge(m, src) +} +func (m *MsgCreateOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateOrderResponse proto.InternalMessageInfo + +type MsgUpdateOrder struct { + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (m *MsgUpdateOrder) Reset() { *m = MsgUpdateOrder{} } +func (m *MsgUpdateOrder) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateOrder) ProtoMessage() {} +func (*MsgUpdateOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_a41fd393ca4bcbb6, []int{8} +} +func (m *MsgUpdateOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateOrder.Merge(m, src) +} +func (m *MsgUpdateOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateOrder proto.InternalMessageInfo + +func (m *MsgUpdateOrder) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *MsgUpdateOrder) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +type MsgUpdateOrderResponse struct { +} + +func (m *MsgUpdateOrderResponse) Reset() { *m = MsgUpdateOrderResponse{} } +func (m *MsgUpdateOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateOrderResponse) ProtoMessage() {} +func (*MsgUpdateOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a41fd393ca4bcbb6, []int{9} +} +func (m *MsgUpdateOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateOrderResponse.Merge(m, src) +} +func (m *MsgUpdateOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateOrderResponse proto.InternalMessageInfo + +type MsgDeleteOrder struct { + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (m *MsgDeleteOrder) Reset() { *m = MsgDeleteOrder{} } +func (m *MsgDeleteOrder) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteOrder) ProtoMessage() {} +func (*MsgDeleteOrder) Descriptor() ([]byte, []int) { + return fileDescriptor_a41fd393ca4bcbb6, []int{10} +} +func (m *MsgDeleteOrder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteOrder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDeleteOrder) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteOrder.Merge(m, src) +} +func (m *MsgDeleteOrder) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteOrder) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteOrder.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteOrder proto.InternalMessageInfo + +func (m *MsgDeleteOrder) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *MsgDeleteOrder) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + +type MsgDeleteOrderResponse struct { +} + +func (m *MsgDeleteOrderResponse) Reset() { *m = MsgDeleteOrderResponse{} } +func (m *MsgDeleteOrderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteOrderResponse) ProtoMessage() {} +func (*MsgDeleteOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a41fd393ca4bcbb6, []int{11} +} +func (m *MsgDeleteOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteOrderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDeleteOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteOrderResponse.Merge(m, src) +} +func (m *MsgDeleteOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteOrderResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "gluon.contract.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "gluon.contract.MsgUpdateParamsResponse") @@ -307,42 +571,55 @@ func init() { proto.RegisterType((*MsgMatchOrderResponse)(nil), "gluon.contract.MsgMatchOrderResponse") proto.RegisterType((*MsgMatchLazyOrder)(nil), "gluon.contract.MsgMatchLazyOrder") proto.RegisterType((*MsgMatchLazyOrderResponse)(nil), "gluon.contract.MsgMatchLazyOrderResponse") + proto.RegisterType((*MsgCreateOrder)(nil), "gluon.contract.MsgCreateOrder") + proto.RegisterType((*MsgCreateOrderResponse)(nil), "gluon.contract.MsgCreateOrderResponse") + proto.RegisterType((*MsgUpdateOrder)(nil), "gluon.contract.MsgUpdateOrder") + proto.RegisterType((*MsgUpdateOrderResponse)(nil), "gluon.contract.MsgUpdateOrderResponse") + proto.RegisterType((*MsgDeleteOrder)(nil), "gluon.contract.MsgDeleteOrder") + proto.RegisterType((*MsgDeleteOrderResponse)(nil), "gluon.contract.MsgDeleteOrderResponse") } func init() { proto.RegisterFile("gluon/contract/tx.proto", fileDescriptor_a41fd393ca4bcbb6) } var fileDescriptor_a41fd393ca4bcbb6 = []byte{ - // 473 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0x29, 0xcd, - 0xcf, 0xd3, 0x4f, 0xce, 0xcf, 0x2b, 0x29, 0x4a, 0x4c, 0x2e, 0xd1, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0x4b, 0xe8, 0xc1, 0x24, 0xa4, 0x04, 0x13, 0x73, 0x33, 0xf3, - 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x89, 0x94, 0x78, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0xb1, 0x7e, 0x6e, - 0x71, 0xba, 0x7e, 0x99, 0x21, 0x88, 0x82, 0x4a, 0x48, 0x42, 0x24, 0xe2, 0xc1, 0x3c, 0x7d, 0x08, - 0x07, 0x2a, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x11, 0x07, 0xb1, 0xa0, 0xa2, 0xd2, 0x68, 0xae, - 0x28, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x69, 0x91, 0x42, 0x93, 0xcc, 0x2f, 0x4a, 0x49, 0x2d, 0x82, - 0xc8, 0x29, 0xed, 0x64, 0xe4, 0xe2, 0xf7, 0x2d, 0x4e, 0x0f, 0x2d, 0x48, 0x49, 0x2c, 0x49, 0x0d, - 0x00, 0xeb, 0x12, 0x32, 0xe3, 0xe2, 0x4c, 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0x2c, 0xa9, 0x94, - 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xb8, 0xb4, 0x45, 0x57, 0x04, 0xea, 0x0e, 0xc7, 0x94, - 0x94, 0xa2, 0xd4, 0xe2, 0xe2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x84, 0x52, 0x21, 0x4b, - 0x2e, 0x36, 0x88, 0xbd, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x62, 0x7a, 0xa8, 0x41, 0xa0, - 0x07, 0x31, 0xdf, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86, 0x15, 0xcf, 0x37, 0x68, 0x31, 0x06, 0x41, - 0x35, 0x58, 0x19, 0x37, 0x3d, 0xdf, 0xa0, 0x85, 0x30, 0xaa, 0xeb, 0xf9, 0x06, 0x2d, 0x05, 0x88, - 0xab, 0x2b, 0x10, 0xee, 0x46, 0x73, 0xa7, 0x92, 0x24, 0x97, 0x38, 0x9a, 0x50, 0x50, 0x6a, 0x71, - 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0xd2, 0x6a, 0x46, 0x2e, 0x5e, 0xdf, 0xe2, 0x74, 0xdf, 0xc4, 0x92, - 0xe4, 0x0c, 0x7f, 0x90, 0x77, 0x85, 0xac, 0xb8, 0xd8, 0x53, 0x13, 0x8b, 0x72, 0x32, 0x53, 0x8b, - 0xc0, 0x5e, 0xe2, 0x36, 0x12, 0x45, 0x77, 0x1d, 0x58, 0x1d, 0xb2, 0xe3, 0x60, 0x1a, 0x84, 0xcc, - 0xb8, 0x58, 0x73, 0x12, 0x4b, 0x52, 0x8b, 0xa0, 0xfe, 0x22, 0xac, 0x13, 0xa2, 0xdc, 0x4a, 0x0d, - 0xe4, 0x2b, 0x7e, 0xa8, 0x29, 0x7a, 0x89, 0x90, 0x70, 0x03, 0x89, 0xf1, 0x82, 0xe5, 0x61, 0x22, - 0x4a, 0xe2, 0x5c, 0xa2, 0x28, 0x8e, 0x85, 0x7b, 0x63, 0x3d, 0x23, 0x97, 0x20, 0x4c, 0xc6, 0x27, - 0xb1, 0xaa, 0x72, 0xf0, 0x7b, 0x45, 0x9a, 0x4b, 0x12, 0xc3, 0xc1, 0x30, 0xef, 0x18, 0xcd, 0x62, - 0xe2, 0x62, 0xf6, 0x2d, 0x4e, 0x17, 0x8a, 0xe0, 0xe2, 0x41, 0x49, 0x70, 0xf2, 0xe8, 0xae, 0x40, - 0x8b, 0x56, 0x29, 0x75, 0x02, 0x0a, 0x60, 0x36, 0x08, 0x05, 0x71, 0x71, 0x21, 0xc5, 0xb9, 0x2c, - 0x16, 0x6d, 0x08, 0x69, 0x29, 0x55, 0xbc, 0xd2, 0x70, 0x33, 0xe3, 0xb8, 0xf8, 0xd0, 0x22, 0x40, - 0x11, 0x97, 0x46, 0xb8, 0x12, 0x29, 0x4d, 0x82, 0x4a, 0x60, 0xe6, 0x4b, 0xb1, 0x36, 0x80, 0x02, - 0xda, 0xc9, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, - 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xc4, 0x30, 0x72, - 0x42, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x0b, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x54, 0x59, 0x9b, 0xb3, 0x83, 0x04, 0x00, 0x00, + // 585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0xa1, 0x2d, 0xf2, 0x0b, 0x4d, 0x55, 0x2b, 0xcd, 0x0f, 0x57, 0xb8, 0x21, 0x12, 0xa5, + 0x44, 0x22, 0x86, 0x54, 0xaa, 0x44, 0x36, 0x02, 0x6c, 0x44, 0x20, 0xa3, 0x4a, 0x88, 0x01, 0x74, + 0x24, 0x27, 0x37, 0x52, 0xe2, 0x8b, 0xee, 0x2e, 0x28, 0x61, 0x42, 0x8c, 0x4c, 0xfc, 0x07, 0xac, + 0x48, 0x0c, 0x64, 0x60, 0xe1, 0x3f, 0xe8, 0x58, 0x31, 0x31, 0x21, 0x94, 0x0c, 0xf9, 0x37, 0x90, + 0xef, 0x6c, 0xc7, 0xb9, 0x3a, 0xcd, 0x00, 0x03, 0x4b, 0x72, 0xf7, 0xbe, 0xf7, 0xbe, 0xf7, 0x7d, + 0xe7, 0x77, 0x07, 0x79, 0xb7, 0x3b, 0x20, 0x9e, 0xdd, 0x22, 0x1e, 0xa7, 0xa8, 0xc5, 0x6d, 0x3e, + 0xac, 0xf6, 0x29, 0xe1, 0xc4, 0xc8, 0x08, 0xa0, 0x1a, 0x02, 0xe6, 0x36, 0xea, 0x75, 0x3c, 0x62, + 0x8b, 0x5f, 0x99, 0x62, 0xe6, 0x5b, 0x84, 0xf5, 0x08, 0xb3, 0x7b, 0xcc, 0xb5, 0xdf, 0xdc, 0xf5, + 0xff, 0x02, 0xa0, 0x28, 0x81, 0x57, 0x62, 0x67, 0xcb, 0x4d, 0x00, 0x65, 0x5d, 0xe2, 0x12, 0x19, + 0xf7, 0x57, 0x41, 0x74, 0x57, 0x51, 0xd1, 0x47, 0x14, 0xf5, 0xc2, 0x12, 0x53, 0x01, 0x09, 0x6d, + 0x63, 0x2a, 0xb1, 0xf2, 0x77, 0x0d, 0xb6, 0x9a, 0xcc, 0x3d, 0xee, 0xb7, 0x11, 0xc7, 0x4f, 0x45, + 0x95, 0x71, 0x04, 0x3a, 0x1a, 0xf0, 0x13, 0x42, 0x3b, 0x7c, 0x54, 0xd0, 0x4a, 0xda, 0x81, 0xde, + 0x28, 0xfc, 0xf8, 0x76, 0x3b, 0x1b, 0xe8, 0xb8, 0xdf, 0x6e, 0x53, 0xcc, 0xd8, 0x33, 0x4e, 0x3b, + 0x9e, 0xeb, 0xcc, 0x53, 0x8d, 0x7b, 0xb0, 0x21, 0xfb, 0x16, 0x2e, 0x95, 0xb4, 0x83, 0x74, 0x2d, + 0x57, 0x5d, 0x3c, 0x82, 0xaa, 0xe4, 0x6f, 0xe8, 0xa7, 0xbf, 0xf6, 0x52, 0x9f, 0x67, 0xe3, 0x8a, + 0xe6, 0x04, 0x05, 0xf5, 0xc3, 0xf7, 0xb3, 0x71, 0x65, 0x4e, 0xf5, 0x61, 0x36, 0xae, 0x94, 0xa4, + 0xea, 0xe1, 0x5c, 0xb7, 0xa2, 0xb3, 0x5c, 0x84, 0xbc, 0x12, 0x72, 0x30, 0xeb, 0x13, 0x8f, 0xe1, + 0xf2, 0x17, 0x0d, 0x36, 0x9b, 0xcc, 0x6d, 0x22, 0xde, 0x3a, 0x79, 0xe2, 0xdb, 0x35, 0xea, 0x70, + 0x05, 0x23, 0xda, 0xed, 0x60, 0x2a, 0x2c, 0xa5, 0x6b, 0x3b, 0xaa, 0x3a, 0x91, 0x17, 0x17, 0x17, + 0x16, 0x18, 0x47, 0xb0, 0xde, 0x45, 0x1c, 0xd3, 0xc0, 0xd7, 0xea, 0x4a, 0x99, 0x5e, 0xdf, 0xf7, + 0x5d, 0x6d, 0x05, 0x2c, 0x55, 0x24, 0xcf, 0xcd, 0x8f, 0x6d, 0x0a, 0x3c, 0x8c, 0x94, 0xf3, 0xb0, + 0xb3, 0x20, 0x36, 0xb2, 0xf1, 0x55, 0x83, 0xed, 0x10, 0x79, 0x8c, 0xde, 0x8e, 0xfe, 0x7f, 0x2b, + 0xbb, 0x50, 0x3c, 0x27, 0x38, 0xb2, 0xf3, 0x08, 0x32, 0x4d, 0xe6, 0x3e, 0xa0, 0x18, 0x71, 0x2c, + 0xad, 0x18, 0xb0, 0x36, 0x60, 0x81, 0x0f, 0xdd, 0x11, 0x6b, 0x23, 0x0b, 0xeb, 0x1d, 0xaf, 0x8d, + 0x87, 0x42, 0xa2, 0xee, 0xc8, 0x4d, 0x5d, 0xf7, 0x9b, 0x89, 0x84, 0x72, 0x01, 0x72, 0x8b, 0x34, + 0x4a, 0x03, 0x39, 0x11, 0x7f, 0xdd, 0x20, 0x46, 0xa3, 0x34, 0x78, 0x88, 0xbb, 0xf8, 0x1f, 0x34, + 0x88, 0xd1, 0x84, 0x0d, 0x6a, 0x9f, 0xd6, 0xe0, 0x72, 0x93, 0xb9, 0xc6, 0x73, 0xb8, 0xba, 0x70, + 0x27, 0xf7, 0xd4, 0x0f, 0xa5, 0x4c, 0xbe, 0x79, 0x73, 0x45, 0x42, 0xd8, 0xc1, 0x70, 0x00, 0x62, + 0xd7, 0xe2, 0x5a, 0x42, 0xd9, 0x1c, 0x36, 0x6f, 0x5c, 0x08, 0x47, 0x9c, 0x2f, 0x21, 0xa3, 0xcc, + 0xe8, 0xf5, 0x65, 0x85, 0x51, 0x8a, 0x79, 0x6b, 0x65, 0x4a, 0xc4, 0x7f, 0x0c, 0xe9, 0xf8, 0xd4, + 0x58, 0x09, 0x95, 0x31, 0xdc, 0xdc, 0xbf, 0x18, 0x8f, 0xd3, 0xc6, 0x67, 0xc5, 0x5a, 0x7a, 0x84, + 0xcb, 0x69, 0x13, 0x86, 0xc4, 0xa7, 0x8d, 0x4f, 0x48, 0x12, 0x6d, 0x0c, 0x4f, 0xa4, 0x4d, 0x18, + 0x0d, 0x73, 0xfd, 0x9d, 0x7f, 0x21, 0x1b, 0x77, 0x4e, 0x27, 0x96, 0x76, 0x36, 0xb1, 0xb4, 0xdf, + 0x13, 0x4b, 0xfb, 0x38, 0xb5, 0x52, 0x67, 0x53, 0x2b, 0xf5, 0x73, 0x6a, 0xa5, 0x5e, 0xe4, 0xce, + 0xbd, 0x98, 0x7c, 0xd4, 0xc7, 0xec, 0xf5, 0x86, 0x78, 0xea, 0x0f, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0xc8, 0x39, 0x6a, 0x5b, 0xab, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -362,6 +639,9 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) MatchOrder(ctx context.Context, in *MsgMatchOrder, opts ...grpc.CallOption) (*MsgMatchOrderResponse, error) MatchLazyOrder(ctx context.Context, in *MsgMatchLazyOrder, opts ...grpc.CallOption) (*MsgMatchLazyOrderResponse, error) + CreateOrder(ctx context.Context, in *MsgCreateOrder, opts ...grpc.CallOption) (*MsgCreateOrderResponse, error) + UpdateOrder(ctx context.Context, in *MsgUpdateOrder, opts ...grpc.CallOption) (*MsgUpdateOrderResponse, error) + DeleteOrder(ctx context.Context, in *MsgDeleteOrder, opts ...grpc.CallOption) (*MsgDeleteOrderResponse, error) } type msgClient struct { @@ -399,6 +679,33 @@ func (c *msgClient) MatchLazyOrder(ctx context.Context, in *MsgMatchLazyOrder, o return out, nil } +func (c *msgClient) CreateOrder(ctx context.Context, in *MsgCreateOrder, opts ...grpc.CallOption) (*MsgCreateOrderResponse, error) { + out := new(MsgCreateOrderResponse) + err := c.cc.Invoke(ctx, "/gluon.contract.Msg/CreateOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateOrder(ctx context.Context, in *MsgUpdateOrder, opts ...grpc.CallOption) (*MsgUpdateOrderResponse, error) { + out := new(MsgUpdateOrderResponse) + err := c.cc.Invoke(ctx, "/gluon.contract.Msg/UpdateOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteOrder(ctx context.Context, in *MsgDeleteOrder, opts ...grpc.CallOption) (*MsgDeleteOrderResponse, error) { + out := new(MsgDeleteOrderResponse) + err := c.cc.Invoke(ctx, "/gluon.contract.Msg/DeleteOrder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module @@ -406,6 +713,9 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) MatchOrder(context.Context, *MsgMatchOrder) (*MsgMatchOrderResponse, error) MatchLazyOrder(context.Context, *MsgMatchLazyOrder) (*MsgMatchLazyOrderResponse, error) + CreateOrder(context.Context, *MsgCreateOrder) (*MsgCreateOrderResponse, error) + UpdateOrder(context.Context, *MsgUpdateOrder) (*MsgUpdateOrderResponse, error) + DeleteOrder(context.Context, *MsgDeleteOrder) (*MsgDeleteOrderResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -421,6 +731,15 @@ func (*UnimplementedMsgServer) MatchOrder(ctx context.Context, req *MsgMatchOrde func (*UnimplementedMsgServer) MatchLazyOrder(ctx context.Context, req *MsgMatchLazyOrder) (*MsgMatchLazyOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MatchLazyOrder not implemented") } +func (*UnimplementedMsgServer) CreateOrder(ctx context.Context, req *MsgCreateOrder) (*MsgCreateOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOrder not implemented") +} +func (*UnimplementedMsgServer) UpdateOrder(ctx context.Context, req *MsgUpdateOrder) (*MsgUpdateOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOrder not implemented") +} +func (*UnimplementedMsgServer) DeleteOrder(ctx context.Context, req *MsgDeleteOrder) (*MsgDeleteOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOrder not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -480,6 +799,60 @@ func _Msg_MatchLazyOrder_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_CreateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gluon.contract.Msg/CreateOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateOrder(ctx, req.(*MsgCreateOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gluon.contract.Msg/UpdateOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateOrder(ctx, req.(*MsgUpdateOrder)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteOrder) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gluon.contract.Msg/DeleteOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteOrder(ctx, req.(*MsgDeleteOrder)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "gluon.contract.Msg", @@ -497,6 +870,18 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "MatchLazyOrder", Handler: _Msg_MatchLazyOrder_Handler, }, + { + MethodName: "CreateOrder", + Handler: _Msg_CreateOrder_Handler, + }, + { + MethodName: "UpdateOrder", + Handler: _Msg_UpdateOrder_Handler, + }, + { + MethodName: "DeleteOrder", + Handler: _Msg_DeleteOrder_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "gluon/contract/tx.proto", @@ -666,123 +1051,878 @@ func (m *MsgMatchLazyOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { if err != nil { return 0, err } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgMatchLazyOrderResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgMatchLazyOrderResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMatchLazyOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgMatchOrder) Size() (n int) { - if m == nil { - return 0 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgMatchLazyOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgMatchLazyOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMatchLazyOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCreateOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintTx(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x12 + } + if len(m.User) > 0 { + i -= len(m.User) + copy(dAtA[i:], m.User) + i = encodeVarintTx(dAtA, i, uint64(len(m.User))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintTx(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x12 + } + if len(m.User) > 0 { + i -= len(m.User) + copy(dAtA[i:], m.User) + i = encodeVarintTx(dAtA, i, uint64(len(m.User))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteOrder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDeleteOrder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintTx(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x12 + } + if len(m.User) > 0 { + i -= len(m.User) + copy(dAtA[i:], m.User) + i = encodeVarintTx(dAtA, i, uint64(len(m.User))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteOrderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDeleteOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgMatchOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Earlier.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Later.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgMatchOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgMatchLazyOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Earlier.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.Later.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgMatchLazyOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.User) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Index) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.User) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Index) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteOrder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.User) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Index) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDeleteOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMatchOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMatchOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMatchOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Earlier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Earlier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Later", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Later.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMatchOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMatchOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMatchOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMatchLazyOrder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMatchLazyOrder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMatchLazyOrder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Earlier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Earlier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Later", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Later.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - var l int - _ = l - l = m.Earlier.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.Later.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} -func (m *MsgMatchOrderResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n + return nil } - -func (m *MsgMatchLazyOrder) Size() (n int) { - if m == nil { - return 0 +func (m *MsgMatchLazyOrderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMatchLazyOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMatchLazyOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - var l int - _ = l - l = m.Earlier.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.Later.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} -func (m *MsgMatchLazyOrderResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { +func (m *MsgCreateOrder) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -805,15 +1945,15 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateOrder: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateOrder: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -841,13 +1981,13 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.User = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -857,24 +1997,23 @@ func (m *MsgUpdateParams) 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 err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Index = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -897,7 +2036,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCreateOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -920,10 +2059,10 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -947,7 +2086,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMatchOrder) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateOrder) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -970,17 +2109,17 @@ func (m *MsgMatchOrder) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMatchOrder: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateOrder: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMatchOrder: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateOrder: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Earlier", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -990,30 +2129,29 @@ func (m *MsgMatchOrder) 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 err := m.Earlier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.User = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Later", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1023,24 +2161,23 @@ func (m *MsgMatchOrder) 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 err := m.Later.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Index = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1063,7 +2200,7 @@ func (m *MsgMatchOrder) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMatchOrderResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1086,10 +2223,10 @@ func (m *MsgMatchOrderResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMatchOrderResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMatchOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1113,7 +2250,7 @@ func (m *MsgMatchOrderResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMatchLazyOrder) Unmarshal(dAtA []byte) error { +func (m *MsgDeleteOrder) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1136,17 +2273,17 @@ func (m *MsgMatchLazyOrder) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMatchLazyOrder: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeleteOrder: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMatchLazyOrder: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeleteOrder: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Earlier", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1156,30 +2293,29 @@ func (m *MsgMatchLazyOrder) 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 err := m.Earlier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.User = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Later", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1189,24 +2325,23 @@ func (m *MsgMatchLazyOrder) 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 err := m.Later.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Index = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1229,7 +2364,7 @@ func (m *MsgMatchLazyOrder) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMatchLazyOrderResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDeleteOrderResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1252,10 +2387,10 @@ func (m *MsgMatchLazyOrderResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMatchLazyOrderResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeleteOrderResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMatchLazyOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeleteOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/customauth/ante/expected_keepers.go b/x/customauth/ante/expected_keepers.go index cae8aa7..f21061d 100644 --- a/x/customauth/ante/expected_keepers.go +++ b/x/customauth/ante/expected_keepers.go @@ -8,8 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "gluon/x/customauth/types" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) // AccountKeeper defines the contract needed for AccountKeeper related APIs.