diff --git a/api/poktroll/supplier/tx.pulsar.go b/api/poktroll/supplier/tx.pulsar.go index ec93f9704..1d2057b01 100644 --- a/api/poktroll/supplier/tx.pulsar.go +++ b/api/poktroll/supplier/tx.pulsar.go @@ -2834,6 +2834,1043 @@ func (x *fastReflection_MsgUnstakeSupplierResponse) ProtoMethods() *protoiface.M } } +var ( + md_MsgUpdateParam protoreflect.MessageDescriptor + fd_MsgUpdateParam_authority protoreflect.FieldDescriptor + fd_MsgUpdateParam_name protoreflect.FieldDescriptor + fd_MsgUpdateParam_as_coin protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_supplier_tx_proto_init() + md_MsgUpdateParam = File_poktroll_supplier_tx_proto.Messages().ByName("MsgUpdateParam") + fd_MsgUpdateParam_authority = md_MsgUpdateParam.Fields().ByName("authority") + fd_MsgUpdateParam_name = md_MsgUpdateParam.Fields().ByName("name") + fd_MsgUpdateParam_as_coin = md_MsgUpdateParam.Fields().ByName("as_coin") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParam)(nil) + +type fastReflection_MsgUpdateParam MsgUpdateParam + +func (x *MsgUpdateParam) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParam)(x) +} + +func (x *MsgUpdateParam) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_supplier_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_MsgUpdateParam_messageType fastReflection_MsgUpdateParam_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParam_messageType{} + +type fastReflection_MsgUpdateParam_messageType struct{} + +func (x fastReflection_MsgUpdateParam_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParam)(nil) +} +func (x fastReflection_MsgUpdateParam_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParam) +} +func (x fastReflection_MsgUpdateParam_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParam +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParam) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParam +} + +// 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_MsgUpdateParam) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParam_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParam) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParam) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParam) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParam)(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_MsgUpdateParam) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParam_authority, value) { + return + } + } + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_MsgUpdateParam_name, value) { + return + } + } + if x.AsType != nil { + switch o := x.AsType.(type) { + case *MsgUpdateParam_AsCoin: + v := o.AsCoin + value := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(fd_MsgUpdateParam_as_coin, 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_MsgUpdateParam) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParam.authority": + return x.Authority != "" + case "poktroll.supplier.MsgUpdateParam.name": + return x.Name != "" + case "poktroll.supplier.MsgUpdateParam.as_coin": + if x.AsType == nil { + return false + } else if _, ok := x.AsType.(*MsgUpdateParam_AsCoin); ok { + return true + } else { + return false + } + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParam")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParam 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_MsgUpdateParam) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParam.authority": + x.Authority = "" + case "poktroll.supplier.MsgUpdateParam.name": + x.Name = "" + case "poktroll.supplier.MsgUpdateParam.as_coin": + x.AsType = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParam")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParam 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_MsgUpdateParam) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.supplier.MsgUpdateParam.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "poktroll.supplier.MsgUpdateParam.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "poktroll.supplier.MsgUpdateParam.as_coin": + if x.AsType == nil { + return protoreflect.ValueOfMessage((*v1beta1.Coin)(nil).ProtoReflect()) + } else if v, ok := x.AsType.(*MsgUpdateParam_AsCoin); ok { + return protoreflect.ValueOfMessage(v.AsCoin.ProtoReflect()) + } else { + return protoreflect.ValueOfMessage((*v1beta1.Coin)(nil).ProtoReflect()) + } + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParam")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParam 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_MsgUpdateParam) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParam.authority": + x.Authority = value.Interface().(string) + case "poktroll.supplier.MsgUpdateParam.name": + x.Name = value.Interface().(string) + case "poktroll.supplier.MsgUpdateParam.as_coin": + cv := value.Message().Interface().(*v1beta1.Coin) + x.AsType = &MsgUpdateParam_AsCoin{AsCoin: cv} + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParam")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParam 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_MsgUpdateParam) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParam.as_coin": + if x.AsType == nil { + value := &v1beta1.Coin{} + oneofValue := &MsgUpdateParam_AsCoin{AsCoin: value} + x.AsType = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + switch m := x.AsType.(type) { + case *MsgUpdateParam_AsCoin: + return protoreflect.ValueOfMessage(m.AsCoin.ProtoReflect()) + default: + value := &v1beta1.Coin{} + oneofValue := &MsgUpdateParam_AsCoin{AsCoin: value} + x.AsType = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + case "poktroll.supplier.MsgUpdateParam.authority": + panic(fmt.Errorf("field authority of message poktroll.supplier.MsgUpdateParam is not mutable")) + case "poktroll.supplier.MsgUpdateParam.name": + panic(fmt.Errorf("field name of message poktroll.supplier.MsgUpdateParam is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParam")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParam 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_MsgUpdateParam) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParam.authority": + return protoreflect.ValueOfString("") + case "poktroll.supplier.MsgUpdateParam.name": + return protoreflect.ValueOfString("") + case "poktroll.supplier.MsgUpdateParam.as_coin": + value := &v1beta1.Coin{} + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParam")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParam 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_MsgUpdateParam) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + case "poktroll.supplier.MsgUpdateParam.asType": + if x.AsType == nil { + return nil + } + switch x.AsType.(type) { + case *MsgUpdateParam_AsCoin: + return x.Descriptor().Fields().ByName("as_coin") + } + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.supplier.MsgUpdateParam", 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_MsgUpdateParam) 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_MsgUpdateParam) 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_MsgUpdateParam) 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_MsgUpdateParam) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParam) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + switch x := x.AsType.(type) { + case *MsgUpdateParam_AsCoin: + if x == nil { + break + } + l = options.Size(x.AsCoin) + 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().(*MsgUpdateParam) + 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) + } + switch x := x.AsType.(type) { + case *MsgUpdateParam_AsCoin: + encoded, err := options.Marshal(x.AsCoin) + 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.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgUpdateParam) + 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: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParam: 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 Authority", 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.Authority = 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 Name", 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.Name = 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 AsCoin", 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 + } + v := &v1beta1.Coin{} + if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + x.AsType = &MsgUpdateParam_AsCoin{v} + 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_MsgUpdateParamResponse protoreflect.MessageDescriptor + fd_MsgUpdateParamResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_supplier_tx_proto_init() + md_MsgUpdateParamResponse = File_poktroll_supplier_tx_proto.Messages().ByName("MsgUpdateParamResponse") + fd_MsgUpdateParamResponse_params = md_MsgUpdateParamResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamResponse)(nil) + +type fastReflection_MsgUpdateParamResponse MsgUpdateParamResponse + +func (x *MsgUpdateParamResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamResponse)(x) +} + +func (x *MsgUpdateParamResponse) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_supplier_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_MsgUpdateParamResponse_messageType fastReflection_MsgUpdateParamResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamResponse_messageType{} + +type fastReflection_MsgUpdateParamResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamResponse)(nil) +} +func (x fastReflection_MsgUpdateParamResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamResponse) +} +func (x fastReflection_MsgUpdateParamResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamResponse +} + +// 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_MsgUpdateParamResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamResponse)(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_MsgUpdateParamResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParamResponse_params, 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_MsgUpdateParamResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParamResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParamResponse")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParamResponse 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_MsgUpdateParamResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParamResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParamResponse")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParamResponse 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_MsgUpdateParamResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.supplier.MsgUpdateParamResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParamResponse")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParamResponse 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_MsgUpdateParamResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParamResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParamResponse")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParamResponse 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_MsgUpdateParamResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParamResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParamResponse")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParamResponse 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_MsgUpdateParamResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.supplier.MsgUpdateParamResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.supplier.MsgUpdateParamResponse")) + } + panic(fmt.Errorf("message poktroll.supplier.MsgUpdateParamResponse 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_MsgUpdateParamResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.supplier.MsgUpdateParamResponse", 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_MsgUpdateParamResponse) 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_MsgUpdateParamResponse) 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_MsgUpdateParamResponse) 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_MsgUpdateParamResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamResponse) + 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.Params != nil { + l = options.Size(x.Params) + 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().(*MsgUpdateParamResponse) + 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.Params != nil { + encoded, err := options.Marshal(x.Params) + 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().(*MsgUpdateParamResponse) + 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: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamResponse: 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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 @@ -3084,6 +4121,114 @@ func (*MsgUnstakeSupplierResponse) Descriptor() ([]byte, []int) { return file_poktroll_supplier_tx_proto_rawDescGZIP(), []int{5} } +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are assignable to AsType: + // + // *MsgUpdateParam_AsCoin + AsType isMsgUpdateParam_AsType `protobuf_oneof:"asType"` +} + +func (x *MsgUpdateParam) Reset() { + *x = MsgUpdateParam{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_supplier_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParam) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParam) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParam.ProtoReflect.Descriptor instead. +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return file_poktroll_supplier_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgUpdateParam) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParam) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if x != nil { + return x.AsType + } + return nil +} + +func (x *MsgUpdateParam) GetAsCoin() *v1beta1.Coin { + if x, ok := x.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() +} + +type MsgUpdateParam_AsCoin struct { + AsCoin *v1beta1.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof"` +} + +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} + +type MsgUpdateParamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParamResponse) Reset() { + *x = MsgUpdateParamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_supplier_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return file_poktroll_supplier_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgUpdateParamResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + var File_poktroll_supplier_tx_proto protoreflect.FileDescriptor var file_poktroll_supplier_tx_proto_rawDesc = []byte{ @@ -3149,38 +4294,60 @@ var file_poktroll_supplier_tx_proto_rawDesc = []byte{ 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x02, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x5e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x36, 0x0a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 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, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x73, 0x5f, + 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x61, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x3a, + 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, + 0x08, 0x0a, 0x06, 0x61, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x16, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, + 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x95, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5e, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, + 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 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, 0x61, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, - 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0f, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x1a, - 0x2d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, - 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xad, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, 0x63, 0x6f, - 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, - 0x69, 0x65, 0x72, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x58, 0xaa, 0x02, 0x11, 0x50, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0xca, 0x02, 0x11, 0x50, - 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, - 0xe2, 0x02, 0x1d, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x53, 0x75, 0x70, 0x70, - 0x6c, 0x69, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x12, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x53, 0x75, 0x70, - 0x70, 0x6c, 0x69, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, + 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, + 0x23, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, + 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6c, 0x69, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, + 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x67, 0x0a, 0x0f, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6c, 0x69, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, + 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x1a, 0x2d, 0x2e, 0x70, 0x6f, + 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0b, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x29, 0x2e, 0x70, + 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xad, + 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x50, 0x53, + 0x58, 0xaa, 0x02, 0x11, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x53, 0x75, 0x70, + 0x70, 0x6c, 0x69, 0x65, 0x72, 0xca, 0x02, 0x11, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x5c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0xe2, 0x02, 0x1d, 0x50, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x50, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3195,7 +4362,7 @@ func file_poktroll_supplier_tx_proto_rawDescGZIP() []byte { return file_poktroll_supplier_tx_proto_rawDescData } -var file_poktroll_supplier_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_poktroll_supplier_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_poktroll_supplier_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: poktroll.supplier.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: poktroll.supplier.MsgUpdateParamsResponse @@ -3203,25 +4370,31 @@ var file_poktroll_supplier_tx_proto_goTypes = []interface{}{ (*MsgStakeSupplierResponse)(nil), // 3: poktroll.supplier.MsgStakeSupplierResponse (*MsgUnstakeSupplier)(nil), // 4: poktroll.supplier.MsgUnstakeSupplier (*MsgUnstakeSupplierResponse)(nil), // 5: poktroll.supplier.MsgUnstakeSupplierResponse - (*Params)(nil), // 6: poktroll.supplier.Params - (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin - (*shared.SupplierServiceConfig)(nil), // 8: poktroll.shared.SupplierServiceConfig + (*MsgUpdateParam)(nil), // 6: poktroll.supplier.MsgUpdateParam + (*MsgUpdateParamResponse)(nil), // 7: poktroll.supplier.MsgUpdateParamResponse + (*Params)(nil), // 8: poktroll.supplier.Params + (*v1beta1.Coin)(nil), // 9: cosmos.base.v1beta1.Coin + (*shared.SupplierServiceConfig)(nil), // 10: poktroll.shared.SupplierServiceConfig } var file_poktroll_supplier_tx_proto_depIdxs = []int32{ - 6, // 0: poktroll.supplier.MsgUpdateParams.params:type_name -> poktroll.supplier.Params - 7, // 1: poktroll.supplier.MsgStakeSupplier.stake:type_name -> cosmos.base.v1beta1.Coin - 8, // 2: poktroll.supplier.MsgStakeSupplier.services:type_name -> poktroll.shared.SupplierServiceConfig - 0, // 3: poktroll.supplier.Msg.UpdateParams:input_type -> poktroll.supplier.MsgUpdateParams - 2, // 4: poktroll.supplier.Msg.StakeSupplier:input_type -> poktroll.supplier.MsgStakeSupplier - 4, // 5: poktroll.supplier.Msg.UnstakeSupplier:input_type -> poktroll.supplier.MsgUnstakeSupplier - 1, // 6: poktroll.supplier.Msg.UpdateParams:output_type -> poktroll.supplier.MsgUpdateParamsResponse - 3, // 7: poktroll.supplier.Msg.StakeSupplier:output_type -> poktroll.supplier.MsgStakeSupplierResponse - 5, // 8: poktroll.supplier.Msg.UnstakeSupplier:output_type -> poktroll.supplier.MsgUnstakeSupplierResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 8, // 0: poktroll.supplier.MsgUpdateParams.params:type_name -> poktroll.supplier.Params + 9, // 1: poktroll.supplier.MsgStakeSupplier.stake:type_name -> cosmos.base.v1beta1.Coin + 10, // 2: poktroll.supplier.MsgStakeSupplier.services:type_name -> poktroll.shared.SupplierServiceConfig + 9, // 3: poktroll.supplier.MsgUpdateParam.as_coin:type_name -> cosmos.base.v1beta1.Coin + 8, // 4: poktroll.supplier.MsgUpdateParamResponse.params:type_name -> poktroll.supplier.Params + 0, // 5: poktroll.supplier.Msg.UpdateParams:input_type -> poktroll.supplier.MsgUpdateParams + 2, // 6: poktroll.supplier.Msg.StakeSupplier:input_type -> poktroll.supplier.MsgStakeSupplier + 4, // 7: poktroll.supplier.Msg.UnstakeSupplier:input_type -> poktroll.supplier.MsgUnstakeSupplier + 6, // 8: poktroll.supplier.Msg.UpdateParam:input_type -> poktroll.supplier.MsgUpdateParam + 1, // 9: poktroll.supplier.Msg.UpdateParams:output_type -> poktroll.supplier.MsgUpdateParamsResponse + 3, // 10: poktroll.supplier.Msg.StakeSupplier:output_type -> poktroll.supplier.MsgStakeSupplierResponse + 5, // 11: poktroll.supplier.Msg.UnstakeSupplier:output_type -> poktroll.supplier.MsgUnstakeSupplierResponse + 7, // 12: poktroll.supplier.Msg.UpdateParam:output_type -> poktroll.supplier.MsgUpdateParamResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_poktroll_supplier_tx_proto_init() } @@ -3303,6 +4476,33 @@ func file_poktroll_supplier_tx_proto_init() { return nil } } + file_poktroll_supplier_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParam); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_supplier_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_poktroll_supplier_tx_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*MsgUpdateParam_AsCoin)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -3310,7 +4510,7 @@ func file_poktroll_supplier_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_poktroll_supplier_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/poktroll/supplier/tx_grpc.pb.go b/api/poktroll/supplier/tx_grpc.pb.go index a95a976c9..1e175c012 100644 --- a/api/poktroll/supplier/tx_grpc.pb.go +++ b/api/poktroll/supplier/tx_grpc.pb.go @@ -22,6 +22,7 @@ const ( Msg_UpdateParams_FullMethodName = "/poktroll.supplier.Msg/UpdateParams" Msg_StakeSupplier_FullMethodName = "/poktroll.supplier.Msg/StakeSupplier" Msg_UnstakeSupplier_FullMethodName = "/poktroll.supplier.Msg/UnstakeSupplier" + Msg_UpdateParam_FullMethodName = "/poktroll.supplier.Msg/UpdateParam" ) // MsgClient is the client API for Msg service. @@ -35,6 +36,7 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) StakeSupplier(ctx context.Context, in *MsgStakeSupplier, opts ...grpc.CallOption) (*MsgStakeSupplierResponse, error) UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, opts ...grpc.CallOption) (*MsgUnstakeSupplierResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) } type msgClient struct { @@ -75,6 +77,16 @@ func (c *msgClient) UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, return out, nil } +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParam_FullMethodName, in, out, cOpts...) + 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 @@ -86,6 +98,7 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) StakeSupplier(context.Context, *MsgStakeSupplier) (*MsgStakeSupplierResponse, error) UnstakeSupplier(context.Context, *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) mustEmbedUnimplementedMsgServer() } @@ -102,6 +115,9 @@ func (UnimplementedMsgServer) StakeSupplier(context.Context, *MsgStakeSupplier) func (UnimplementedMsgServer) UnstakeSupplier(context.Context, *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnstakeSupplier not implemented") } +func (UnimplementedMsgServer) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -169,6 +185,24 @@ func _Msg_UnstakeSupplier_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + 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) @@ -188,6 +222,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UnstakeSupplier", Handler: _Msg_UnstakeSupplier_Handler, }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/supplier/tx.proto", diff --git a/proto/poktroll/supplier/tx.proto b/proto/poktroll/supplier/tx.proto index 1e13c9d71..b9431d520 100644 --- a/proto/poktroll/supplier/tx.proto +++ b/proto/poktroll/supplier/tx.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package poktroll.supplier; option go_package = "github.com/pokt-network/poktroll/x/supplier/types"; @@ -9,33 +10,28 @@ import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; - import "poktroll/supplier/params.proto"; import "poktroll/shared/service.proto"; - // Msg defines the Msg service. service Msg { option (cosmos.msg.v1.service) = true; - + // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse ); rpc StakeSupplier (MsgStakeSupplier ) returns (MsgStakeSupplierResponse ); rpc UnstakeSupplier (MsgUnstakeSupplier) returns (MsgUnstakeSupplierResponse); + rpc UpdateParam (MsgUpdateParam ) returns (MsgUpdateParamResponse ); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "poktroll/x/supplier/MsgUpdateParams"; - + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "poktroll/x/supplier/MsgUpdateParams"; + // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // TODO_IMPROVE(#322): The requirement to provide all params is adopted from the - // latest Cosmos SDK version. We should look into either improving this ourselves - // or seeing if it is on their roadmap. - // params defines the x/supplier parameters to update. // NOTE: All parameters must be supplied. Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; @@ -47,22 +43,37 @@ message MsgUpdateParamsResponse {} message MsgStakeSupplier { option (cosmos.msg.v1.signer) = "signer"; // https://docs.cosmos.network/main/build/building-modules/messages-and-queries - - string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the message signer (i.e. owner or operator) - string owner_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the owner (i.e. custodial, staker) - string operator_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the operator (i.e. provider, non-custodial) - cosmos.base.v1beta1.Coin stake = 4; // The total amount of uPOKT the supplier has staked. Must be ≥ to the current amount that the supplier has staked (if any) - repeated poktroll.shared.SupplierServiceConfig services = 5; // The list of services this supplier is staked to provide service for + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the message signer (i.e. owner or operator) + string owner_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the owner (i.e. custodial, staker) + string operator_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the operator (i.e. provider, non-custodial) + cosmos.base.v1beta1.Coin stake = 4; // The total amount of uPOKT the supplier has staked. Must be ≥ to the current amount that the supplier has staked (if any) + repeated poktroll.shared.SupplierServiceConfig services = 5; // The list of services this supplier is staked to provide service for } message MsgStakeSupplierResponse {} message MsgUnstakeSupplier { option (cosmos.msg.v1.signer) = "signer"; - - string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the message signer (i.e. owner or operator) + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the message signer (i.e. owner or operator) string operator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the operator (i.e. provider, non-custodial) } message MsgUnstakeSupplierResponse {} +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +message MsgUpdateParam { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + string name = 2; + oneof asType { + cosmos.base.v1beta1.Coin as_coin = 3; + } +} + +message MsgUpdateParamResponse { + Params params = 1; +} + diff --git a/tests/integration/application/min_stake_test.go b/tests/integration/application/min_stake_test.go index 014d129db..0815dba96 100644 --- a/tests/integration/application/min_stake_test.go +++ b/tests/integration/application/min_stake_test.go @@ -49,6 +49,11 @@ func TestApplicationMinStakeTestSuite(t *testing.T) { func (s *applicationMinStakeTestSuite) SetupTest() { s.keepers, s.ctx = keeper.NewTokenomicsModuleKeepers(s.T(), cosmoslog.NewNopLogger()) + proofParams := prooftypes.DefaultParams() + proofParams.ProofRequestProbability = 0 + err := s.keepers.ProofKeeper.SetParams(s.ctx, proofParams) + require.NoError(s.T(), err) + s.serviceId = "svc1" s.appBech32 = sample.AccAddress() s.supplierBech32 = sample.AccAddress() diff --git a/testutil/integration/suites/param_configs.go b/testutil/integration/suites/param_configs.go index 0c884ffea..740a7693d 100644 --- a/testutil/integration/suites/param_configs.go +++ b/testutil/integration/suites/param_configs.go @@ -178,6 +178,8 @@ var ( ParamsMsgs: ModuleParamsMessages{ MsgUpdateParams: suppliertypes.MsgUpdateParams{}, MsgUpdateParamsResponse: suppliertypes.MsgUpdateParamsResponse{}, + MsgUpdateParam: suppliertypes.MsgUpdateParam{}, + MsgUpdateParamResponse: suppliertypes.MsgUpdateParamResponse{}, QueryParamsRequest: suppliertypes.QueryParamsRequest{}, QueryParamsResponse: suppliertypes.QueryParamsResponse{}, }, diff --git a/tools/scripts/authz/dao_genesis_authorizations.json b/tools/scripts/authz/dao_genesis_authorizations.json index 6f257a438..1dd6992f5 100644 --- a/tools/scripts/authz/dao_genesis_authorizations.json +++ b/tools/scripts/authz/dao_genesis_authorizations.json @@ -161,6 +161,15 @@ }, "expiration": "2500-01-01T00:00:00Z" }, + { + "granter": "pokt10d07y265gmmuvt4z0w9aw880jnsr700j8yv32t", + "grantee": "pokt1eeeksh2tvkh7wzmfrljnhw4wrhs55lcuvmekkw", + "authorization": { + "@type": "\/cosmos.authz.v1beta1.GenericAuthorization", + "msg": "\/poktroll.supplier.MsgUpdateParam" + }, + "expiration": "2500-01-01T00:00:00Z" + }, { "granter": "pokt10d07y265gmmuvt4z0w9aw880jnsr700j8yv32t", "grantee": "pokt1eeeksh2tvkh7wzmfrljnhw4wrhs55lcuvmekkw", diff --git a/x/supplier/keeper/msg_server_update_param.go b/x/supplier/keeper/msg_server_update_param.go new file mode 100644 index 000000000..35efa6581 --- /dev/null +++ b/x/supplier/keeper/msg_server_update_param.go @@ -0,0 +1,37 @@ +package keeper + +import ( + "context" + + suppliertypes "github.com/pokt-network/poktroll/x/supplier/types" +) + +// UpdateParam updates a single parameter in the proof module and returns +// all active parameters. +func (k msgServer) UpdateParam(ctx context.Context, msg *suppliertypes.MsgUpdateParam) (*suppliertypes.MsgUpdateParamResponse, error) { + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + + if k.GetAuthority() != msg.Authority { + return nil, suppliertypes.ErrSupplierInvalidSigner.Wrapf("invalid authority; expected %s, got %s", k.GetAuthority(), msg.Authority) + } + + // TODO_UPNEXT(@bryanchriswhite, #612): uncomment & add a min_stake case. + + //params := k.GetParams(ctx) + + switch msg.Name { + default: + return nil, suppliertypes.ErrSupplierParamInvalid.Wrapf("unsupported param %q", msg.Name) + } + + //if err := k.SetParams(ctx, params); err != nil { + // return nil, err + //} + // + //updatedParams := k.GetParams(ctx) + //return &suppliertypes.MsgUpdateParamResponse{ + // Params: &updatedParams, + //}, nil +} diff --git a/x/supplier/module/autocli.go b/x/supplier/module/autocli.go index 6a3afe3a9..716e3774f 100644 --- a/x/supplier/module/autocli.go +++ b/x/supplier/module/autocli.go @@ -51,6 +51,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { // Short: "Send a unstake-supplier tx", // PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, //}, + //{ + // RpcMethod: "UpdateParam", + // Use: "update-param [name] [as-type]", + // Short: "Send a update-param tx", + // PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "name"}, {ProtoField: "asType"}}, + //}, // this line is used by ignite scaffolding # autocli/tx }, }, diff --git a/x/supplier/module/simulation.go b/x/supplier/module/simulation.go index cf9e6236f..3f0c913e2 100644 --- a/x/supplier/module/simulation.go +++ b/x/supplier/module/simulation.go @@ -31,6 +31,10 @@ const ( // TODO: Determine the simulation weight value defaultWeightMsgUnstakeSupplier int = 100 + opWeightMsgUpdateParam = "op_weight_msg_update_param" + // TODO: Determine the simulation weight value + defaultWeightMsgUpdateParam int = 100 + // this line is used by starport scaffolding # simapp/module/const ) @@ -81,6 +85,17 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp suppliersimulation.SimulateMsgUnstakeSupplier(am.accountKeeper, am.bankKeeper, am.supplierKeeper), )) + var weightMsgUpdateParam int + simState.AppParams.GetOrGenerate(opWeightMsgUpdateParam, &weightMsgUpdateParam, nil, + func(_ *rand.Rand) { + weightMsgUpdateParam = defaultWeightMsgUpdateParam + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgUpdateParam, + suppliersimulation.SimulateMsgUpdateParam(am.accountKeeper, am.bankKeeper, am.supplierKeeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations @@ -105,6 +120,14 @@ func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.Wei return nil }, ), + simulation.NewWeightedProposalMsg( + opWeightMsgUpdateParam, + defaultWeightMsgUpdateParam, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + suppliersimulation.SimulateMsgUpdateParam(am.accountKeeper, am.bankKeeper, am.supplierKeeper) + return nil + }, + ), // this line is used by starport scaffolding # simapp/module/OpMsg } } diff --git a/x/supplier/simulation/update_param.go b/x/supplier/simulation/update_param.go new file mode 100644 index 000000000..cf9b8aa8e --- /dev/null +++ b/x/supplier/simulation/update_param.go @@ -0,0 +1,30 @@ +package simulation + +import ( + "math/rand" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + "github.com/pokt-network/poktroll/x/supplier/keeper" + "github.com/pokt-network/poktroll/x/supplier/types" +) + +func SimulateMsgUpdateParam( + 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) + msg := &types.MsgUpdateParam{ + Authority: simAccount.Address.String(), + } + + // TODO: Handling the UpdateParam simulation + + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil + } +} diff --git a/x/supplier/types/codec.go b/x/supplier/types/codec.go index 9ecbe1202..185211e8a 100644 --- a/x/supplier/types/codec.go +++ b/x/supplier/types/codec.go @@ -14,6 +14,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUnstakeSupplier{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgUpdateParam{}, + ) // this line is used by starport scaffolding # 3 registry.RegisterImplementations((*sdk.Msg)(nil), diff --git a/x/supplier/types/errors.go b/x/supplier/types/errors.go index 622d7ed00..0759a9db6 100644 --- a/x/supplier/types/errors.go +++ b/x/supplier/types/errors.go @@ -18,4 +18,5 @@ var ( ErrSupplierIsUnstaking = sdkerrors.Register(ModuleName, 1109, "supplier is in unbonding period") ErrSupplierParamsInvalid = sdkerrors.Register(ModuleName, 1110, "invalid supplier params") ErrSupplierServiceNotFound = sdkerrors.Register(ModuleName, 1111, "service not found") + ErrSupplierParamInvalid = sdkerrors.Register(ModuleName, 1112, "the provided param is invalid") ) diff --git a/x/supplier/types/message_update_param.go b/x/supplier/types/message_update_param.go new file mode 100644 index 000000000..5819e1ed2 --- /dev/null +++ b/x/supplier/types/message_update_param.go @@ -0,0 +1,49 @@ +package types + +import ( + "fmt" + + errorsmod "cosmossdk.io/errors" + cosmostypes "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ cosmostypes.Msg = (*MsgUpdateParam)(nil) + +func NewMsgUpdateParam(authority string, name string, asType any) *MsgUpdateParam { + var asTypeIface isMsgUpdateParam_AsType + + switch t := asType.(type) { + case *cosmostypes.Coin: + asTypeIface = &MsgUpdateParam_AsCoin{AsCoin: t} + default: + panic(fmt.Sprintf("unexpected param value type: %T", asType)) + } + + return &MsgUpdateParam{ + Authority: authority, + Name: name, + AsType: asTypeIface, + } +} + +func (msg *MsgUpdateParam) ValidateBasic() error { + _, err := cosmostypes.AccAddressFromBech32(msg.Authority) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err) + } + + // Parameter value MUST NOT be nil. + if msg.AsType == nil { + return ErrSupplierParamInvalid.Wrap("missing param AsType") + } + + // Parameter name MUST be supported by this module. + switch msg.Name { + // TODO_UPNEXT(@bryanchriswhite, #612): replace with min_stake param name and call validation function. + case "": + return nil + default: + return ErrSupplierParamInvalid.Wrapf("unsupported param %q", msg.Name) + } +} diff --git a/x/supplier/types/message_update_param_test.go b/x/supplier/types/message_update_param_test.go new file mode 100644 index 000000000..96136ded1 --- /dev/null +++ b/x/supplier/types/message_update_param_test.go @@ -0,0 +1,55 @@ +package types + +import ( + "testing" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + + "github.com/pokt-network/poktroll/testutil/sample" +) + +func TestMsgUpdateParam_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgUpdateParam + err error + }{ + { + name: "invalid: authority address invalid", + msg: MsgUpdateParam{ + Authority: "invalid_address", + Name: "", // Doesn't matter for this test + AsType: &MsgUpdateParam_AsCoin{AsCoin: nil}, + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "invalid: param name incorrect (non-existent)", + msg: MsgUpdateParam{ + Authority: sample.AccAddress(), + Name: "non_existent", + // TODO_UPNEXT(@bryanchriswhite, #612): replace with default min_stake. + AsType: &MsgUpdateParam_AsCoin{AsCoin: nil}, + }, + err: ErrSupplierParamInvalid, + }, { + name: "valid: correct address, param name, and type", + msg: MsgUpdateParam{ + Authority: sample.AccAddress(), + Name: "", + // TODO_UPNEXT(@bryanchriswhite, #612): replace with default min_stake. + AsType: &MsgUpdateParam_AsCoin{AsCoin: nil}, + }, + }, + } + 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/supplier/types/tx.pb.go b/x/supplier/types/tx.pb.go index d08f9199e..0c48ba0c3 100644 --- a/x/supplier/types/tx.pb.go +++ b/x/supplier/types/tx.pb.go @@ -303,6 +303,133 @@ func (m *MsgUnstakeSupplierResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUnstakeSupplierResponse proto.InternalMessageInfo +// MsgUpdateParam is the Msg/UpdateParam request type to update a single param. +type MsgUpdateParam struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to AsType: + // + // *MsgUpdateParam_AsCoin + AsType isMsgUpdateParam_AsType `protobuf_oneof:"asType"` +} + +func (m *MsgUpdateParam) Reset() { *m = MsgUpdateParam{} } +func (m *MsgUpdateParam) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParam) ProtoMessage() {} +func (*MsgUpdateParam) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{6} +} +func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParam.Merge(m, src) +} +func (m *MsgUpdateParam) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParam) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParam.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParam proto.InternalMessageInfo + +type isMsgUpdateParam_AsType interface { + isMsgUpdateParam_AsType() + MarshalTo([]byte) (int, error) + Size() int +} + +type MsgUpdateParam_AsCoin struct { + AsCoin *types.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin,omitempty"` +} + +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} + +func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { + if m != nil { + return m.AsType + } + return nil +} + +func (m *MsgUpdateParam) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpdateParam) GetAsCoin() *types.Coin { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { + return x.AsCoin + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*MsgUpdateParam_AsCoin)(nil), + } +} + +type MsgUpdateParamResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } +func (m *MsgUpdateParamResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamResponse) ProtoMessage() {} +func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63b974929807ef57, []int{7} +} +func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamResponse.Merge(m, src) +} +func (m *MsgUpdateParamResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo + +func (m *MsgUpdateParamResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.supplier.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.supplier.MsgUpdateParamsResponse") @@ -310,49 +437,57 @@ func init() { proto.RegisterType((*MsgStakeSupplierResponse)(nil), "poktroll.supplier.MsgStakeSupplierResponse") proto.RegisterType((*MsgUnstakeSupplier)(nil), "poktroll.supplier.MsgUnstakeSupplier") proto.RegisterType((*MsgUnstakeSupplierResponse)(nil), "poktroll.supplier.MsgUnstakeSupplierResponse") + proto.RegisterType((*MsgUpdateParam)(nil), "poktroll.supplier.MsgUpdateParam") + proto.RegisterType((*MsgUpdateParamResponse)(nil), "poktroll.supplier.MsgUpdateParamResponse") } func init() { proto.RegisterFile("poktroll/supplier/tx.proto", fileDescriptor_63b974929807ef57) } var fileDescriptor_63b974929807ef57 = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x31, 0x8f, 0x12, 0x41, - 0x18, 0x65, 0x41, 0x88, 0x0c, 0x77, 0xe1, 0x6e, 0x73, 0xc9, 0x2d, 0x1b, 0x5d, 0x09, 0x17, 0x0d, - 0xc1, 0xb0, 0x23, 0x98, 0x5c, 0x71, 0xd1, 0x42, 0xa8, 0x89, 0x06, 0x62, 0x63, 0xe1, 0x65, 0x80, - 0x71, 0xd8, 0x00, 0x3b, 0x9b, 0x99, 0x81, 0xbb, 0xeb, 0x8c, 0xa5, 0x95, 0xa5, 0x3f, 0xc1, 0x92, - 0xc2, 0xc2, 0xce, 0xf6, 0x62, 0x75, 0xb1, 0xba, 0xca, 0x18, 0x28, 0xf8, 0x1b, 0x66, 0x77, 0x67, - 0x40, 0x16, 0x94, 0x33, 0x36, 0xc0, 0xcc, 0x7b, 0xef, 0xfb, 0xde, 0xbc, 0xf9, 0x06, 0x60, 0x7a, - 0xb4, 0x2f, 0x18, 0x1d, 0x0c, 0x20, 0x1f, 0x79, 0xde, 0xc0, 0xc1, 0x0c, 0x8a, 0x73, 0xdb, 0x63, - 0x54, 0x50, 0x7d, 0x5f, 0x61, 0xb6, 0xc2, 0xcc, 0x7d, 0x34, 0x74, 0x5c, 0x0a, 0x83, 0xcf, 0x90, - 0x65, 0x1e, 0x76, 0x28, 0x1f, 0x52, 0x0e, 0x87, 0x9c, 0xc0, 0x71, 0xc5, 0xff, 0x92, 0x40, 0x2e, - 0x04, 0x4e, 0x83, 0x15, 0x0c, 0x17, 0x12, 0x3a, 0x20, 0x94, 0xd0, 0x70, 0xdf, 0xff, 0x25, 0x77, - 0x2d, 0x59, 0xa9, 0x8d, 0x38, 0x86, 0xe3, 0x4a, 0x1b, 0x0b, 0x54, 0x81, 0x1d, 0xea, 0xb8, 0x0a, - 0x5f, 0xf7, 0xea, 0x21, 0x86, 0x86, 0xaa, 0xea, 0xdd, 0x25, 0xde, 0x43, 0x0c, 0x77, 0x21, 0xc7, - 0x6c, 0xec, 0x74, 0x70, 0x08, 0x17, 0xbe, 0x6a, 0x20, 0xdb, 0xe0, 0xe4, 0xa5, 0xd7, 0x45, 0x02, - 0xbf, 0x08, 0x84, 0xfa, 0x31, 0x48, 0xa3, 0x91, 0xe8, 0x51, 0xe6, 0x88, 0x0b, 0x43, 0xcb, 0x6b, - 0xc5, 0x74, 0xcd, 0xf8, 0xfe, 0xb9, 0x7c, 0x20, 0xdd, 0x3e, 0xeb, 0x76, 0x19, 0xe6, 0xbc, 0x25, - 0x98, 0xe3, 0x92, 0xe6, 0x92, 0xaa, 0x3f, 0x01, 0xa9, 0xb0, 0xb5, 0x11, 0xcf, 0x6b, 0xc5, 0x4c, - 0x35, 0x67, 0xaf, 0x65, 0x65, 0x87, 0x2d, 0x6a, 0xe9, 0xcb, 0x1f, 0xf7, 0x62, 0x9f, 0xe6, 0x93, - 0x92, 0xd6, 0x94, 0x9a, 0x93, 0xe3, 0x77, 0xf3, 0x49, 0x69, 0x59, 0xed, 0xfd, 0x7c, 0x52, 0x3a, - 0x5a, 0x78, 0x3f, 0x5f, 0x9e, 0x2e, 0xe2, 0xb6, 0x90, 0x03, 0x87, 0x91, 0xad, 0x26, 0xe6, 0x1e, - 0x75, 0x39, 0x2e, 0x7c, 0x8b, 0x83, 0xbd, 0x06, 0x27, 0x2d, 0x81, 0xfa, 0xb8, 0x25, 0xf5, 0xfa, - 0x23, 0x90, 0xe2, 0x0e, 0x71, 0x31, 0xdb, 0x7a, 0x34, 0xc9, 0xd3, 0x9f, 0x82, 0x5d, 0x7a, 0xe6, - 0x62, 0x76, 0x8a, 0x42, 0x38, 0x38, 0xde, 0xdf, 0x84, 0x3b, 0x01, 0x5d, 0xee, 0xe9, 0x75, 0xb0, - 0x47, 0x3d, 0xcc, 0x90, 0xa0, 0xcb, 0x0a, 0x89, 0x2d, 0x15, 0xb2, 0x4a, 0xa1, 0x8a, 0x40, 0x90, - 0xe4, 0xfe, 0x31, 0x8c, 0x5b, 0x32, 0x5a, 0x29, 0xf3, 0xc7, 0xc2, 0x96, 0x63, 0x61, 0xd7, 0xa9, - 0xe3, 0x36, 0x43, 0x9e, 0x5e, 0x03, 0xb7, 0xe5, 0x4d, 0x73, 0x23, 0x99, 0x4f, 0x14, 0x33, 0xd5, - 0x07, 0xbf, 0x5d, 0x47, 0x30, 0x0a, 0xb6, 0xca, 0xa4, 0x15, 0x12, 0xeb, 0xd4, 0x7d, 0xe3, 0x90, - 0xe6, 0x42, 0x77, 0x92, 0xf1, 0xaf, 0x44, 0xa6, 0x50, 0x30, 0x81, 0x11, 0xcd, 0x72, 0x11, 0xf4, - 0x47, 0x0d, 0xe8, 0xfe, 0x25, 0xb8, 0xfc, 0x3f, 0xa3, 0xde, 0x94, 0x55, 0xfc, 0x1f, 0xb3, 0x5a, - 0xb5, 0x7d, 0x07, 0x98, 0xeb, 0xce, 0x94, 0xf1, 0xea, 0x97, 0x38, 0x48, 0x34, 0x38, 0xd1, 0x5f, - 0x83, 0x9d, 0x95, 0x27, 0x50, 0xd8, 0x30, 0xba, 0x91, 0x29, 0x33, 0x4b, 0xdb, 0x39, 0xaa, 0x8f, - 0x8e, 0xc0, 0xee, 0xea, 0x14, 0x1e, 0x6d, 0x16, 0xaf, 0x90, 0xcc, 0x87, 0x37, 0x20, 0x2d, 0x5a, - 0x10, 0x90, 0x8d, 0xe6, 0x7f, 0xff, 0x0f, 0x0e, 0x57, 0x69, 0x66, 0xf9, 0x46, 0x34, 0xd5, 0xc8, - 0x4c, 0xbe, 0xf5, 0xdf, 0x6d, 0xed, 0xf9, 0xe5, 0xd4, 0xd2, 0xae, 0xa6, 0x96, 0x76, 0x3d, 0xb5, - 0xb4, 0x9f, 0x53, 0x4b, 0xfb, 0x30, 0xb3, 0x62, 0x57, 0x33, 0x2b, 0x76, 0x3d, 0xb3, 0x62, 0xaf, - 0x2a, 0xc4, 0x11, 0xbd, 0x51, 0xdb, 0xee, 0xd0, 0x21, 0xf4, 0xab, 0x97, 0x5d, 0x2c, 0xce, 0x28, - 0xeb, 0xc3, 0x4d, 0x4f, 0x5a, 0x5c, 0x78, 0x98, 0xb7, 0x53, 0xc1, 0x3f, 0xd2, 0xe3, 0x5f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xb5, 0x70, 0x92, 0x1e, 0x7e, 0x05, 0x00, 0x00, + // 678 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, + 0x14, 0xcf, 0x35, 0x6d, 0xbe, 0xed, 0x4b, 0x7f, 0x9e, 0xaa, 0x6f, 0x53, 0x0b, 0x4c, 0x49, 0x05, + 0x2a, 0x41, 0xf5, 0x91, 0x82, 0x3a, 0x54, 0x30, 0x90, 0x2e, 0x48, 0xa8, 0x02, 0x39, 0xb0, 0x80, + 0x44, 0x75, 0x49, 0x0e, 0xd7, 0x6a, 0xe3, 0xb3, 0xee, 0xae, 0xbf, 0x36, 0xc4, 0xc8, 0xc4, 0x82, + 0xc4, 0x9f, 0xc0, 0xc0, 0xd0, 0x81, 0x9d, 0xb5, 0x62, 0xaa, 0x98, 0x3a, 0x21, 0x94, 0x0e, 0xfd, + 0x37, 0x90, 0xed, 0xb3, 0x53, 0xa7, 0xa1, 0x2e, 0xb0, 0x24, 0xe7, 0x7b, 0x9f, 0xcf, 0xbb, 0xcf, + 0x7d, 0xde, 0x7b, 0x07, 0x86, 0xcf, 0x37, 0x95, 0xe0, 0x5b, 0x5b, 0x44, 0x6e, 0xfb, 0xfe, 0x96, + 0xcb, 0x04, 0x51, 0x7b, 0x96, 0x2f, 0xb8, 0xe2, 0x78, 0x2a, 0x8e, 0x59, 0x71, 0xcc, 0x98, 0xa2, + 0x6d, 0xd7, 0xe3, 0x24, 0xfc, 0x8d, 0x50, 0xc6, 0x4c, 0x93, 0xcb, 0x36, 0x97, 0xa4, 0x2d, 0x1d, + 0xb2, 0x53, 0x0d, 0xfe, 0x74, 0x60, 0x36, 0x0a, 0xac, 0x87, 0x5f, 0x24, 0xfa, 0xd0, 0xa1, 0x69, + 0x87, 0x3b, 0x3c, 0xda, 0x0f, 0x56, 0x7a, 0xd7, 0xd4, 0x99, 0x1a, 0x54, 0x32, 0xb2, 0x53, 0x6d, + 0x30, 0x45, 0xab, 0xa4, 0xc9, 0x5d, 0x2f, 0x8e, 0x9f, 0xd7, 0xea, 0x53, 0x41, 0xdb, 0x71, 0xd6, + 0xab, 0xdd, 0xf8, 0x06, 0x15, 0xac, 0x45, 0x24, 0x13, 0x3b, 0x6e, 0x93, 0x45, 0xe1, 0xf2, 0x57, + 0x04, 0x13, 0x6b, 0xd2, 0x79, 0xee, 0xb7, 0xa8, 0x62, 0x4f, 0x43, 0x22, 0x5e, 0x86, 0x11, 0xba, + 0xad, 0x36, 0xb8, 0x70, 0xd5, 0x7e, 0x09, 0xcd, 0xa1, 0x85, 0x91, 0x5a, 0xe9, 0xfb, 0x97, 0xc5, + 0x69, 0xad, 0xf6, 0x61, 0xab, 0x25, 0x98, 0x94, 0x75, 0x25, 0x5c, 0xcf, 0xb1, 0xbb, 0x50, 0x7c, + 0x1f, 0x0a, 0xd1, 0xd1, 0xa5, 0x81, 0x39, 0xb4, 0x50, 0x5c, 0x9a, 0xb5, 0xce, 0x79, 0x65, 0x45, + 0x47, 0xd4, 0x46, 0x0e, 0x7f, 0x5c, 0xcb, 0x7d, 0x3a, 0x3d, 0xa8, 0x20, 0x5b, 0x73, 0x56, 0x96, + 0xdf, 0x9e, 0x1e, 0x54, 0xba, 0xd9, 0xde, 0x9d, 0x1e, 0x54, 0xe6, 0x13, 0xed, 0x7b, 0xdd, 0xdb, + 0xf5, 0xa8, 0x2d, 0xcf, 0xc2, 0x4c, 0xcf, 0x96, 0xcd, 0xa4, 0xcf, 0x3d, 0xc9, 0xca, 0xdf, 0x06, + 0x60, 0x72, 0x4d, 0x3a, 0x75, 0x45, 0x37, 0x59, 0x5d, 0xf3, 0xf1, 0x1d, 0x28, 0x48, 0xd7, 0xf1, + 0x98, 0xc8, 0xbc, 0x9a, 0xc6, 0xe1, 0x07, 0x30, 0xc6, 0x77, 0x3d, 0x26, 0xd6, 0x69, 0x14, 0x0e, + 0xaf, 0x77, 0x11, 0x71, 0x34, 0x84, 0xeb, 0x3d, 0xbc, 0x0a, 0x93, 0xdc, 0x67, 0x82, 0x2a, 0xde, + 0xcd, 0x90, 0xcf, 0xc8, 0x30, 0x11, 0x33, 0xe2, 0x24, 0x04, 0x86, 0x64, 0x70, 0x8d, 0xd2, 0xa0, + 0xb6, 0x56, 0xd3, 0x82, 0xb6, 0xb0, 0x74, 0x5b, 0x58, 0xab, 0xdc, 0xf5, 0xec, 0x08, 0x87, 0x6b, + 0x30, 0xac, 0x2b, 0x2d, 0x4b, 0x43, 0x73, 0xf9, 0x85, 0xe2, 0xd2, 0xcd, 0x33, 0xe5, 0x08, 0x5b, + 0xc1, 0x8a, 0x3d, 0xa9, 0x47, 0xc0, 0x55, 0xee, 0xbd, 0x76, 0x1d, 0x3b, 0xe1, 0xad, 0x14, 0x83, + 0x92, 0x68, 0x17, 0xca, 0x06, 0x94, 0x7a, 0xbd, 0x4c, 0x8c, 0xfe, 0x88, 0x00, 0x07, 0x45, 0xf0, + 0xe4, 0x3f, 0x5a, 0xdd, 0xcf, 0xab, 0x81, 0x3f, 0xf4, 0x2a, 0x2d, 0xfb, 0x0a, 0x18, 0xe7, 0x95, + 0x25, 0xc2, 0x3f, 0x23, 0x18, 0x4f, 0x77, 0xcf, 0x5f, 0x77, 0x3f, 0x86, 0x41, 0x8f, 0xb6, 0x59, + 0x24, 0xd7, 0x0e, 0xd7, 0xf8, 0x1e, 0xfc, 0x47, 0xe5, 0x7a, 0x30, 0xad, 0x61, 0xc5, 0x2f, 0xaa, + 0xdb, 0xa3, 0x9c, 0x5d, 0xa0, 0x32, 0x58, 0xad, 0x8c, 0xa7, 0x27, 0xa1, 0x36, 0x0c, 0x05, 0x2a, + 0x9f, 0xed, 0xfb, 0xac, 0xfc, 0x18, 0xfe, 0x4f, 0xab, 0x8d, 0x2f, 0x82, 0xab, 0xc9, 0xec, 0xa1, + 0x8c, 0xd9, 0x8b, 0x07, 0x6e, 0xe9, 0x43, 0x1e, 0xf2, 0x6b, 0xd2, 0xc1, 0xaf, 0x60, 0x34, 0x35, + 0xfe, 0xe5, 0x3e, 0xd4, 0x9e, 0x09, 0x33, 0x2a, 0xd9, 0x98, 0x44, 0x1a, 0x85, 0xb1, 0xf4, 0x04, + 0xce, 0xf7, 0x27, 0xa7, 0x40, 0xc6, 0xed, 0x4b, 0x80, 0x92, 0x23, 0x1c, 0x98, 0xe8, 0xed, 0xbd, + 0x1b, 0xbf, 0x51, 0x98, 0x86, 0x19, 0x8b, 0x97, 0x82, 0x25, 0x07, 0xbd, 0x84, 0xe2, 0xd9, 0x5e, + 0xb9, 0x9e, 0x69, 0x83, 0x71, 0x2b, 0x13, 0x12, 0x27, 0x37, 0x86, 0xde, 0x04, 0x0f, 0x62, 0xed, + 0xc9, 0x61, 0xc7, 0x44, 0x47, 0x1d, 0x13, 0x1d, 0x77, 0x4c, 0xf4, 0xb3, 0x63, 0xa2, 0xf7, 0x27, + 0x66, 0xee, 0xe8, 0xc4, 0xcc, 0x1d, 0x9f, 0x98, 0xb9, 0x17, 0x55, 0xc7, 0x55, 0x1b, 0xdb, 0x0d, + 0xab, 0xc9, 0xdb, 0x24, 0xc8, 0xbc, 0xe8, 0x31, 0xb5, 0xcb, 0xc5, 0x26, 0xe9, 0xf7, 0x56, 0xaa, + 0x7d, 0x9f, 0xc9, 0x46, 0x21, 0x7c, 0xea, 0xef, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x63, + 0xdc, 0x7f, 0xd7, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -372,6 +507,7 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) StakeSupplier(ctx context.Context, in *MsgStakeSupplier, opts ...grpc.CallOption) (*MsgStakeSupplierResponse, error) UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, opts ...grpc.CallOption) (*MsgUnstakeSupplierResponse, error) + UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) } type msgClient struct { @@ -409,6 +545,15 @@ func (c *msgClient) UnstakeSupplier(ctx context.Context, in *MsgUnstakeSupplier, return out, nil } +func (c *msgClient) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, error) { + out := new(MsgUpdateParamResponse) + err := c.cc.Invoke(ctx, "/poktroll.supplier.Msg/UpdateParam", 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 @@ -416,6 +561,7 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) StakeSupplier(context.Context, *MsgStakeSupplier) (*MsgStakeSupplierResponse, error) UnstakeSupplier(context.Context, *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) + UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -431,6 +577,9 @@ func (*UnimplementedMsgServer) StakeSupplier(ctx context.Context, req *MsgStakeS func (*UnimplementedMsgServer) UnstakeSupplier(ctx context.Context, req *MsgUnstakeSupplier) (*MsgUnstakeSupplierResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnstakeSupplier not implemented") } +func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParam not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -490,6 +639,24 @@ func _Msg_UnstakeSupplier_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.supplier.Msg/UpdateParam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParam(ctx, req.(*MsgUpdateParam)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "poktroll.supplier.Msg", HandlerType: (*MsgServer)(nil), @@ -506,6 +673,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UnstakeSupplier", Handler: _Msg_UnstakeSupplier_Handler, }, + { + MethodName: "UpdateParam", + Handler: _Msg_UpdateParam_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/supplier/tx.proto", @@ -727,6 +898,108 @@ func (m *MsgUnstakeSupplierResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgUpdateParam) 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 *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AsType != nil { + { + size := m.AsType.Size() + i -= size + if _, err := m.AsType.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.AsCoin != nil { + { + size, err := m.AsCoin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *MsgUpdateParamResponse) 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 *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -828,6 +1101,51 @@ func (m *MsgUnstakeSupplierResponse) Size() (n int) { return n } +func (m *MsgUpdateParam) 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 = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.AsType != nil { + n += m.AsType.Size() + } + return n +} + +func (m *MsgUpdateParam_AsCoin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AsCoin != nil { + l = m.AsCoin.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} +func (m *MsgUpdateParamResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1429,6 +1747,241 @@ func (m *MsgUnstakeSupplierResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateParam) 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: MsgUpdateParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParam: 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 Name", 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.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", 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 + } + v := &types.Coin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.AsType = &MsgUpdateParam_AsCoin{v} + 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 *MsgUpdateParamResponse) 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: MsgUpdateParamResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 m.Params == nil { + m.Params = &Params{} + } + 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0