From c3e34916d98e7c804fda4ddb95116cb0fe37809c Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sat, 25 May 2024 10:42:51 -0500 Subject: [PATCH] feat!: `BurnHeldBalance` --- api/manifest/v1/tx.pulsar.go | 1117 +++++++++++++++++++++++++++++++-- api/manifest/v1/tx_grpc.pb.go | 39 ++ proto/manifest/v1/tx.proto | 23 + x/manifest/types/msgs.go | 38 ++ x/manifest/types/tx.pb.go | 464 +++++++++++++- 5 files changed, 1609 insertions(+), 72 deletions(-) diff --git a/api/manifest/v1/tx.pulsar.go b/api/manifest/v1/tx.pulsar.go index 380fd34..9399448 100644 --- a/api/manifest/v1/tx.pulsar.go +++ b/api/manifest/v1/tx.pulsar.go @@ -1727,6 +1727,920 @@ func (x *fastReflection_MsgPayoutStakeholdersResponse) ProtoMethods() *protoifac } } +var _ protoreflect.List = (*_MsgBurnHeldBalance_2_list)(nil) + +type _MsgBurnHeldBalance_2_list struct { + list *[]*types.Coin +} + +func (x *_MsgBurnHeldBalance_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgBurnHeldBalance_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgBurnHeldBalance_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgBurnHeldBalance_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*types.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgBurnHeldBalance_2_list) AppendMutable() protoreflect.Value { + v := new(types.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgBurnHeldBalance_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgBurnHeldBalance_2_list) NewElement() protoreflect.Value { + v := new(types.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgBurnHeldBalance_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgBurnHeldBalance protoreflect.MessageDescriptor + fd_MsgBurnHeldBalance_sender protoreflect.FieldDescriptor + fd_MsgBurnHeldBalance_burn_coins protoreflect.FieldDescriptor +) + +func init() { + file_manifest_v1_tx_proto_init() + md_MsgBurnHeldBalance = File_manifest_v1_tx_proto.Messages().ByName("MsgBurnHeldBalance") + fd_MsgBurnHeldBalance_sender = md_MsgBurnHeldBalance.Fields().ByName("sender") + fd_MsgBurnHeldBalance_burn_coins = md_MsgBurnHeldBalance.Fields().ByName("burn_coins") +} + +var _ protoreflect.Message = (*fastReflection_MsgBurnHeldBalance)(nil) + +type fastReflection_MsgBurnHeldBalance MsgBurnHeldBalance + +func (x *MsgBurnHeldBalance) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBurnHeldBalance)(x) +} + +func (x *MsgBurnHeldBalance) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgBurnHeldBalance_messageType fastReflection_MsgBurnHeldBalance_messageType +var _ protoreflect.MessageType = fastReflection_MsgBurnHeldBalance_messageType{} + +type fastReflection_MsgBurnHeldBalance_messageType struct{} + +func (x fastReflection_MsgBurnHeldBalance_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBurnHeldBalance)(nil) +} +func (x fastReflection_MsgBurnHeldBalance_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBurnHeldBalance) +} +func (x fastReflection_MsgBurnHeldBalance_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBurnHeldBalance +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgBurnHeldBalance) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBurnHeldBalance +} + +// 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_MsgBurnHeldBalance) Type() protoreflect.MessageType { + return _fastReflection_MsgBurnHeldBalance_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgBurnHeldBalance) New() protoreflect.Message { + return new(fastReflection_MsgBurnHeldBalance) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgBurnHeldBalance) Interface() protoreflect.ProtoMessage { + return (*MsgBurnHeldBalance)(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_MsgBurnHeldBalance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgBurnHeldBalance_sender, value) { + return + } + } + if len(x.BurnCoins) != 0 { + value := protoreflect.ValueOfList(&_MsgBurnHeldBalance_2_list{list: &x.BurnCoins}) + if !f(fd_MsgBurnHeldBalance_burn_coins, 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_MsgBurnHeldBalance) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "manifest.v1.MsgBurnHeldBalance.sender": + return x.Sender != "" + case "manifest.v1.MsgBurnHeldBalance.burn_coins": + return len(x.BurnCoins) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalance")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalance 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_MsgBurnHeldBalance) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "manifest.v1.MsgBurnHeldBalance.sender": + x.Sender = "" + case "manifest.v1.MsgBurnHeldBalance.burn_coins": + x.BurnCoins = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalance")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalance 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_MsgBurnHeldBalance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "manifest.v1.MsgBurnHeldBalance.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "manifest.v1.MsgBurnHeldBalance.burn_coins": + if len(x.BurnCoins) == 0 { + return protoreflect.ValueOfList(&_MsgBurnHeldBalance_2_list{}) + } + listValue := &_MsgBurnHeldBalance_2_list{list: &x.BurnCoins} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalance")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalance 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_MsgBurnHeldBalance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "manifest.v1.MsgBurnHeldBalance.sender": + x.Sender = value.Interface().(string) + case "manifest.v1.MsgBurnHeldBalance.burn_coins": + lv := value.List() + clv := lv.(*_MsgBurnHeldBalance_2_list) + x.BurnCoins = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalance")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalance 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_MsgBurnHeldBalance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.v1.MsgBurnHeldBalance.burn_coins": + if x.BurnCoins == nil { + x.BurnCoins = []*types.Coin{} + } + value := &_MsgBurnHeldBalance_2_list{list: &x.BurnCoins} + return protoreflect.ValueOfList(value) + case "manifest.v1.MsgBurnHeldBalance.sender": + panic(fmt.Errorf("field sender of message manifest.v1.MsgBurnHeldBalance is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalance")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalance 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_MsgBurnHeldBalance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "manifest.v1.MsgBurnHeldBalance.sender": + return protoreflect.ValueOfString("") + case "manifest.v1.MsgBurnHeldBalance.burn_coins": + list := []*types.Coin{} + return protoreflect.ValueOfList(&_MsgBurnHeldBalance_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalance")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalance 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_MsgBurnHeldBalance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.v1.MsgBurnHeldBalance", 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_MsgBurnHeldBalance) 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_MsgBurnHeldBalance) 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_MsgBurnHeldBalance) 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_MsgBurnHeldBalance) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgBurnHeldBalance) + 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.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.BurnCoins) > 0 { + for _, e := range x.BurnCoins { + l = options.Size(e) + 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().(*MsgBurnHeldBalance) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.BurnCoins) > 0 { + for iNdEx := len(x.BurnCoins) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BurnCoins[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + 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().(*MsgBurnHeldBalance) + 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: MsgBurnHeldBalance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBurnHeldBalance: 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 Sender", 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.Sender = 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 BurnCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BurnCoins = append(x.BurnCoins, &types.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BurnCoins[len(x.BurnCoins)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgBurnHeldBalanceResponse protoreflect.MessageDescriptor +) + +func init() { + file_manifest_v1_tx_proto_init() + md_MsgBurnHeldBalanceResponse = File_manifest_v1_tx_proto.Messages().ByName("MsgBurnHeldBalanceResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgBurnHeldBalanceResponse)(nil) + +type fastReflection_MsgBurnHeldBalanceResponse MsgBurnHeldBalanceResponse + +func (x *MsgBurnHeldBalanceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgBurnHeldBalanceResponse)(x) +} + +func (x *MsgBurnHeldBalanceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_manifest_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgBurnHeldBalanceResponse_messageType fastReflection_MsgBurnHeldBalanceResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgBurnHeldBalanceResponse_messageType{} + +type fastReflection_MsgBurnHeldBalanceResponse_messageType struct{} + +func (x fastReflection_MsgBurnHeldBalanceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgBurnHeldBalanceResponse)(nil) +} +func (x fastReflection_MsgBurnHeldBalanceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgBurnHeldBalanceResponse) +} +func (x fastReflection_MsgBurnHeldBalanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBurnHeldBalanceResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgBurnHeldBalanceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgBurnHeldBalanceResponse +} + +// 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_MsgBurnHeldBalanceResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgBurnHeldBalanceResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgBurnHeldBalanceResponse) New() protoreflect.Message { + return new(fastReflection_MsgBurnHeldBalanceResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgBurnHeldBalanceResponse) Interface() protoreflect.ProtoMessage { + return (*MsgBurnHeldBalanceResponse)(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_MsgBurnHeldBalanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgBurnHeldBalanceResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalanceResponse")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalanceResponse 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_MsgBurnHeldBalanceResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalanceResponse")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalanceResponse 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_MsgBurnHeldBalanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalanceResponse")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalanceResponse 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_MsgBurnHeldBalanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalanceResponse")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalanceResponse 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_MsgBurnHeldBalanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalanceResponse")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalanceResponse 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_MsgBurnHeldBalanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: manifest.v1.MsgBurnHeldBalanceResponse")) + } + panic(fmt.Errorf("message manifest.v1.MsgBurnHeldBalanceResponse 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_MsgBurnHeldBalanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in manifest.v1.MsgBurnHeldBalanceResponse", 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_MsgBurnHeldBalanceResponse) 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_MsgBurnHeldBalanceResponse) 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_MsgBurnHeldBalanceResponse) 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_MsgBurnHeldBalanceResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgBurnHeldBalanceResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgBurnHeldBalanceResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgBurnHeldBalanceResponse) + 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: MsgBurnHeldBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgBurnHeldBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -1893,6 +2807,79 @@ func (*MsgPayoutStakeholdersResponse) Descriptor() ([]byte, []int) { return file_manifest_v1_tx_proto_rawDescGZIP(), []int{3} } +// MsgPayoutStakeholders is the Msg/BurnHeldBalance request type. +type MsgBurnHeldBalance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the controlling account. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // payout is the amount of tokens paid to the current stakeholders. + BurnCoins []*types.Coin `protobuf:"bytes,2,rep,name=burn_coins,json=burnCoins,proto3" json:"burn_coins,omitempty"` +} + +func (x *MsgBurnHeldBalance) Reset() { + *x = MsgBurnHeldBalance{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgBurnHeldBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgBurnHeldBalance) ProtoMessage() {} + +// Deprecated: Use MsgBurnHeldBalance.ProtoReflect.Descriptor instead. +func (*MsgBurnHeldBalance) Descriptor() ([]byte, []int) { + return file_manifest_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgBurnHeldBalance) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgBurnHeldBalance) GetBurnCoins() []*types.Coin { + if x != nil { + return x.BurnCoins + } + return nil +} + +// MsgBurnHeldBalanceResponse defines the response structure for executing a MsgBurnHeldBalance message. +type MsgBurnHeldBalanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgBurnHeldBalanceResponse) Reset() { + *x = MsgBurnHeldBalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_manifest_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgBurnHeldBalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgBurnHeldBalanceResponse) ProtoMessage() {} + +// Deprecated: Use MsgBurnHeldBalanceResponse.ProtoReflect.Descriptor instead. +func (*MsgBurnHeldBalanceResponse) Descriptor() ([]byte, []int) { + return file_manifest_v1_tx_proto_rawDescGZIP(), []int{5} +} + var File_manifest_v1_tx_proto protoreflect.FileDescriptor var file_manifest_v1_tx_proto_rawDesc = []byte{ @@ -1934,31 +2921,52 @@ var file_manifest_v1_tx_proto_rawDesc = []byte{ 0x79, 0x6f, 0x75, 0x74, 0x3a, 0x12, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc6, 0x01, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x52, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 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, 0x64, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x1a, - 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, - 0x2a, 0x01, 0x42, 0xa9, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, - 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x12, 0x4d, 0x73, + 0x67, 0x42, 0x75, 0x72, 0x6e, 0x48, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x80, 0x01, 0x0a, 0x0a, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x63, 0x6f, 0x69, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, + 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x62, 0x75, 0x72, 0x6e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x3a, 0x0f, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, + 0x6e, 0x48, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa3, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x52, 0x0a, 0x0c, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x6d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 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, 0x64, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, + 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x79, 0x6f, + 0x75, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0f, 0x42, 0x75, 0x72, 0x6e, 0x48, 0x65, + 0x6c, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x48, + 0x65, 0x6c, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, + 0x48, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa9, 0x01, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x66, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x69, 0x74, + 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x31, + 0x3b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, + 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1973,27 +2981,32 @@ func file_manifest_v1_tx_proto_rawDescGZIP() []byte { return file_manifest_v1_tx_proto_rawDescData } -var file_manifest_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_manifest_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_manifest_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: manifest.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: manifest.v1.MsgUpdateParamsResponse (*MsgPayoutStakeholders)(nil), // 2: manifest.v1.MsgPayoutStakeholders (*MsgPayoutStakeholdersResponse)(nil), // 3: manifest.v1.MsgPayoutStakeholdersResponse - (*Params)(nil), // 4: manifest.v1.Params - (*types.Coin)(nil), // 5: cosmos.base.v1beta1.Coin + (*MsgBurnHeldBalance)(nil), // 4: manifest.v1.MsgBurnHeldBalance + (*MsgBurnHeldBalanceResponse)(nil), // 5: manifest.v1.MsgBurnHeldBalanceResponse + (*Params)(nil), // 6: manifest.v1.Params + (*types.Coin)(nil), // 7: cosmos.base.v1beta1.Coin } var file_manifest_v1_tx_proto_depIdxs = []int32{ - 4, // 0: manifest.v1.MsgUpdateParams.params:type_name -> manifest.v1.Params - 5, // 1: manifest.v1.MsgPayoutStakeholders.payout:type_name -> cosmos.base.v1beta1.Coin - 0, // 2: manifest.v1.Msg.UpdateParams:input_type -> manifest.v1.MsgUpdateParams - 2, // 3: manifest.v1.Msg.PayoutStakeholders:input_type -> manifest.v1.MsgPayoutStakeholders - 1, // 4: manifest.v1.Msg.UpdateParams:output_type -> manifest.v1.MsgUpdateParamsResponse - 3, // 5: manifest.v1.Msg.PayoutStakeholders:output_type -> manifest.v1.MsgPayoutStakeholdersResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 6, // 0: manifest.v1.MsgUpdateParams.params:type_name -> manifest.v1.Params + 7, // 1: manifest.v1.MsgPayoutStakeholders.payout:type_name -> cosmos.base.v1beta1.Coin + 7, // 2: manifest.v1.MsgBurnHeldBalance.burn_coins:type_name -> cosmos.base.v1beta1.Coin + 0, // 3: manifest.v1.Msg.UpdateParams:input_type -> manifest.v1.MsgUpdateParams + 2, // 4: manifest.v1.Msg.PayoutStakeholders:input_type -> manifest.v1.MsgPayoutStakeholders + 4, // 5: manifest.v1.Msg.BurnHeldBalance:input_type -> manifest.v1.MsgBurnHeldBalance + 1, // 6: manifest.v1.Msg.UpdateParams:output_type -> manifest.v1.MsgUpdateParamsResponse + 3, // 7: manifest.v1.Msg.PayoutStakeholders:output_type -> manifest.v1.MsgPayoutStakeholdersResponse + 5, // 8: manifest.v1.Msg.BurnHeldBalance:output_type -> manifest.v1.MsgBurnHeldBalanceResponse + 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 } func init() { file_manifest_v1_tx_proto_init() } @@ -2051,6 +3064,30 @@ func file_manifest_v1_tx_proto_init() { return nil } } + file_manifest_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgBurnHeldBalance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_manifest_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgBurnHeldBalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2058,7 +3095,7 @@ func file_manifest_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_manifest_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/manifest/v1/tx_grpc.pb.go b/api/manifest/v1/tx_grpc.pb.go index e9aeb1a..76d9cc0 100644 --- a/api/manifest/v1/tx_grpc.pb.go +++ b/api/manifest/v1/tx_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/manifest.v1.Msg/UpdateParams" Msg_PayoutStakeholders_FullMethodName = "/manifest.v1.Msg/PayoutStakeholders" + Msg_BurnHeldBalance_FullMethodName = "/manifest.v1.Msg/BurnHeldBalance" ) // MsgClient is the client API for Msg service. @@ -33,6 +34,8 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // PayoutStakeholders allows the authority to manually pay out stakeholders. PayoutStakeholders(ctx context.Context, in *MsgPayoutStakeholders, opts ...grpc.CallOption) (*MsgPayoutStakeholdersResponse, error) + // BurnHeldBalance allows a tokenholder to burn coins they own. + BurnHeldBalance(ctx context.Context, in *MsgBurnHeldBalance, opts ...grpc.CallOption) (*MsgBurnHeldBalanceResponse, error) } type msgClient struct { @@ -61,6 +64,15 @@ func (c *msgClient) PayoutStakeholders(ctx context.Context, in *MsgPayoutStakeho return out, nil } +func (c *msgClient) BurnHeldBalance(ctx context.Context, in *MsgBurnHeldBalance, opts ...grpc.CallOption) (*MsgBurnHeldBalanceResponse, error) { + out := new(MsgBurnHeldBalanceResponse) + err := c.cc.Invoke(ctx, Msg_BurnHeldBalance_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -71,6 +83,8 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // PayoutStakeholders allows the authority to manually pay out stakeholders. PayoutStakeholders(context.Context, *MsgPayoutStakeholders) (*MsgPayoutStakeholdersResponse, error) + // BurnHeldBalance allows a tokenholder to burn coins they own. + BurnHeldBalance(context.Context, *MsgBurnHeldBalance) (*MsgBurnHeldBalanceResponse, error) mustEmbedUnimplementedMsgServer() } @@ -84,6 +98,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) PayoutStakeholders(context.Context, *MsgPayoutStakeholders) (*MsgPayoutStakeholdersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PayoutStakeholders not implemented") } +func (UnimplementedMsgServer) BurnHeldBalance(context.Context, *MsgBurnHeldBalance) (*MsgBurnHeldBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BurnHeldBalance not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -133,6 +150,24 @@ func _Msg_PayoutStakeholders_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_BurnHeldBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBurnHeldBalance) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BurnHeldBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_BurnHeldBalance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BurnHeldBalance(ctx, req.(*MsgBurnHeldBalance)) + } + 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) @@ -148,6 +183,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "PayoutStakeholders", Handler: _Msg_PayoutStakeholders_Handler, }, + { + MethodName: "BurnHeldBalance", + Handler: _Msg_BurnHeldBalance_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "manifest/v1/tx.proto", diff --git a/proto/manifest/v1/tx.proto b/proto/manifest/v1/tx.proto index 681faf4..db9a3b9 100644 --- a/proto/manifest/v1/tx.proto +++ b/proto/manifest/v1/tx.proto @@ -21,6 +21,9 @@ service Msg { // PayoutStakeholders allows the authority to manually pay out stakeholders. rpc PayoutStakeholders(MsgPayoutStakeholders) returns (MsgPayoutStakeholdersResponse); + + // BurnHeldBalance allows a tokenholder to burn coins they own. + rpc BurnHeldBalance(MsgBurnHeldBalance) returns (MsgBurnHeldBalanceResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -63,3 +66,23 @@ message MsgPayoutStakeholders { // MsgPayoutStakeholdersResponse defines the response structure for executing a MsgPayoutStakeholders message. message MsgPayoutStakeholdersResponse {} + +// MsgPayoutStakeholders is the Msg/BurnHeldBalance request type. +message MsgBurnHeldBalance { + option (cosmos.msg.v1.signer) = "sender"; + option (gogoproto.equal) = false; + + // sender is the address of the tokenholder. + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // burn_coins are the coins to be burned by the tokenholder. + repeated cosmos.base.v1beta1.Coin burn_coins = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (amino.encoding) = "legacy_coins", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgBurnHeldBalanceResponse defines the response structure for executing a MsgBurnHeldBalance message. +message MsgBurnHeldBalanceResponse {} diff --git a/x/manifest/types/msgs.go b/x/manifest/types/msgs.go index 9a13ea6..fcfe208 100644 --- a/x/manifest/types/msgs.go +++ b/x/manifest/types/msgs.go @@ -84,3 +84,41 @@ func (msg *MsgPayoutStakeholders) Validate() error { return msg.Payout.Validate() } + +var _ sdk.Msg = &MsgBurnHeldBalance{} + +func NewMsgBurnHeldBalance( + sender sdk.Address, + coins sdk.Coins, +) *MsgBurnHeldBalance { + return &MsgBurnHeldBalance{ + Sender: sender.String(), + BurnCoins: coins, + } +} + +// Route returns the name of the module +func (msg MsgBurnHeldBalance) Route() string { return ModuleName } + +// Type returns the the action +func (msg MsgBurnHeldBalance) Type() string { return "burn_coins" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgBurnHeldBalance) GetSignBytes() []byte { + return sdk.MustSortJSON(amino.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for the message. +func (msg *MsgBurnHeldBalance) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (msg *MsgBurnHeldBalance) Validate() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return errors.Wrap(err, "invalid authority address") + } + + return msg.BurnCoins.Validate() +} diff --git a/x/manifest/types/tx.pb.go b/x/manifest/types/tx.pb.go index 0137aab..b565f97 100644 --- a/x/manifest/types/tx.pb.go +++ b/x/manifest/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -223,48 +224,148 @@ func (m *MsgPayoutStakeholdersResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPayoutStakeholdersResponse proto.InternalMessageInfo +// MsgPayoutStakeholders is the Msg/BurnHeldBalance request type. +type MsgBurnHeldBalance struct { + // authority is the address of the controlling account. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // payout is the amount of tokens paid to the current stakeholders. + BurnCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=burn_coins,json=burnCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"burn_coins"` +} + +func (m *MsgBurnHeldBalance) Reset() { *m = MsgBurnHeldBalance{} } +func (m *MsgBurnHeldBalance) String() string { return proto.CompactTextString(m) } +func (*MsgBurnHeldBalance) ProtoMessage() {} +func (*MsgBurnHeldBalance) Descriptor() ([]byte, []int) { + return fileDescriptor_7e3feee7606c5280, []int{4} +} +func (m *MsgBurnHeldBalance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBurnHeldBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBurnHeldBalance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBurnHeldBalance) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBurnHeldBalance.Merge(m, src) +} +func (m *MsgBurnHeldBalance) XXX_Size() int { + return m.Size() +} +func (m *MsgBurnHeldBalance) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBurnHeldBalance.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBurnHeldBalance proto.InternalMessageInfo + +func (m *MsgBurnHeldBalance) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgBurnHeldBalance) GetBurnCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.BurnCoins + } + return nil +} + +// MsgBurnHeldBalanceResponse defines the response structure for executing a MsgBurnHeldBalance message. +type MsgBurnHeldBalanceResponse struct { +} + +func (m *MsgBurnHeldBalanceResponse) Reset() { *m = MsgBurnHeldBalanceResponse{} } +func (m *MsgBurnHeldBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBurnHeldBalanceResponse) ProtoMessage() {} +func (*MsgBurnHeldBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7e3feee7606c5280, []int{5} +} +func (m *MsgBurnHeldBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBurnHeldBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBurnHeldBalanceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgBurnHeldBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBurnHeldBalanceResponse.Merge(m, src) +} +func (m *MsgBurnHeldBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBurnHeldBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBurnHeldBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBurnHeldBalanceResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "manifest.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "manifest.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgPayoutStakeholders)(nil), "manifest.v1.MsgPayoutStakeholders") proto.RegisterType((*MsgPayoutStakeholdersResponse)(nil), "manifest.v1.MsgPayoutStakeholdersResponse") + proto.RegisterType((*MsgBurnHeldBalance)(nil), "manifest.v1.MsgBurnHeldBalance") + proto.RegisterType((*MsgBurnHeldBalanceResponse)(nil), "manifest.v1.MsgBurnHeldBalanceResponse") } func init() { proto.RegisterFile("manifest/v1/tx.proto", fileDescriptor_7e3feee7606c5280) } var fileDescriptor_7e3feee7606c5280 = []byte{ - // 485 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xf6, 0xf1, 0x51, 0xa9, 0xd7, 0x0a, 0x84, 0x09, 0x6a, 0x62, 0x81, 0x53, 0x45, 0x0c, 0x95, - 0xa5, 0xde, 0xc9, 0x45, 0xea, 0xd0, 0x8d, 0xb0, 0xb0, 0x44, 0x8a, 0x5c, 0xb1, 0xb0, 0x54, 0x97, - 0xf8, 0x7a, 0x39, 0x35, 0xf6, 0x59, 0x7e, 0x2f, 0x51, 0x23, 0x16, 0xc4, 0xcc, 0xc0, 0xcc, 0xc4, - 0x88, 0x98, 0x32, 0xf0, 0x1b, 0x50, 0xc7, 0x8a, 0x89, 0x09, 0xaa, 0x64, 0x08, 0x3f, 0x03, 0x9d, - 0x7d, 0xa6, 0x6d, 0x88, 0x40, 0x62, 0x89, 0x2e, 0xef, 0xfb, 0x7c, 0xdd, 0x73, 0xc6, 0xb5, 0x84, - 0xa5, 0xf2, 0x98, 0x83, 0xa6, 0xe3, 0x90, 0xea, 0x53, 0x92, 0xe5, 0x4a, 0x2b, 0x77, 0xa3, 0x9a, - 0x92, 0x71, 0xe8, 0x6d, 0xf5, 0x15, 0x24, 0x0a, 0x68, 0x02, 0xc2, 0x80, 0x12, 0x10, 0x25, 0xca, - 0x6b, 0x5c, 0xe5, 0x0a, 0x9e, 0x72, 0x90, 0x60, 0x57, 0x35, 0xa1, 0x84, 0x2a, 0x8e, 0xd4, 0x9c, - 0x2a, 0x42, 0xa9, 0x74, 0x54, 0x2e, 0xca, 0x3f, 0x76, 0xe5, 0x5b, 0x93, 0x1e, 0x03, 0x4e, 0xc7, - 0x61, 0x8f, 0x6b, 0x16, 0xd2, 0xbe, 0x92, 0xa9, 0xdd, 0xdf, 0x63, 0x89, 0x4c, 0x15, 0x2d, 0x7e, - 0xcb, 0x51, 0xeb, 0x2d, 0xc2, 0x77, 0x3b, 0x20, 0x5e, 0x64, 0x31, 0xd3, 0xbc, 0xcb, 0x72, 0x96, - 0x80, 0xbb, 0x8f, 0xd7, 0xd9, 0x48, 0x0f, 0x54, 0x2e, 0xf5, 0xa4, 0x8e, 0xb6, 0xd1, 0xce, 0x7a, - 0xbb, 0xfe, 0xf5, 0xf3, 0x6e, 0xcd, 0x7a, 0x3d, 0x8d, 0xe3, 0x9c, 0x03, 0x1c, 0xea, 0x5c, 0xa6, - 0x22, 0xba, 0x84, 0xba, 0x21, 0x5e, 0xcb, 0x0a, 0x85, 0xfa, 0x8d, 0x6d, 0xb4, 0xb3, 0xb1, 0x77, - 0x9f, 0x5c, 0x69, 0x80, 0x94, 0xe2, 0xed, 0x5b, 0x67, 0xdf, 0x9b, 0x4e, 0x64, 0x81, 0x07, 0x77, - 0xde, 0x2c, 0xa6, 0xc1, 0xa5, 0x44, 0xab, 0x81, 0xb7, 0x96, 0xd2, 0x44, 0x1c, 0x32, 0x95, 0x02, - 0x6f, 0x5d, 0x20, 0xfc, 0xa0, 0x03, 0xa2, 0xcb, 0x26, 0x6a, 0xa4, 0x0f, 0x35, 0x3b, 0xe1, 0x03, - 0x35, 0x8c, 0x79, 0xfe, 0xff, 0x79, 0x5f, 0x99, 0xbc, 0x46, 0xcd, 0xe6, 0x6d, 0x10, 0xcb, 0x30, - 0xfd, 0x11, 0xdb, 0x1f, 0x79, 0xa6, 0x64, 0xda, 0x7e, 0x6e, 0x52, 0x7f, 0xfa, 0xd1, 0x0c, 0x4a, - 0x04, 0xc4, 0x27, 0x44, 0x2a, 0xca, 0x32, 0x49, 0x57, 0x54, 0x5e, 0x50, 0xe0, 0xfd, 0x62, 0x1a, - 0x6c, 0x0e, 0xb9, 0x60, 0xfd, 0xc9, 0x91, 0x79, 0x03, 0xf8, 0xb8, 0x98, 0x06, 0x28, 0xb2, 0x96, - 0x07, 0xee, 0xcf, 0x0f, 0x4d, 0x67, 0xe9, 0xf6, 0x4d, 0xfc, 0x68, 0xe5, 0x0d, 0xab, 0x0e, 0xf6, - 0xbe, 0x20, 0x7c, 0xb3, 0x03, 0xc2, 0x8d, 0xf0, 0xe6, 0xb5, 0x17, 0x7b, 0x78, 0xad, 0xe9, 0xa5, - 0x06, 0xbd, 0xc7, 0x7f, 0xdb, 0x56, 0xda, 0x6e, 0x8c, 0xdd, 0x15, 0xdd, 0xb6, 0x96, 0xb9, 0x7f, - 0x62, 0xbc, 0xe0, 0xdf, 0x98, 0xca, 0xc5, 0xbb, 0xfd, 0xda, 0xb4, 0xd0, 0xee, 0x9e, 0xcd, 0x7c, - 0x74, 0x3e, 0xf3, 0xd1, 0xc5, 0xcc, 0x47, 0xef, 0xe6, 0xbe, 0x73, 0x3e, 0xf7, 0x9d, 0x6f, 0x73, - 0xdf, 0x79, 0xb9, 0x2f, 0xa4, 0x1e, 0x8c, 0x7a, 0xa4, 0xaf, 0x12, 0x3a, 0x94, 0xc7, 0x9a, 0xc7, - 0x32, 0x95, 0x9a, 0x56, 0x0e, 0xbb, 0x43, 0x1e, 0x0b, 0x9e, 0xd3, 0xd3, 0xdf, 0x13, 0xaa, 0x27, - 0x19, 0x87, 0xde, 0x5a, 0xf1, 0x3d, 0x3f, 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x16, 0x90, - 0x1e, 0x8c, 0x03, 0x00, 0x00, + // 588 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xb1, 0x6b, 0xdb, 0x4e, + 0x14, 0xb6, 0x92, 0xdf, 0x2f, 0xe0, 0x4b, 0xa8, 0xa9, 0xea, 0x12, 0x5b, 0xa4, 0xb2, 0x31, 0x85, + 0x1a, 0x83, 0x75, 0x75, 0x0a, 0x19, 0xbc, 0x55, 0x85, 0x92, 0xc5, 0x60, 0x1c, 0xba, 0xb4, 0x43, + 0x38, 0x5b, 0x97, 0xf3, 0x61, 0xe9, 0x4e, 0xe8, 0xce, 0x26, 0xa6, 0x4b, 0xe8, 0xdc, 0xa1, 0x73, + 0xa7, 0x42, 0x97, 0xd2, 0xc9, 0x43, 0xff, 0x88, 0x8c, 0xa1, 0x53, 0xe9, 0xd0, 0x06, 0x7b, 0x70, + 0xff, 0x8c, 0x22, 0xe9, 0xe4, 0x38, 0x8a, 0xb1, 0xa1, 0x8b, 0x74, 0xba, 0xf7, 0xbd, 0xef, 0xbd, + 0xef, 0x7b, 0x0f, 0x81, 0xbc, 0x87, 0x18, 0x3d, 0xc3, 0x42, 0xc2, 0x51, 0x03, 0xca, 0x73, 0xcb, + 0x0f, 0xb8, 0xe4, 0xfa, 0x6e, 0x72, 0x6b, 0x8d, 0x1a, 0xc6, 0x7e, 0x8f, 0x0b, 0x8f, 0x0b, 0xe8, + 0x09, 0x12, 0x82, 0x3c, 0x41, 0x62, 0x94, 0x51, 0x5c, 0xce, 0x25, 0x98, 0x61, 0x41, 0x85, 0x0a, + 0xe5, 0x09, 0x27, 0x3c, 0x3a, 0xc2, 0xf0, 0x94, 0x24, 0xc4, 0x4c, 0xa7, 0x71, 0x20, 0xfe, 0x50, + 0x21, 0x53, 0x15, 0xe9, 0x22, 0x81, 0xe1, 0xa8, 0xd1, 0xc5, 0x12, 0x35, 0x60, 0x8f, 0x53, 0xa6, + 0xe2, 0xf7, 0x91, 0x47, 0x19, 0x87, 0xd1, 0x33, 0xbe, 0xaa, 0xbc, 0xd7, 0x40, 0xae, 0x25, 0xc8, + 0x2b, 0xdf, 0x41, 0x12, 0xb7, 0x51, 0x80, 0x3c, 0xa1, 0x1f, 0x81, 0x2c, 0x1a, 0xca, 0x3e, 0x0f, + 0xa8, 0x1c, 0x17, 0xb4, 0xb2, 0x56, 0xcd, 0xda, 0x85, 0xef, 0xdf, 0xea, 0x79, 0x55, 0xeb, 0xb9, + 0xe3, 0x04, 0x58, 0x88, 0x13, 0x19, 0x50, 0x46, 0x3a, 0x37, 0x50, 0xbd, 0x01, 0x76, 0xfc, 0x88, + 0xa1, 0xb0, 0x55, 0xd6, 0xaa, 0xbb, 0x87, 0x0f, 0xac, 0x25, 0x07, 0xac, 0x98, 0xdc, 0xfe, 0xef, + 0xf2, 0x57, 0x29, 0xd3, 0x51, 0xc0, 0xe6, 0xbd, 0x77, 0xf3, 0x49, 0xed, 0x86, 0xa2, 0x52, 0x04, + 0xfb, 0xa9, 0x6e, 0x3a, 0x58, 0xf8, 0x9c, 0x09, 0x5c, 0xb9, 0xd6, 0xc0, 0xc3, 0x96, 0x20, 0x6d, + 0x34, 0xe6, 0x43, 0x79, 0x22, 0xd1, 0x00, 0xf7, 0xb9, 0xeb, 0xe0, 0xe0, 0xdf, 0xfb, 0x7d, 0x1b, + 0xf6, 0x1b, 0xb2, 0xa9, 0x7e, 0x8b, 0x96, 0xca, 0x08, 0xfd, 0xb3, 0x94, 0x7f, 0xd6, 0x0b, 0x4e, + 0x99, 0x7d, 0x1c, 0x76, 0xfd, 0xf5, 0x77, 0xa9, 0x16, 0x23, 0x84, 0x33, 0xb0, 0x28, 0x87, 0xc8, + 0xa7, 0x70, 0x85, 0xe5, 0x51, 0x8a, 0xf8, 0x38, 0x9f, 0xd4, 0xf6, 0x5c, 0x4c, 0x50, 0x6f, 0x7c, + 0x1a, 0xce, 0x40, 0x7c, 0x99, 0x4f, 0x6a, 0x5a, 0x47, 0x95, 0x6c, 0xea, 0x7f, 0x3e, 0x95, 0x32, + 0x29, 0xf5, 0x25, 0xf0, 0x68, 0xa5, 0xc2, 0x85, 0x07, 0x3f, 0x35, 0xa0, 0xb7, 0x04, 0xb1, 0x87, + 0x01, 0x3b, 0xc6, 0xae, 0x63, 0x23, 0x17, 0xb1, 0x1e, 0xd6, 0x9f, 0x82, 0x1d, 0x81, 0x99, 0x83, + 0x83, 0x8d, 0xea, 0x15, 0x4e, 0xbf, 0xd0, 0x00, 0xe8, 0x0e, 0x03, 0x16, 0x77, 0x56, 0xd8, 0x2a, + 0x6f, 0xaf, 0xd7, 0xff, 0x52, 0xe9, 0xaf, 0x12, 0x2a, 0xfb, 0xc3, 0xae, 0xd5, 0xe3, 0x5e, 0xa2, + 0x3c, 0x7e, 0xd5, 0x85, 0x33, 0x80, 0x72, 0xec, 0x63, 0xb1, 0x56, 0x7d, 0x36, 0x2c, 0x1a, 0x01, + 0x9a, 0xb9, 0xc4, 0x00, 0xd5, 0x53, 0xe5, 0x00, 0x18, 0x77, 0xb5, 0x25, 0xd2, 0x0f, 0x3f, 0x6f, + 0x81, 0xed, 0x96, 0x20, 0x7a, 0x07, 0xec, 0xdd, 0x5a, 0xd6, 0x83, 0x5b, 0x4b, 0x96, 0x5a, 0x1e, + 0xe3, 0xf1, 0xba, 0x68, 0xc2, 0xad, 0x3b, 0x40, 0x5f, 0xb1, 0x56, 0x95, 0x74, 0xee, 0x5d, 0x8c, + 0x51, 0xdb, 0x8c, 0x59, 0x54, 0x79, 0x03, 0x72, 0xe9, 0xc1, 0x95, 0xd2, 0xe9, 0x29, 0x80, 0xf1, + 0x64, 0x03, 0x20, 0x21, 0x37, 0xfe, 0xbf, 0x08, 0xfd, 0xb5, 0xdb, 0x97, 0x53, 0x53, 0xbb, 0x9a, + 0x9a, 0xda, 0xf5, 0xd4, 0xd4, 0x3e, 0xcc, 0xcc, 0xcc, 0xd5, 0xcc, 0xcc, 0xfc, 0x98, 0x99, 0x99, + 0xd7, 0x47, 0x4b, 0x93, 0x73, 0xe9, 0x99, 0xc4, 0x0e, 0x65, 0x54, 0xc2, 0x84, 0xbe, 0xee, 0x62, + 0x87, 0xe0, 0x00, 0x9e, 0x2f, 0x6e, 0xe2, 0x69, 0x76, 0x77, 0xa2, 0xff, 0xc4, 0xb3, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xe9, 0x1e, 0xeb, 0x7c, 0xe4, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -285,6 +386,8 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // PayoutStakeholders allows the authority to manually pay out stakeholders. PayoutStakeholders(ctx context.Context, in *MsgPayoutStakeholders, opts ...grpc.CallOption) (*MsgPayoutStakeholdersResponse, error) + // BurnHeldBalance allows a tokenholder to burn coins they own. + BurnHeldBalance(ctx context.Context, in *MsgBurnHeldBalance, opts ...grpc.CallOption) (*MsgBurnHeldBalanceResponse, error) } type msgClient struct { @@ -313,6 +416,15 @@ func (c *msgClient) PayoutStakeholders(ctx context.Context, in *MsgPayoutStakeho return out, nil } +func (c *msgClient) BurnHeldBalance(ctx context.Context, in *MsgBurnHeldBalance, opts ...grpc.CallOption) (*MsgBurnHeldBalanceResponse, error) { + out := new(MsgBurnHeldBalanceResponse) + err := c.cc.Invoke(ctx, "/manifest.v1.Msg/BurnHeldBalance", 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 parameters. @@ -321,6 +433,8 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // PayoutStakeholders allows the authority to manually pay out stakeholders. PayoutStakeholders(context.Context, *MsgPayoutStakeholders) (*MsgPayoutStakeholdersResponse, error) + // BurnHeldBalance allows a tokenholder to burn coins they own. + BurnHeldBalance(context.Context, *MsgBurnHeldBalance) (*MsgBurnHeldBalanceResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -333,6 +447,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) PayoutStakeholders(ctx context.Context, req *MsgPayoutStakeholders) (*MsgPayoutStakeholdersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PayoutStakeholders not implemented") } +func (*UnimplementedMsgServer) BurnHeldBalance(ctx context.Context, req *MsgBurnHeldBalance) (*MsgBurnHeldBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BurnHeldBalance not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -374,6 +491,24 @@ func _Msg_PayoutStakeholders_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_BurnHeldBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBurnHeldBalance) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BurnHeldBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/manifest.v1.Msg/BurnHeldBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BurnHeldBalance(ctx, req.(*MsgBurnHeldBalance)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "manifest.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -386,6 +521,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "PayoutStakeholders", Handler: _Msg_PayoutStakeholders_Handler, }, + { + MethodName: "BurnHeldBalance", + Handler: _Msg_BurnHeldBalance_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "manifest/v1/tx.proto", @@ -517,6 +656,73 @@ func (m *MsgPayoutStakeholdersResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *MsgBurnHeldBalance) 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 *MsgBurnHeldBalance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBurnHeldBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BurnCoins) > 0 { + for iNdEx := len(m.BurnCoins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BurnCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBurnHeldBalanceResponse) 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 *MsgBurnHeldBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBurnHeldBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -576,6 +782,34 @@ func (m *MsgPayoutStakeholdersResponse) Size() (n int) { return n } +func (m *MsgBurnHeldBalance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.BurnCoins) > 0 { + for _, e := range m.BurnCoins { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBurnHeldBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -912,6 +1146,172 @@ func (m *MsgPayoutStakeholdersResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgBurnHeldBalance) 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: MsgBurnHeldBalance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBurnHeldBalance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BurnCoins", 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 + } + m.BurnCoins = append(m.BurnCoins, types.Coin{}) + if err := m.BurnCoins[len(m.BurnCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBurnHeldBalanceResponse) 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: MsgBurnHeldBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBurnHeldBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0