diff --git a/api/utss/v1/genesis.pulsar.go b/api/utss/v1/genesis.pulsar.go index 27db1d75..3e0a1c85 100644 --- a/api/utss/v1/genesis.pulsar.go +++ b/api/utss/v1/genesis.pulsar.go @@ -996,6 +996,489 @@ func (x *fastReflection_TssKeyEntry) ProtoMethods() *protoiface.Methods { } } +var ( + md_FundMigrationEntry protoreflect.MessageDescriptor + fd_FundMigrationEntry_key protoreflect.FieldDescriptor + fd_FundMigrationEntry_value protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_genesis_proto_init() + md_FundMigrationEntry = File_utss_v1_genesis_proto.Messages().ByName("FundMigrationEntry") + fd_FundMigrationEntry_key = md_FundMigrationEntry.Fields().ByName("key") + fd_FundMigrationEntry_value = md_FundMigrationEntry.Fields().ByName("value") +} + +var _ protoreflect.Message = (*fastReflection_FundMigrationEntry)(nil) + +type fastReflection_FundMigrationEntry FundMigrationEntry + +func (x *FundMigrationEntry) ProtoReflect() protoreflect.Message { + return (*fastReflection_FundMigrationEntry)(x) +} + +func (x *FundMigrationEntry) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_genesis_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_FundMigrationEntry_messageType fastReflection_FundMigrationEntry_messageType +var _ protoreflect.MessageType = fastReflection_FundMigrationEntry_messageType{} + +type fastReflection_FundMigrationEntry_messageType struct{} + +func (x fastReflection_FundMigrationEntry_messageType) Zero() protoreflect.Message { + return (*fastReflection_FundMigrationEntry)(nil) +} +func (x fastReflection_FundMigrationEntry_messageType) New() protoreflect.Message { + return new(fastReflection_FundMigrationEntry) +} +func (x fastReflection_FundMigrationEntry_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FundMigrationEntry +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_FundMigrationEntry) Descriptor() protoreflect.MessageDescriptor { + return md_FundMigrationEntry +} + +// 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_FundMigrationEntry) Type() protoreflect.MessageType { + return _fastReflection_FundMigrationEntry_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_FundMigrationEntry) New() protoreflect.Message { + return new(fastReflection_FundMigrationEntry) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_FundMigrationEntry) Interface() protoreflect.ProtoMessage { + return (*FundMigrationEntry)(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_FundMigrationEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != uint64(0) { + value := protoreflect.ValueOfUint64(x.Key) + if !f(fd_FundMigrationEntry_key, value) { + return + } + } + if x.Value != nil { + value := protoreflect.ValueOfMessage(x.Value.ProtoReflect()) + if !f(fd_FundMigrationEntry_value, 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_FundMigrationEntry) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.FundMigrationEntry.key": + return x.Key != uint64(0) + case "utss.v1.FundMigrationEntry.value": + return x.Value != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigrationEntry")) + } + panic(fmt.Errorf("message utss.v1.FundMigrationEntry 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_FundMigrationEntry) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.FundMigrationEntry.key": + x.Key = uint64(0) + case "utss.v1.FundMigrationEntry.value": + x.Value = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigrationEntry")) + } + panic(fmt.Errorf("message utss.v1.FundMigrationEntry 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_FundMigrationEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.FundMigrationEntry.key": + value := x.Key + return protoreflect.ValueOfUint64(value) + case "utss.v1.FundMigrationEntry.value": + value := x.Value + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigrationEntry")) + } + panic(fmt.Errorf("message utss.v1.FundMigrationEntry 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_FundMigrationEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.FundMigrationEntry.key": + x.Key = value.Uint() + case "utss.v1.FundMigrationEntry.value": + x.Value = value.Message().Interface().(*FundMigration) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigrationEntry")) + } + panic(fmt.Errorf("message utss.v1.FundMigrationEntry 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_FundMigrationEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.FundMigrationEntry.value": + if x.Value == nil { + x.Value = new(FundMigration) + } + return protoreflect.ValueOfMessage(x.Value.ProtoReflect()) + case "utss.v1.FundMigrationEntry.key": + panic(fmt.Errorf("field key of message utss.v1.FundMigrationEntry is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigrationEntry")) + } + panic(fmt.Errorf("message utss.v1.FundMigrationEntry 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_FundMigrationEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.FundMigrationEntry.key": + return protoreflect.ValueOfUint64(uint64(0)) + case "utss.v1.FundMigrationEntry.value": + m := new(FundMigration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigrationEntry")) + } + panic(fmt.Errorf("message utss.v1.FundMigrationEntry 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_FundMigrationEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.FundMigrationEntry", 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_FundMigrationEntry) 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_FundMigrationEntry) 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_FundMigrationEntry) 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_FundMigrationEntry) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*FundMigrationEntry) + 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.Key != 0 { + n += 1 + runtime.Sov(uint64(x.Key)) + } + if x.Value != nil { + l = options.Size(x.Value) + 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().(*FundMigrationEntry) + 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.Value != nil { + encoded, err := options.Marshal(x.Value) + 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 x.Key != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Key)) + i-- + dAtA[i] = 0x8 + } + 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().(*FundMigrationEntry) + 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: FundMigrationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FundMigrationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + x.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Key |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value == nil { + x.Value = &FundMigration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Value); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var _ protoreflect.List = (*_GenesisState_3_list)(nil) type _GenesisState_3_list struct { @@ -1149,6 +1632,57 @@ func (x *_GenesisState_7_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_GenesisState_9_list)(nil) + +type _GenesisState_9_list struct { + list *[]*FundMigrationEntry +} + +func (x *_GenesisState_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FundMigrationEntry) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FundMigrationEntry) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_9_list) AppendMutable() protoreflect.Value { + v := new(FundMigrationEntry) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_9_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_9_list) NewElement() protoreflect.Value { + v := new(FundMigrationEntry) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_9_list) IsValid() bool { + return x.list != nil +} + var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor @@ -1159,6 +1693,8 @@ var ( fd_GenesisState_next_process_id protoreflect.FieldDescriptor fd_GenesisState_tss_events protoreflect.FieldDescriptor fd_GenesisState_next_tss_event_id protoreflect.FieldDescriptor + fd_GenesisState_fund_migrations protoreflect.FieldDescriptor + fd_GenesisState_next_migration_id protoreflect.FieldDescriptor ) func init() { @@ -1172,6 +1708,8 @@ func init() { fd_GenesisState_next_process_id = md_GenesisState.Fields().ByName("next_process_id") fd_GenesisState_tss_events = md_GenesisState.Fields().ByName("tss_events") fd_GenesisState_next_tss_event_id = md_GenesisState.Fields().ByName("next_tss_event_id") + fd_GenesisState_fund_migrations = md_GenesisState.Fields().ByName("fund_migrations") + fd_GenesisState_next_migration_id = md_GenesisState.Fields().ByName("next_migration_id") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -1183,7 +1721,7 @@ func (x *GenesisState) ProtoReflect() protoreflect.Message { } func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_utss_v1_genesis_proto_msgTypes[2] + mi := &file_utss_v1_genesis_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1287,6 +1825,18 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if len(x.FundMigrations) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_9_list{list: &x.FundMigrations}) + if !f(fd_GenesisState_fund_migrations, value) { + return + } + } + if x.NextMigrationId != uint64(0) { + value := protoreflect.ValueOfUint64(x.NextMigrationId) + if !f(fd_GenesisState_next_migration_id, value) { + return + } + } } // Has reports whether a field is populated. @@ -1318,6 +1868,10 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return len(x.TssEvents) != 0 case "utss.v1.GenesisState.next_tss_event_id": return x.NextTssEventId != uint64(0) + case "utss.v1.GenesisState.fund_migrations": + return len(x.FundMigrations) != 0 + case "utss.v1.GenesisState.next_migration_id": + return x.NextMigrationId != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) @@ -1350,6 +1904,10 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.TssEvents = nil case "utss.v1.GenesisState.next_tss_event_id": x.NextTssEventId = uint64(0) + case "utss.v1.GenesisState.fund_migrations": + x.FundMigrations = nil + case "utss.v1.GenesisState.next_migration_id": + x.NextMigrationId = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) @@ -1399,6 +1957,15 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto case "utss.v1.GenesisState.next_tss_event_id": value := x.NextTssEventId return protoreflect.ValueOfUint64(value) + case "utss.v1.GenesisState.fund_migrations": + if len(x.FundMigrations) == 0 { + return protoreflect.ValueOfList(&_GenesisState_9_list{}) + } + listValue := &_GenesisState_9_list{list: &x.FundMigrations} + return protoreflect.ValueOfList(listValue) + case "utss.v1.GenesisState.next_migration_id": + value := x.NextMigrationId + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) @@ -1441,6 +2008,12 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value x.TssEvents = *clv.list case "utss.v1.GenesisState.next_tss_event_id": x.NextTssEventId = value.Uint() + case "utss.v1.GenesisState.fund_migrations": + lv := value.List() + clv := lv.(*_GenesisState_9_list) + x.FundMigrations = *clv.list + case "utss.v1.GenesisState.next_migration_id": + x.NextMigrationId = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) @@ -1494,10 +2067,18 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_7_list{list: &x.TssEvents} return protoreflect.ValueOfList(value) + case "utss.v1.GenesisState.fund_migrations": + if x.FundMigrations == nil { + x.FundMigrations = []*FundMigrationEntry{} + } + value := &_GenesisState_9_list{list: &x.FundMigrations} + return protoreflect.ValueOfList(value) case "utss.v1.GenesisState.next_process_id": panic(fmt.Errorf("field next_process_id of message utss.v1.GenesisState is not mutable")) case "utss.v1.GenesisState.next_tss_event_id": panic(fmt.Errorf("field next_tss_event_id of message utss.v1.GenesisState is not mutable")) + case "utss.v1.GenesisState.next_migration_id": + panic(fmt.Errorf("field next_migration_id of message utss.v1.GenesisState is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) @@ -1533,6 +2114,11 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) case "utss.v1.GenesisState.next_tss_event_id": return protoreflect.ValueOfUint64(uint64(0)) + case "utss.v1.GenesisState.fund_migrations": + list := []*FundMigrationEntry{} + return protoreflect.ValueOfList(&_GenesisState_9_list{list: &list}) + case "utss.v1.GenesisState.next_migration_id": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) @@ -1638,6 +2224,15 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if x.NextTssEventId != 0 { n += 1 + runtime.Sov(uint64(x.NextTssEventId)) } + if len(x.FundMigrations) > 0 { + for _, e := range x.FundMigrations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.NextMigrationId != 0 { + n += 1 + runtime.Sov(uint64(x.NextMigrationId)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1667,6 +2262,27 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.NextMigrationId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NextMigrationId)) + i-- + dAtA[i] = 0x50 + } + if len(x.FundMigrations) > 0 { + for iNdEx := len(x.FundMigrations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.FundMigrations[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] = 0x4a + } + } if x.NextTssEventId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.NextTssEventId)) i-- @@ -2064,6 +2680,59 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { break } } + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FundMigrations", 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.FundMigrations = append(x.FundMigrations, &FundMigrationEntry{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FundMigrations[len(x.FundMigrations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextMigrationId", wireType) + } + x.NextMigrationId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.NextMigrationId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2200,6 +2869,50 @@ func (x *TssKeyEntry) GetValue() *TssKey { return nil } +// FundMigrationEntry is a key-value pair for exporting FundMigrations map state. +type FundMigrationEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key uint64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + Value *FundMigration `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *FundMigrationEntry) Reset() { + *x = FundMigrationEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FundMigrationEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FundMigrationEntry) ProtoMessage() {} + +// Deprecated: Use FundMigrationEntry.ProtoReflect.Descriptor instead. +func (*FundMigrationEntry) Descriptor() ([]byte, []int) { + return file_utss_v1_genesis_proto_rawDescGZIP(), []int{2} +} + +func (x *FundMigrationEntry) GetKey() uint64 { + if x != nil { + return x.Key + } + return 0 +} + +func (x *FundMigrationEntry) GetValue() *FundMigration { + if x != nil { + return x.Value + } + return nil +} + // GenesisState defines the module genesis state type GenesisState struct { state protoimpl.MessageState @@ -2222,12 +2935,16 @@ type GenesisState struct { TssEvents []*TssEvent `protobuf:"bytes,7,rep,name=tss_events,json=tssEvents,proto3" json:"tss_events,omitempty"` // next_tss_event_id is the next auto-increment ID for TssEvents. NextTssEventId uint64 `protobuf:"varint,8,opt,name=next_tss_event_id,json=nextTssEventId,proto3" json:"next_tss_event_id,omitempty"` + // fund_migrations are entries from the FundMigrations store. + FundMigrations []*FundMigrationEntry `protobuf:"bytes,9,rep,name=fund_migrations,json=fundMigrations,proto3" json:"fund_migrations,omitempty"` + // next_migration_id is the next auto-increment ID for FundMigrations. + NextMigrationId uint64 `protobuf:"varint,10,opt,name=next_migration_id,json=nextMigrationId,proto3" json:"next_migration_id,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { - mi := &file_utss_v1_genesis_proto_msgTypes[2] + mi := &file_utss_v1_genesis_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2241,7 +2958,7 @@ func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { - return file_utss_v1_genesis_proto_rawDescGZIP(), []int{2} + return file_utss_v1_genesis_proto_rawDescGZIP(), []int{3} } func (x *GenesisState) GetParams() *Params { @@ -2300,6 +3017,20 @@ func (x *GenesisState) GetNextTssEventId() uint64 { return 0 } +func (x *GenesisState) GetFundMigrations() []*FundMigrationEntry { + if x != nil { + return x.FundMigrations + } + return nil +} + +func (x *GenesisState) GetNextMigrationId() uint64 { + if x != nil { + return x.NextMigrationId + } + return 0 +} + var File_utss_v1_genesis_proto protoreflect.FileDescriptor var file_utss_v1_genesis_proto_rawDesc = []byte{ @@ -2319,46 +3050,60 @@ var file_utss_v1_genesis_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd9, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x11, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x4a, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x68, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x0f, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, - 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x74, 0x73, 0x73, 0x4b, - 0x65, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, - 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, - 0x74, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x11, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x74, 0x73, 0x73, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x42, 0x91, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, - 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, - 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, - 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5a, 0x0a, 0x12, 0x46, 0x75, 0x6e, 0x64, + 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd1, 0x04, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x46, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x0f, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x73, 0x73, 0x4b, 0x65, + 0x79, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x75, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x74, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x74, 0x73, 0x73, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x73, + 0x73, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x66, 0x75, + 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x4d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x91, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, + 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, + 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2373,30 +3118,34 @@ func file_utss_v1_genesis_proto_rawDescGZIP() []byte { return file_utss_v1_genesis_proto_rawDescData } -var file_utss_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_utss_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_utss_v1_genesis_proto_goTypes = []interface{}{ (*TssKeyProcessEntry)(nil), // 0: utss.v1.TssKeyProcessEntry (*TssKeyEntry)(nil), // 1: utss.v1.TssKeyEntry - (*GenesisState)(nil), // 2: utss.v1.GenesisState - (*TssKeyProcess)(nil), // 3: utss.v1.TssKeyProcess - (*TssKey)(nil), // 4: utss.v1.TssKey - (*Params)(nil), // 5: utss.v1.Params - (*TssEvent)(nil), // 6: utss.v1.TssEvent + (*FundMigrationEntry)(nil), // 2: utss.v1.FundMigrationEntry + (*GenesisState)(nil), // 3: utss.v1.GenesisState + (*TssKeyProcess)(nil), // 4: utss.v1.TssKeyProcess + (*TssKey)(nil), // 5: utss.v1.TssKey + (*FundMigration)(nil), // 6: utss.v1.FundMigration + (*Params)(nil), // 7: utss.v1.Params + (*TssEvent)(nil), // 8: utss.v1.TssEvent } var file_utss_v1_genesis_proto_depIdxs = []int32{ - 3, // 0: utss.v1.TssKeyProcessEntry.value:type_name -> utss.v1.TssKeyProcess - 4, // 1: utss.v1.TssKeyEntry.value:type_name -> utss.v1.TssKey - 5, // 2: utss.v1.GenesisState.params:type_name -> utss.v1.Params - 3, // 3: utss.v1.GenesisState.current_tss_process:type_name -> utss.v1.TssKeyProcess - 0, // 4: utss.v1.GenesisState.process_history:type_name -> utss.v1.TssKeyProcessEntry - 4, // 5: utss.v1.GenesisState.current_tss_key:type_name -> utss.v1.TssKey - 1, // 6: utss.v1.GenesisState.tss_key_history:type_name -> utss.v1.TssKeyEntry - 6, // 7: utss.v1.GenesisState.tss_events:type_name -> utss.v1.TssEvent - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 4, // 0: utss.v1.TssKeyProcessEntry.value:type_name -> utss.v1.TssKeyProcess + 5, // 1: utss.v1.TssKeyEntry.value:type_name -> utss.v1.TssKey + 6, // 2: utss.v1.FundMigrationEntry.value:type_name -> utss.v1.FundMigration + 7, // 3: utss.v1.GenesisState.params:type_name -> utss.v1.Params + 4, // 4: utss.v1.GenesisState.current_tss_process:type_name -> utss.v1.TssKeyProcess + 0, // 5: utss.v1.GenesisState.process_history:type_name -> utss.v1.TssKeyProcessEntry + 5, // 6: utss.v1.GenesisState.current_tss_key:type_name -> utss.v1.TssKey + 1, // 7: utss.v1.GenesisState.tss_key_history:type_name -> utss.v1.TssKeyEntry + 8, // 8: utss.v1.GenesisState.tss_events:type_name -> utss.v1.TssEvent + 2, // 9: utss.v1.GenesisState.fund_migrations:type_name -> utss.v1.FundMigrationEntry + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_utss_v1_genesis_proto_init() } @@ -2431,6 +3180,18 @@ func file_utss_v1_genesis_proto_init() { } } file_utss_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundMigrationEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state @@ -2449,7 +3210,7 @@ func file_utss_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/utss/v1/query.pulsar.go b/api/utss/v1/query.pulsar.go index 7de93298..c02c0dc8 100644 --- a/api/utss/v1/query.pulsar.go +++ b/api/utss/v1/query.pulsar.go @@ -9791,6 +9791,2703 @@ func (x *fastReflection_QueryAllTssEventsResponse) ProtoMethods() *protoiface.Me } } +var ( + md_QueryGetFundMigrationRequest protoreflect.MessageDescriptor + fd_QueryGetFundMigrationRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryGetFundMigrationRequest = File_utss_v1_query_proto.Messages().ByName("QueryGetFundMigrationRequest") + fd_QueryGetFundMigrationRequest_id = md_QueryGetFundMigrationRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetFundMigrationRequest)(nil) + +type fastReflection_QueryGetFundMigrationRequest QueryGetFundMigrationRequest + +func (x *QueryGetFundMigrationRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetFundMigrationRequest)(x) +} + +func (x *QueryGetFundMigrationRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[22] + 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_QueryGetFundMigrationRequest_messageType fastReflection_QueryGetFundMigrationRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetFundMigrationRequest_messageType{} + +type fastReflection_QueryGetFundMigrationRequest_messageType struct{} + +func (x fastReflection_QueryGetFundMigrationRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetFundMigrationRequest)(nil) +} +func (x fastReflection_QueryGetFundMigrationRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetFundMigrationRequest) +} +func (x fastReflection_QueryGetFundMigrationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetFundMigrationRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetFundMigrationRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetFundMigrationRequest +} + +// 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_QueryGetFundMigrationRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetFundMigrationRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetFundMigrationRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetFundMigrationRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetFundMigrationRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetFundMigrationRequest)(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_QueryGetFundMigrationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_QueryGetFundMigrationRequest_id, 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_QueryGetFundMigrationRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationRequest.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationRequest 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_QueryGetFundMigrationRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationRequest.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationRequest 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_QueryGetFundMigrationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryGetFundMigrationRequest.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationRequest 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_QueryGetFundMigrationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationRequest.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationRequest 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_QueryGetFundMigrationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationRequest.id": + panic(fmt.Errorf("field id of message utss.v1.QueryGetFundMigrationRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationRequest 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_QueryGetFundMigrationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationRequest.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationRequest 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_QueryGetFundMigrationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryGetFundMigrationRequest", 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_QueryGetFundMigrationRequest) 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_QueryGetFundMigrationRequest) 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_QueryGetFundMigrationRequest) 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_QueryGetFundMigrationRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetFundMigrationRequest) + 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.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + 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().(*QueryGetFundMigrationRequest) + 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.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryGetFundMigrationRequest) + 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: QueryGetFundMigrationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetFundMigrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_QueryGetFundMigrationResponse protoreflect.MessageDescriptor + fd_QueryGetFundMigrationResponse_migration protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryGetFundMigrationResponse = File_utss_v1_query_proto.Messages().ByName("QueryGetFundMigrationResponse") + fd_QueryGetFundMigrationResponse_migration = md_QueryGetFundMigrationResponse.Fields().ByName("migration") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetFundMigrationResponse)(nil) + +type fastReflection_QueryGetFundMigrationResponse QueryGetFundMigrationResponse + +func (x *QueryGetFundMigrationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetFundMigrationResponse)(x) +} + +func (x *QueryGetFundMigrationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[23] + 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_QueryGetFundMigrationResponse_messageType fastReflection_QueryGetFundMigrationResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetFundMigrationResponse_messageType{} + +type fastReflection_QueryGetFundMigrationResponse_messageType struct{} + +func (x fastReflection_QueryGetFundMigrationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetFundMigrationResponse)(nil) +} +func (x fastReflection_QueryGetFundMigrationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetFundMigrationResponse) +} +func (x fastReflection_QueryGetFundMigrationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetFundMigrationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetFundMigrationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetFundMigrationResponse +} + +// 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_QueryGetFundMigrationResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetFundMigrationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetFundMigrationResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetFundMigrationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetFundMigrationResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetFundMigrationResponse)(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_QueryGetFundMigrationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Migration != nil { + value := protoreflect.ValueOfMessage(x.Migration.ProtoReflect()) + if !f(fd_QueryGetFundMigrationResponse_migration, 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_QueryGetFundMigrationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationResponse.migration": + return x.Migration != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationResponse 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_QueryGetFundMigrationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationResponse.migration": + x.Migration = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationResponse 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_QueryGetFundMigrationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryGetFundMigrationResponse.migration": + value := x.Migration + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationResponse 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_QueryGetFundMigrationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationResponse.migration": + x.Migration = value.Message().Interface().(*FundMigration) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationResponse 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_QueryGetFundMigrationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationResponse.migration": + if x.Migration == nil { + x.Migration = new(FundMigration) + } + return protoreflect.ValueOfMessage(x.Migration.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationResponse 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_QueryGetFundMigrationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryGetFundMigrationResponse.migration": + m := new(FundMigration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryGetFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryGetFundMigrationResponse 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_QueryGetFundMigrationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryGetFundMigrationResponse", 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_QueryGetFundMigrationResponse) 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_QueryGetFundMigrationResponse) 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_QueryGetFundMigrationResponse) 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_QueryGetFundMigrationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetFundMigrationResponse) + 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.Migration != nil { + l = options.Size(x.Migration) + 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().(*QueryGetFundMigrationResponse) + 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.Migration != nil { + encoded, err := options.Marshal(x.Migration) + 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().(*QueryGetFundMigrationResponse) + 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: QueryGetFundMigrationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetFundMigrationResponse: 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 Migration", 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.Migration == nil { + x.Migration = &FundMigration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Migration); 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_QueryPendingFundMigrationsRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryPendingFundMigrationsRequest = File_utss_v1_query_proto.Messages().ByName("QueryPendingFundMigrationsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryPendingFundMigrationsRequest)(nil) + +type fastReflection_QueryPendingFundMigrationsRequest QueryPendingFundMigrationsRequest + +func (x *QueryPendingFundMigrationsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPendingFundMigrationsRequest)(x) +} + +func (x *QueryPendingFundMigrationsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[24] + 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_QueryPendingFundMigrationsRequest_messageType fastReflection_QueryPendingFundMigrationsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPendingFundMigrationsRequest_messageType{} + +type fastReflection_QueryPendingFundMigrationsRequest_messageType struct{} + +func (x fastReflection_QueryPendingFundMigrationsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPendingFundMigrationsRequest)(nil) +} +func (x fastReflection_QueryPendingFundMigrationsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPendingFundMigrationsRequest) +} +func (x fastReflection_QueryPendingFundMigrationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPendingFundMigrationsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPendingFundMigrationsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPendingFundMigrationsRequest +} + +// 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_QueryPendingFundMigrationsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPendingFundMigrationsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPendingFundMigrationsRequest) New() protoreflect.Message { + return new(fastReflection_QueryPendingFundMigrationsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPendingFundMigrationsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPendingFundMigrationsRequest)(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_QueryPendingFundMigrationsRequest) 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_QueryPendingFundMigrationsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsRequest 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_QueryPendingFundMigrationsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsRequest 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_QueryPendingFundMigrationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsRequest 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_QueryPendingFundMigrationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsRequest 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_QueryPendingFundMigrationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsRequest 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_QueryPendingFundMigrationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsRequest 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_QueryPendingFundMigrationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryPendingFundMigrationsRequest", 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_QueryPendingFundMigrationsRequest) 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_QueryPendingFundMigrationsRequest) 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_QueryPendingFundMigrationsRequest) 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_QueryPendingFundMigrationsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPendingFundMigrationsRequest) + 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().(*QueryPendingFundMigrationsRequest) + 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().(*QueryPendingFundMigrationsRequest) + 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: QueryPendingFundMigrationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingFundMigrationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryPendingFundMigrationsResponse_1_list)(nil) + +type _QueryPendingFundMigrationsResponse_1_list struct { + list *[]*FundMigration +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FundMigration) + (*x.list)[i] = concreteValue +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FundMigration) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(FundMigration) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) NewElement() protoreflect.Value { + v := new(FundMigration) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPendingFundMigrationsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryPendingFundMigrationsResponse protoreflect.MessageDescriptor + fd_QueryPendingFundMigrationsResponse_migrations protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryPendingFundMigrationsResponse = File_utss_v1_query_proto.Messages().ByName("QueryPendingFundMigrationsResponse") + fd_QueryPendingFundMigrationsResponse_migrations = md_QueryPendingFundMigrationsResponse.Fields().ByName("migrations") +} + +var _ protoreflect.Message = (*fastReflection_QueryPendingFundMigrationsResponse)(nil) + +type fastReflection_QueryPendingFundMigrationsResponse QueryPendingFundMigrationsResponse + +func (x *QueryPendingFundMigrationsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPendingFundMigrationsResponse)(x) +} + +func (x *QueryPendingFundMigrationsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[25] + 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_QueryPendingFundMigrationsResponse_messageType fastReflection_QueryPendingFundMigrationsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPendingFundMigrationsResponse_messageType{} + +type fastReflection_QueryPendingFundMigrationsResponse_messageType struct{} + +func (x fastReflection_QueryPendingFundMigrationsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPendingFundMigrationsResponse)(nil) +} +func (x fastReflection_QueryPendingFundMigrationsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPendingFundMigrationsResponse) +} +func (x fastReflection_QueryPendingFundMigrationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPendingFundMigrationsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPendingFundMigrationsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPendingFundMigrationsResponse +} + +// 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_QueryPendingFundMigrationsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPendingFundMigrationsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPendingFundMigrationsResponse) New() protoreflect.Message { + return new(fastReflection_QueryPendingFundMigrationsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPendingFundMigrationsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPendingFundMigrationsResponse)(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_QueryPendingFundMigrationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Migrations) != 0 { + value := protoreflect.ValueOfList(&_QueryPendingFundMigrationsResponse_1_list{list: &x.Migrations}) + if !f(fd_QueryPendingFundMigrationsResponse_migrations, 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_QueryPendingFundMigrationsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryPendingFundMigrationsResponse.migrations": + return len(x.Migrations) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsResponse 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_QueryPendingFundMigrationsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryPendingFundMigrationsResponse.migrations": + x.Migrations = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsResponse 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_QueryPendingFundMigrationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryPendingFundMigrationsResponse.migrations": + if len(x.Migrations) == 0 { + return protoreflect.ValueOfList(&_QueryPendingFundMigrationsResponse_1_list{}) + } + listValue := &_QueryPendingFundMigrationsResponse_1_list{list: &x.Migrations} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsResponse 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_QueryPendingFundMigrationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryPendingFundMigrationsResponse.migrations": + lv := value.List() + clv := lv.(*_QueryPendingFundMigrationsResponse_1_list) + x.Migrations = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsResponse 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_QueryPendingFundMigrationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryPendingFundMigrationsResponse.migrations": + if x.Migrations == nil { + x.Migrations = []*FundMigration{} + } + value := &_QueryPendingFundMigrationsResponse_1_list{list: &x.Migrations} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsResponse 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_QueryPendingFundMigrationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryPendingFundMigrationsResponse.migrations": + list := []*FundMigration{} + return protoreflect.ValueOfList(&_QueryPendingFundMigrationsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryPendingFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryPendingFundMigrationsResponse 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_QueryPendingFundMigrationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryPendingFundMigrationsResponse", 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_QueryPendingFundMigrationsResponse) 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_QueryPendingFundMigrationsResponse) 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_QueryPendingFundMigrationsResponse) 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_QueryPendingFundMigrationsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPendingFundMigrationsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Migrations) > 0 { + for _, e := range x.Migrations { + 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().(*QueryPendingFundMigrationsResponse) + 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.Migrations) > 0 { + for iNdEx := len(x.Migrations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Migrations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPendingFundMigrationsResponse) + 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: QueryPendingFundMigrationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingFundMigrationsResponse: 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 Migrations", 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.Migrations = append(x.Migrations, &FundMigration{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Migrations[len(x.Migrations)-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_QueryAllFundMigrationsRequest protoreflect.MessageDescriptor + fd_QueryAllFundMigrationsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllFundMigrationsRequest = File_utss_v1_query_proto.Messages().ByName("QueryAllFundMigrationsRequest") + fd_QueryAllFundMigrationsRequest_pagination = md_QueryAllFundMigrationsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllFundMigrationsRequest)(nil) + +type fastReflection_QueryAllFundMigrationsRequest QueryAllFundMigrationsRequest + +func (x *QueryAllFundMigrationsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllFundMigrationsRequest)(x) +} + +func (x *QueryAllFundMigrationsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[26] + 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_QueryAllFundMigrationsRequest_messageType fastReflection_QueryAllFundMigrationsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllFundMigrationsRequest_messageType{} + +type fastReflection_QueryAllFundMigrationsRequest_messageType struct{} + +func (x fastReflection_QueryAllFundMigrationsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllFundMigrationsRequest)(nil) +} +func (x fastReflection_QueryAllFundMigrationsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllFundMigrationsRequest) +} +func (x fastReflection_QueryAllFundMigrationsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllFundMigrationsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllFundMigrationsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllFundMigrationsRequest +} + +// 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_QueryAllFundMigrationsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllFundMigrationsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllFundMigrationsRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllFundMigrationsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllFundMigrationsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllFundMigrationsRequest)(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_QueryAllFundMigrationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllFundMigrationsRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllFundMigrationsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsRequest 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_QueryAllFundMigrationsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsRequest 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_QueryAllFundMigrationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllFundMigrationsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsRequest 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_QueryAllFundMigrationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsRequest 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_QueryAllFundMigrationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsRequest 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_QueryAllFundMigrationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsRequest 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_QueryAllFundMigrationsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllFundMigrationsRequest", 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_QueryAllFundMigrationsRequest) 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_QueryAllFundMigrationsRequest) 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_QueryAllFundMigrationsRequest) 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_QueryAllFundMigrationsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllFundMigrationsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllFundMigrationsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllFundMigrationsRequest) + 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: QueryAllFundMigrationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllFundMigrationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAllFundMigrationsResponse_1_list)(nil) + +type _QueryAllFundMigrationsResponse_1_list struct { + list *[]*FundMigration +} + +func (x *_QueryAllFundMigrationsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllFundMigrationsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllFundMigrationsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FundMigration) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllFundMigrationsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*FundMigration) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllFundMigrationsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(FundMigration) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllFundMigrationsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllFundMigrationsResponse_1_list) NewElement() protoreflect.Value { + v := new(FundMigration) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllFundMigrationsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllFundMigrationsResponse protoreflect.MessageDescriptor + fd_QueryAllFundMigrationsResponse_migrations protoreflect.FieldDescriptor + fd_QueryAllFundMigrationsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllFundMigrationsResponse = File_utss_v1_query_proto.Messages().ByName("QueryAllFundMigrationsResponse") + fd_QueryAllFundMigrationsResponse_migrations = md_QueryAllFundMigrationsResponse.Fields().ByName("migrations") + fd_QueryAllFundMigrationsResponse_pagination = md_QueryAllFundMigrationsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllFundMigrationsResponse)(nil) + +type fastReflection_QueryAllFundMigrationsResponse QueryAllFundMigrationsResponse + +func (x *QueryAllFundMigrationsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllFundMigrationsResponse)(x) +} + +func (x *QueryAllFundMigrationsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[27] + 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_QueryAllFundMigrationsResponse_messageType fastReflection_QueryAllFundMigrationsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllFundMigrationsResponse_messageType{} + +type fastReflection_QueryAllFundMigrationsResponse_messageType struct{} + +func (x fastReflection_QueryAllFundMigrationsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllFundMigrationsResponse)(nil) +} +func (x fastReflection_QueryAllFundMigrationsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllFundMigrationsResponse) +} +func (x fastReflection_QueryAllFundMigrationsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllFundMigrationsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllFundMigrationsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllFundMigrationsResponse +} + +// 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_QueryAllFundMigrationsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllFundMigrationsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllFundMigrationsResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllFundMigrationsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllFundMigrationsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllFundMigrationsResponse)(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_QueryAllFundMigrationsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Migrations) != 0 { + value := protoreflect.ValueOfList(&_QueryAllFundMigrationsResponse_1_list{list: &x.Migrations}) + if !f(fd_QueryAllFundMigrationsResponse_migrations, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllFundMigrationsResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllFundMigrationsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsResponse.migrations": + return len(x.Migrations) != 0 + case "utss.v1.QueryAllFundMigrationsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsResponse 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_QueryAllFundMigrationsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsResponse.migrations": + x.Migrations = nil + case "utss.v1.QueryAllFundMigrationsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsResponse 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_QueryAllFundMigrationsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllFundMigrationsResponse.migrations": + if len(x.Migrations) == 0 { + return protoreflect.ValueOfList(&_QueryAllFundMigrationsResponse_1_list{}) + } + listValue := &_QueryAllFundMigrationsResponse_1_list{list: &x.Migrations} + return protoreflect.ValueOfList(listValue) + case "utss.v1.QueryAllFundMigrationsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsResponse 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_QueryAllFundMigrationsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsResponse.migrations": + lv := value.List() + clv := lv.(*_QueryAllFundMigrationsResponse_1_list) + x.Migrations = *clv.list + case "utss.v1.QueryAllFundMigrationsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsResponse 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_QueryAllFundMigrationsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsResponse.migrations": + if x.Migrations == nil { + x.Migrations = []*FundMigration{} + } + value := &_QueryAllFundMigrationsResponse_1_list{list: &x.Migrations} + return protoreflect.ValueOfList(value) + case "utss.v1.QueryAllFundMigrationsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsResponse 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_QueryAllFundMigrationsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllFundMigrationsResponse.migrations": + list := []*FundMigration{} + return protoreflect.ValueOfList(&_QueryAllFundMigrationsResponse_1_list{list: &list}) + case "utss.v1.QueryAllFundMigrationsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllFundMigrationsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllFundMigrationsResponse 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_QueryAllFundMigrationsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllFundMigrationsResponse", 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_QueryAllFundMigrationsResponse) 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_QueryAllFundMigrationsResponse) 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_QueryAllFundMigrationsResponse) 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_QueryAllFundMigrationsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllFundMigrationsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Migrations) > 0 { + for _, e := range x.Migrations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllFundMigrationsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Migrations) > 0 { + for iNdEx := len(x.Migrations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Migrations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllFundMigrationsResponse) + 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: QueryAllFundMigrationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllFundMigrationsResponse: 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 Migrations", 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.Migrations = append(x.Migrations, &FundMigration{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Migrations[len(x.Migrations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -10581,6 +13278,216 @@ func (x *QueryAllTssEventsResponse) GetPagination() *v1beta1.PageResponse { return nil } +// Fund Migration queries +type QueryGetFundMigrationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryGetFundMigrationRequest) Reset() { + *x = QueryGetFundMigrationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetFundMigrationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetFundMigrationRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetFundMigrationRequest.ProtoReflect.Descriptor instead. +func (*QueryGetFundMigrationRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{22} +} + +func (x *QueryGetFundMigrationRequest) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type QueryGetFundMigrationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Migration *FundMigration `protobuf:"bytes,1,opt,name=migration,proto3" json:"migration,omitempty"` +} + +func (x *QueryGetFundMigrationResponse) Reset() { + *x = QueryGetFundMigrationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetFundMigrationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetFundMigrationResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetFundMigrationResponse.ProtoReflect.Descriptor instead. +func (*QueryGetFundMigrationResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{23} +} + +func (x *QueryGetFundMigrationResponse) GetMigration() *FundMigration { + if x != nil { + return x.Migration + } + return nil +} + +type QueryPendingFundMigrationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryPendingFundMigrationsRequest) Reset() { + *x = QueryPendingFundMigrationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPendingFundMigrationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPendingFundMigrationsRequest) ProtoMessage() {} + +// Deprecated: Use QueryPendingFundMigrationsRequest.ProtoReflect.Descriptor instead. +func (*QueryPendingFundMigrationsRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{24} +} + +type QueryPendingFundMigrationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Migrations []*FundMigration `protobuf:"bytes,1,rep,name=migrations,proto3" json:"migrations,omitempty"` +} + +func (x *QueryPendingFundMigrationsResponse) Reset() { + *x = QueryPendingFundMigrationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPendingFundMigrationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPendingFundMigrationsResponse) ProtoMessage() {} + +// Deprecated: Use QueryPendingFundMigrationsResponse.ProtoReflect.Descriptor instead. +func (*QueryPendingFundMigrationsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{25} +} + +func (x *QueryPendingFundMigrationsResponse) GetMigrations() []*FundMigration { + if x != nil { + return x.Migrations + } + return nil +} + +type QueryAllFundMigrationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllFundMigrationsRequest) Reset() { + *x = QueryAllFundMigrationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllFundMigrationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllFundMigrationsRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllFundMigrationsRequest.ProtoReflect.Descriptor instead. +func (*QueryAllFundMigrationsRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{26} +} + +func (x *QueryAllFundMigrationsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryAllFundMigrationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Migrations []*FundMigration `protobuf:"bytes,1,rep,name=migrations,proto3" json:"migrations,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllFundMigrationsResponse) Reset() { + *x = QueryAllFundMigrationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllFundMigrationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllFundMigrationsResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllFundMigrationsResponse.ProtoReflect.Descriptor instead. +func (*QueryAllFundMigrationsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{27} +} + +func (x *QueryAllFundMigrationsResponse) GetMigrations() []*FundMigration { + if x != nil { + return x.Migrations + } + return nil +} + +func (x *QueryAllFundMigrationsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + var File_utss_v1_query_proto protoreflect.FileDescriptor var file_utss_v1_query_proto_rawDesc = []byte{ @@ -10703,96 +13610,156 @@ var file_utss_v1_query_proto_rawDesc = []byte{ 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x32, 0x80, 0x0a, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7d, 0x0a, 0x0e, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x2e, 0x75, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, - 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x71, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x12, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, - 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x41, - 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x75, 0x74, 0x73, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x6d, 0x0a, 0x0a, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x75, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x75, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, - 0x6b, 0x65, 0x79, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x07, 0x4b, - 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x22, 0x2e, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, + 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x55, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, + 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x23, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5c, 0x0a, + 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x75, 0x6e, + 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x67, 0x0a, 0x1d, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, + 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x9f, 0x0d, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, + 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x7d, 0x0a, 0x0e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x23, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x71, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x12, 0x20, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x69, - 0x64, 0x7d, 0x12, 0x5c, 0x0a, 0x07, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c, 0x2e, - 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, - 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, - 0x12, 0x6f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x75, - 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x12, 0x12, 0x10, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, + 0x79, 0x12, 0x1f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x75, + 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, + 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, + 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, + 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x5c, 0x0a, 0x07, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x75, 0x74, 0x73, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x12, 0x6f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x73, + 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, 0x73, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x27, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x28, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, - 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x6d, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x54, 0x73, 0x73, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x54, 0x73, 0x73, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, - 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, - 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, - 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, - 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x75, 0x74, 0x73, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x7d, 0x12, + 0x8a, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, + 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x73, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x6d, 0x0a, 0x0c, + 0x41, 0x6c, 0x6c, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x54, + 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, + 0x6c, 0x6c, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x82, 0x01, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x94, 0x01, 0x0a, 0x15, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x75, 0x6e, 0x64, + 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x75, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x75, 0x6e, + 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x46, + 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, + 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, + 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, + 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10807,84 +13774,102 @@ func file_utss_v1_query_proto_rawDescGZIP() []byte { return file_utss_v1_query_proto_rawDescData } -var file_utss_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_utss_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_utss_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: utss.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: utss.v1.QueryParamsResponse - (*QueryCurrentProcessRequest)(nil), // 2: utss.v1.QueryCurrentProcessRequest - (*QueryCurrentProcessResponse)(nil), // 3: utss.v1.QueryCurrentProcessResponse - (*QueryProcessByIdRequest)(nil), // 4: utss.v1.QueryProcessByIdRequest - (*QueryProcessByIdResponse)(nil), // 5: utss.v1.QueryProcessByIdResponse - (*QueryAllProcessesRequest)(nil), // 6: utss.v1.QueryAllProcessesRequest - (*QueryAllProcessesResponse)(nil), // 7: utss.v1.QueryAllProcessesResponse - (*QueryCurrentKeyRequest)(nil), // 8: utss.v1.QueryCurrentKeyRequest - (*QueryCurrentKeyResponse)(nil), // 9: utss.v1.QueryCurrentKeyResponse - (*QueryKeyByIdRequest)(nil), // 10: utss.v1.QueryKeyByIdRequest - (*QueryKeyByIdResponse)(nil), // 11: utss.v1.QueryKeyByIdResponse - (*QueryAllKeysRequest)(nil), // 12: utss.v1.QueryAllKeysRequest - (*QueryAllKeysResponse)(nil), // 13: utss.v1.QueryAllKeysResponse - (*QueryGetTssEventRequest)(nil), // 14: utss.v1.QueryGetTssEventRequest - (*QueryGetTssEventResponse)(nil), // 15: utss.v1.QueryGetTssEventResponse - (*QueryGetPendingTssEventRequest)(nil), // 16: utss.v1.QueryGetPendingTssEventRequest - (*QueryGetPendingTssEventResponse)(nil), // 17: utss.v1.QueryGetPendingTssEventResponse - (*QueryAllPendingTssEventsRequest)(nil), // 18: utss.v1.QueryAllPendingTssEventsRequest - (*QueryAllPendingTssEventsResponse)(nil), // 19: utss.v1.QueryAllPendingTssEventsResponse - (*QueryAllTssEventsRequest)(nil), // 20: utss.v1.QueryAllTssEventsRequest - (*QueryAllTssEventsResponse)(nil), // 21: utss.v1.QueryAllTssEventsResponse - (*Params)(nil), // 22: utss.v1.Params - (*TssKeyProcess)(nil), // 23: utss.v1.TssKeyProcess - (*v1beta1.PageRequest)(nil), // 24: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 25: cosmos.base.query.v1beta1.PageResponse - (*TssKey)(nil), // 26: utss.v1.TssKey - (*TssEvent)(nil), // 27: utss.v1.TssEvent + (*QueryParamsRequest)(nil), // 0: utss.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: utss.v1.QueryParamsResponse + (*QueryCurrentProcessRequest)(nil), // 2: utss.v1.QueryCurrentProcessRequest + (*QueryCurrentProcessResponse)(nil), // 3: utss.v1.QueryCurrentProcessResponse + (*QueryProcessByIdRequest)(nil), // 4: utss.v1.QueryProcessByIdRequest + (*QueryProcessByIdResponse)(nil), // 5: utss.v1.QueryProcessByIdResponse + (*QueryAllProcessesRequest)(nil), // 6: utss.v1.QueryAllProcessesRequest + (*QueryAllProcessesResponse)(nil), // 7: utss.v1.QueryAllProcessesResponse + (*QueryCurrentKeyRequest)(nil), // 8: utss.v1.QueryCurrentKeyRequest + (*QueryCurrentKeyResponse)(nil), // 9: utss.v1.QueryCurrentKeyResponse + (*QueryKeyByIdRequest)(nil), // 10: utss.v1.QueryKeyByIdRequest + (*QueryKeyByIdResponse)(nil), // 11: utss.v1.QueryKeyByIdResponse + (*QueryAllKeysRequest)(nil), // 12: utss.v1.QueryAllKeysRequest + (*QueryAllKeysResponse)(nil), // 13: utss.v1.QueryAllKeysResponse + (*QueryGetTssEventRequest)(nil), // 14: utss.v1.QueryGetTssEventRequest + (*QueryGetTssEventResponse)(nil), // 15: utss.v1.QueryGetTssEventResponse + (*QueryGetPendingTssEventRequest)(nil), // 16: utss.v1.QueryGetPendingTssEventRequest + (*QueryGetPendingTssEventResponse)(nil), // 17: utss.v1.QueryGetPendingTssEventResponse + (*QueryAllPendingTssEventsRequest)(nil), // 18: utss.v1.QueryAllPendingTssEventsRequest + (*QueryAllPendingTssEventsResponse)(nil), // 19: utss.v1.QueryAllPendingTssEventsResponse + (*QueryAllTssEventsRequest)(nil), // 20: utss.v1.QueryAllTssEventsRequest + (*QueryAllTssEventsResponse)(nil), // 21: utss.v1.QueryAllTssEventsResponse + (*QueryGetFundMigrationRequest)(nil), // 22: utss.v1.QueryGetFundMigrationRequest + (*QueryGetFundMigrationResponse)(nil), // 23: utss.v1.QueryGetFundMigrationResponse + (*QueryPendingFundMigrationsRequest)(nil), // 24: utss.v1.QueryPendingFundMigrationsRequest + (*QueryPendingFundMigrationsResponse)(nil), // 25: utss.v1.QueryPendingFundMigrationsResponse + (*QueryAllFundMigrationsRequest)(nil), // 26: utss.v1.QueryAllFundMigrationsRequest + (*QueryAllFundMigrationsResponse)(nil), // 27: utss.v1.QueryAllFundMigrationsResponse + (*Params)(nil), // 28: utss.v1.Params + (*TssKeyProcess)(nil), // 29: utss.v1.TssKeyProcess + (*v1beta1.PageRequest)(nil), // 30: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 31: cosmos.base.query.v1beta1.PageResponse + (*TssKey)(nil), // 32: utss.v1.TssKey + (*TssEvent)(nil), // 33: utss.v1.TssEvent + (*FundMigration)(nil), // 34: utss.v1.FundMigration } var file_utss_v1_query_proto_depIdxs = []int32{ - 22, // 0: utss.v1.QueryParamsResponse.params:type_name -> utss.v1.Params - 23, // 1: utss.v1.QueryCurrentProcessResponse.process:type_name -> utss.v1.TssKeyProcess - 23, // 2: utss.v1.QueryProcessByIdResponse.process:type_name -> utss.v1.TssKeyProcess - 24, // 3: utss.v1.QueryAllProcessesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 4: utss.v1.QueryAllProcessesResponse.processes:type_name -> utss.v1.TssKeyProcess - 25, // 5: utss.v1.QueryAllProcessesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 26, // 6: utss.v1.QueryCurrentKeyResponse.key:type_name -> utss.v1.TssKey - 26, // 7: utss.v1.QueryKeyByIdResponse.key:type_name -> utss.v1.TssKey - 24, // 8: utss.v1.QueryAllKeysRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 26, // 9: utss.v1.QueryAllKeysResponse.keys:type_name -> utss.v1.TssKey - 25, // 10: utss.v1.QueryAllKeysResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 27, // 11: utss.v1.QueryGetTssEventResponse.event:type_name -> utss.v1.TssEvent - 27, // 12: utss.v1.QueryGetPendingTssEventResponse.event:type_name -> utss.v1.TssEvent - 24, // 13: utss.v1.QueryAllPendingTssEventsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 14: utss.v1.QueryAllPendingTssEventsResponse.events:type_name -> utss.v1.TssEvent - 25, // 15: utss.v1.QueryAllPendingTssEventsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 24, // 16: utss.v1.QueryAllTssEventsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 17: utss.v1.QueryAllTssEventsResponse.events:type_name -> utss.v1.TssEvent - 25, // 18: utss.v1.QueryAllTssEventsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 19: utss.v1.Query.Params:input_type -> utss.v1.QueryParamsRequest - 2, // 20: utss.v1.Query.CurrentProcess:input_type -> utss.v1.QueryCurrentProcessRequest - 4, // 21: utss.v1.Query.ProcessById:input_type -> utss.v1.QueryProcessByIdRequest - 6, // 22: utss.v1.Query.AllProcesses:input_type -> utss.v1.QueryAllProcessesRequest - 8, // 23: utss.v1.Query.CurrentKey:input_type -> utss.v1.QueryCurrentKeyRequest - 10, // 24: utss.v1.Query.KeyById:input_type -> utss.v1.QueryKeyByIdRequest - 12, // 25: utss.v1.Query.AllKeys:input_type -> utss.v1.QueryAllKeysRequest - 14, // 26: utss.v1.Query.GetTssEvent:input_type -> utss.v1.QueryGetTssEventRequest - 16, // 27: utss.v1.Query.GetPendingTssEvent:input_type -> utss.v1.QueryGetPendingTssEventRequest - 18, // 28: utss.v1.Query.AllPendingTssEvents:input_type -> utss.v1.QueryAllPendingTssEventsRequest - 20, // 29: utss.v1.Query.AllTssEvents:input_type -> utss.v1.QueryAllTssEventsRequest - 1, // 30: utss.v1.Query.Params:output_type -> utss.v1.QueryParamsResponse - 3, // 31: utss.v1.Query.CurrentProcess:output_type -> utss.v1.QueryCurrentProcessResponse - 5, // 32: utss.v1.Query.ProcessById:output_type -> utss.v1.QueryProcessByIdResponse - 7, // 33: utss.v1.Query.AllProcesses:output_type -> utss.v1.QueryAllProcessesResponse - 9, // 34: utss.v1.Query.CurrentKey:output_type -> utss.v1.QueryCurrentKeyResponse - 11, // 35: utss.v1.Query.KeyById:output_type -> utss.v1.QueryKeyByIdResponse - 13, // 36: utss.v1.Query.AllKeys:output_type -> utss.v1.QueryAllKeysResponse - 15, // 37: utss.v1.Query.GetTssEvent:output_type -> utss.v1.QueryGetTssEventResponse - 17, // 38: utss.v1.Query.GetPendingTssEvent:output_type -> utss.v1.QueryGetPendingTssEventResponse - 19, // 39: utss.v1.Query.AllPendingTssEvents:output_type -> utss.v1.QueryAllPendingTssEventsResponse - 21, // 40: utss.v1.Query.AllTssEvents:output_type -> utss.v1.QueryAllTssEventsResponse - 30, // [30:41] is the sub-list for method output_type - 19, // [19:30] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 28, // 0: utss.v1.QueryParamsResponse.params:type_name -> utss.v1.Params + 29, // 1: utss.v1.QueryCurrentProcessResponse.process:type_name -> utss.v1.TssKeyProcess + 29, // 2: utss.v1.QueryProcessByIdResponse.process:type_name -> utss.v1.TssKeyProcess + 30, // 3: utss.v1.QueryAllProcessesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 29, // 4: utss.v1.QueryAllProcessesResponse.processes:type_name -> utss.v1.TssKeyProcess + 31, // 5: utss.v1.QueryAllProcessesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 32, // 6: utss.v1.QueryCurrentKeyResponse.key:type_name -> utss.v1.TssKey + 32, // 7: utss.v1.QueryKeyByIdResponse.key:type_name -> utss.v1.TssKey + 30, // 8: utss.v1.QueryAllKeysRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 32, // 9: utss.v1.QueryAllKeysResponse.keys:type_name -> utss.v1.TssKey + 31, // 10: utss.v1.QueryAllKeysResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 33, // 11: utss.v1.QueryGetTssEventResponse.event:type_name -> utss.v1.TssEvent + 33, // 12: utss.v1.QueryGetPendingTssEventResponse.event:type_name -> utss.v1.TssEvent + 30, // 13: utss.v1.QueryAllPendingTssEventsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 33, // 14: utss.v1.QueryAllPendingTssEventsResponse.events:type_name -> utss.v1.TssEvent + 31, // 15: utss.v1.QueryAllPendingTssEventsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 30, // 16: utss.v1.QueryAllTssEventsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 33, // 17: utss.v1.QueryAllTssEventsResponse.events:type_name -> utss.v1.TssEvent + 31, // 18: utss.v1.QueryAllTssEventsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 34, // 19: utss.v1.QueryGetFundMigrationResponse.migration:type_name -> utss.v1.FundMigration + 34, // 20: utss.v1.QueryPendingFundMigrationsResponse.migrations:type_name -> utss.v1.FundMigration + 30, // 21: utss.v1.QueryAllFundMigrationsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 34, // 22: utss.v1.QueryAllFundMigrationsResponse.migrations:type_name -> utss.v1.FundMigration + 31, // 23: utss.v1.QueryAllFundMigrationsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 24: utss.v1.Query.Params:input_type -> utss.v1.QueryParamsRequest + 2, // 25: utss.v1.Query.CurrentProcess:input_type -> utss.v1.QueryCurrentProcessRequest + 4, // 26: utss.v1.Query.ProcessById:input_type -> utss.v1.QueryProcessByIdRequest + 6, // 27: utss.v1.Query.AllProcesses:input_type -> utss.v1.QueryAllProcessesRequest + 8, // 28: utss.v1.Query.CurrentKey:input_type -> utss.v1.QueryCurrentKeyRequest + 10, // 29: utss.v1.Query.KeyById:input_type -> utss.v1.QueryKeyByIdRequest + 12, // 30: utss.v1.Query.AllKeys:input_type -> utss.v1.QueryAllKeysRequest + 14, // 31: utss.v1.Query.GetTssEvent:input_type -> utss.v1.QueryGetTssEventRequest + 16, // 32: utss.v1.Query.GetPendingTssEvent:input_type -> utss.v1.QueryGetPendingTssEventRequest + 18, // 33: utss.v1.Query.AllPendingTssEvents:input_type -> utss.v1.QueryAllPendingTssEventsRequest + 20, // 34: utss.v1.Query.AllTssEvents:input_type -> utss.v1.QueryAllTssEventsRequest + 22, // 35: utss.v1.Query.GetFundMigration:input_type -> utss.v1.QueryGetFundMigrationRequest + 24, // 36: utss.v1.Query.PendingFundMigrations:input_type -> utss.v1.QueryPendingFundMigrationsRequest + 26, // 37: utss.v1.Query.AllFundMigrations:input_type -> utss.v1.QueryAllFundMigrationsRequest + 1, // 38: utss.v1.Query.Params:output_type -> utss.v1.QueryParamsResponse + 3, // 39: utss.v1.Query.CurrentProcess:output_type -> utss.v1.QueryCurrentProcessResponse + 5, // 40: utss.v1.Query.ProcessById:output_type -> utss.v1.QueryProcessByIdResponse + 7, // 41: utss.v1.Query.AllProcesses:output_type -> utss.v1.QueryAllProcessesResponse + 9, // 42: utss.v1.Query.CurrentKey:output_type -> utss.v1.QueryCurrentKeyResponse + 11, // 43: utss.v1.Query.KeyById:output_type -> utss.v1.QueryKeyByIdResponse + 13, // 44: utss.v1.Query.AllKeys:output_type -> utss.v1.QueryAllKeysResponse + 15, // 45: utss.v1.Query.GetTssEvent:output_type -> utss.v1.QueryGetTssEventResponse + 17, // 46: utss.v1.Query.GetPendingTssEvent:output_type -> utss.v1.QueryGetPendingTssEventResponse + 19, // 47: utss.v1.Query.AllPendingTssEvents:output_type -> utss.v1.QueryAllPendingTssEventsResponse + 21, // 48: utss.v1.Query.AllTssEvents:output_type -> utss.v1.QueryAllTssEventsResponse + 23, // 49: utss.v1.Query.GetFundMigration:output_type -> utss.v1.QueryGetFundMigrationResponse + 25, // 50: utss.v1.Query.PendingFundMigrations:output_type -> utss.v1.QueryPendingFundMigrationsResponse + 27, // 51: utss.v1.Query.AllFundMigrations:output_type -> utss.v1.QueryAllFundMigrationsResponse + 38, // [38:52] is the sub-list for method output_type + 24, // [24:38] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_utss_v1_query_proto_init() } @@ -11159,6 +14144,78 @@ func file_utss_v1_query_proto_init() { return nil } } + file_utss_v1_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetFundMigrationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetFundMigrationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPendingFundMigrationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPendingFundMigrationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllFundMigrationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllFundMigrationsResponse); 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{ @@ -11166,7 +14223,7 @@ func file_utss_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 22, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, diff --git a/api/utss/v1/query_grpc.pb.go b/api/utss/v1/query_grpc.pb.go index c2919142..f678da77 100644 --- a/api/utss/v1/query_grpc.pb.go +++ b/api/utss/v1/query_grpc.pb.go @@ -19,17 +19,20 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/utss.v1.Query/Params" - Query_CurrentProcess_FullMethodName = "/utss.v1.Query/CurrentProcess" - Query_ProcessById_FullMethodName = "/utss.v1.Query/ProcessById" - Query_AllProcesses_FullMethodName = "/utss.v1.Query/AllProcesses" - Query_CurrentKey_FullMethodName = "/utss.v1.Query/CurrentKey" - Query_KeyById_FullMethodName = "/utss.v1.Query/KeyById" - Query_AllKeys_FullMethodName = "/utss.v1.Query/AllKeys" - Query_GetTssEvent_FullMethodName = "/utss.v1.Query/GetTssEvent" - Query_GetPendingTssEvent_FullMethodName = "/utss.v1.Query/GetPendingTssEvent" - Query_AllPendingTssEvents_FullMethodName = "/utss.v1.Query/AllPendingTssEvents" - Query_AllTssEvents_FullMethodName = "/utss.v1.Query/AllTssEvents" + Query_Params_FullMethodName = "/utss.v1.Query/Params" + Query_CurrentProcess_FullMethodName = "/utss.v1.Query/CurrentProcess" + Query_ProcessById_FullMethodName = "/utss.v1.Query/ProcessById" + Query_AllProcesses_FullMethodName = "/utss.v1.Query/AllProcesses" + Query_CurrentKey_FullMethodName = "/utss.v1.Query/CurrentKey" + Query_KeyById_FullMethodName = "/utss.v1.Query/KeyById" + Query_AllKeys_FullMethodName = "/utss.v1.Query/AllKeys" + Query_GetTssEvent_FullMethodName = "/utss.v1.Query/GetTssEvent" + Query_GetPendingTssEvent_FullMethodName = "/utss.v1.Query/GetPendingTssEvent" + Query_AllPendingTssEvents_FullMethodName = "/utss.v1.Query/AllPendingTssEvents" + Query_AllTssEvents_FullMethodName = "/utss.v1.Query/AllTssEvents" + Query_GetFundMigration_FullMethodName = "/utss.v1.Query/GetFundMigration" + Query_PendingFundMigrations_FullMethodName = "/utss.v1.Query/PendingFundMigrations" + Query_AllFundMigrations_FullMethodName = "/utss.v1.Query/AllFundMigrations" ) // QueryClient is the client API for Query service. @@ -58,6 +61,12 @@ type QueryClient interface { AllPendingTssEvents(ctx context.Context, in *QueryAllPendingTssEventsRequest, opts ...grpc.CallOption) (*QueryAllPendingTssEventsResponse, error) // List all TSS events (paginated) AllTssEvents(ctx context.Context, in *QueryAllTssEventsRequest, opts ...grpc.CallOption) (*QueryAllTssEventsResponse, error) + // Get a fund migration by ID + GetFundMigration(ctx context.Context, in *QueryGetFundMigrationRequest, opts ...grpc.CallOption) (*QueryGetFundMigrationResponse, error) + // List pending fund migrations + PendingFundMigrations(ctx context.Context, in *QueryPendingFundMigrationsRequest, opts ...grpc.CallOption) (*QueryPendingFundMigrationsResponse, error) + // List all fund migrations (paginated) + AllFundMigrations(ctx context.Context, in *QueryAllFundMigrationsRequest, opts ...grpc.CallOption) (*QueryAllFundMigrationsResponse, error) } type queryClient struct { @@ -167,6 +176,33 @@ func (c *queryClient) AllTssEvents(ctx context.Context, in *QueryAllTssEventsReq return out, nil } +func (c *queryClient) GetFundMigration(ctx context.Context, in *QueryGetFundMigrationRequest, opts ...grpc.CallOption) (*QueryGetFundMigrationResponse, error) { + out := new(QueryGetFundMigrationResponse) + err := c.cc.Invoke(ctx, Query_GetFundMigration_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PendingFundMigrations(ctx context.Context, in *QueryPendingFundMigrationsRequest, opts ...grpc.CallOption) (*QueryPendingFundMigrationsResponse, error) { + out := new(QueryPendingFundMigrationsResponse) + err := c.cc.Invoke(ctx, Query_PendingFundMigrations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllFundMigrations(ctx context.Context, in *QueryAllFundMigrationsRequest, opts ...grpc.CallOption) (*QueryAllFundMigrationsResponse, error) { + out := new(QueryAllFundMigrationsResponse) + err := c.cc.Invoke(ctx, Query_AllFundMigrations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -193,6 +229,12 @@ type QueryServer interface { AllPendingTssEvents(context.Context, *QueryAllPendingTssEventsRequest) (*QueryAllPendingTssEventsResponse, error) // List all TSS events (paginated) AllTssEvents(context.Context, *QueryAllTssEventsRequest) (*QueryAllTssEventsResponse, error) + // Get a fund migration by ID + GetFundMigration(context.Context, *QueryGetFundMigrationRequest) (*QueryGetFundMigrationResponse, error) + // List pending fund migrations + PendingFundMigrations(context.Context, *QueryPendingFundMigrationsRequest) (*QueryPendingFundMigrationsResponse, error) + // List all fund migrations (paginated) + AllFundMigrations(context.Context, *QueryAllFundMigrationsRequest) (*QueryAllFundMigrationsResponse, error) mustEmbedUnimplementedQueryServer() } @@ -233,6 +275,15 @@ func (UnimplementedQueryServer) AllPendingTssEvents(context.Context, *QueryAllPe func (UnimplementedQueryServer) AllTssEvents(context.Context, *QueryAllTssEventsRequest) (*QueryAllTssEventsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllTssEvents not implemented") } +func (UnimplementedQueryServer) GetFundMigration(context.Context, *QueryGetFundMigrationRequest) (*QueryGetFundMigrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFundMigration not implemented") +} +func (UnimplementedQueryServer) PendingFundMigrations(context.Context, *QueryPendingFundMigrationsRequest) (*QueryPendingFundMigrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PendingFundMigrations not implemented") +} +func (UnimplementedQueryServer) AllFundMigrations(context.Context, *QueryAllFundMigrationsRequest) (*QueryAllFundMigrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllFundMigrations not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -444,6 +495,60 @@ func _Query_AllTssEvents_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Query_GetFundMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetFundMigrationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetFundMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetFundMigration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetFundMigration(ctx, req.(*QueryGetFundMigrationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PendingFundMigrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPendingFundMigrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PendingFundMigrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_PendingFundMigrations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PendingFundMigrations(ctx, req.(*QueryPendingFundMigrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllFundMigrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllFundMigrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllFundMigrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllFundMigrations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllFundMigrations(ctx, req.(*QueryAllFundMigrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -495,6 +600,18 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "AllTssEvents", Handler: _Query_AllTssEvents_Handler, }, + { + MethodName: "GetFundMigration", + Handler: _Query_GetFundMigration_Handler, + }, + { + MethodName: "PendingFundMigrations", + Handler: _Query_PendingFundMigrations_Handler, + }, + { + MethodName: "AllFundMigrations", + Handler: _Query_AllFundMigrations_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/query.proto", diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go index 451c3d42..e063337e 100644 --- a/api/utss/v1/tx.pulsar.go +++ b/api/utss/v1/tx.pulsar.go @@ -2647,6 +2647,1900 @@ func (x *fastReflection_MsgVoteTssKeyProcessResponse) ProtoMethods() *protoiface } } +var ( + md_MsgInitiateFundMigration protoreflect.MessageDescriptor + fd_MsgInitiateFundMigration_signer protoreflect.FieldDescriptor + fd_MsgInitiateFundMigration_old_key_id protoreflect.FieldDescriptor + fd_MsgInitiateFundMigration_chain protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgInitiateFundMigration = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateFundMigration") + fd_MsgInitiateFundMigration_signer = md_MsgInitiateFundMigration.Fields().ByName("signer") + fd_MsgInitiateFundMigration_old_key_id = md_MsgInitiateFundMigration.Fields().ByName("old_key_id") + fd_MsgInitiateFundMigration_chain = md_MsgInitiateFundMigration.Fields().ByName("chain") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitiateFundMigration)(nil) + +type fastReflection_MsgInitiateFundMigration MsgInitiateFundMigration + +func (x *MsgInitiateFundMigration) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitiateFundMigration)(x) +} + +func (x *MsgInitiateFundMigration) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_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_MsgInitiateFundMigration_messageType fastReflection_MsgInitiateFundMigration_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitiateFundMigration_messageType{} + +type fastReflection_MsgInitiateFundMigration_messageType struct{} + +func (x fastReflection_MsgInitiateFundMigration_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitiateFundMigration)(nil) +} +func (x fastReflection_MsgInitiateFundMigration_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitiateFundMigration) +} +func (x fastReflection_MsgInitiateFundMigration_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateFundMigration +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitiateFundMigration) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateFundMigration +} + +// 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_MsgInitiateFundMigration) Type() protoreflect.MessageType { + return _fastReflection_MsgInitiateFundMigration_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitiateFundMigration) New() protoreflect.Message { + return new(fastReflection_MsgInitiateFundMigration) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitiateFundMigration) Interface() protoreflect.ProtoMessage { + return (*MsgInitiateFundMigration)(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_MsgInitiateFundMigration) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgInitiateFundMigration_signer, value) { + return + } + } + if x.OldKeyId != "" { + value := protoreflect.ValueOfString(x.OldKeyId) + if !f(fd_MsgInitiateFundMigration_old_key_id, value) { + return + } + } + if x.Chain != "" { + value := protoreflect.ValueOfString(x.Chain) + if !f(fd_MsgInitiateFundMigration_chain, 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_MsgInitiateFundMigration) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigration.signer": + return x.Signer != "" + case "utss.v1.MsgInitiateFundMigration.old_key_id": + return x.OldKeyId != "" + case "utss.v1.MsgInitiateFundMigration.chain": + return x.Chain != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigration 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_MsgInitiateFundMigration) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigration.signer": + x.Signer = "" + case "utss.v1.MsgInitiateFundMigration.old_key_id": + x.OldKeyId = "" + case "utss.v1.MsgInitiateFundMigration.chain": + x.Chain = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigration 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_MsgInitiateFundMigration) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgInitiateFundMigration.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgInitiateFundMigration.old_key_id": + value := x.OldKeyId + return protoreflect.ValueOfString(value) + case "utss.v1.MsgInitiateFundMigration.chain": + value := x.Chain + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigration 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_MsgInitiateFundMigration) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigration.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgInitiateFundMigration.old_key_id": + x.OldKeyId = value.Interface().(string) + case "utss.v1.MsgInitiateFundMigration.chain": + x.Chain = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigration 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_MsgInitiateFundMigration) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigration.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgInitiateFundMigration is not mutable")) + case "utss.v1.MsgInitiateFundMigration.old_key_id": + panic(fmt.Errorf("field old_key_id of message utss.v1.MsgInitiateFundMigration is not mutable")) + case "utss.v1.MsgInitiateFundMigration.chain": + panic(fmt.Errorf("field chain of message utss.v1.MsgInitiateFundMigration is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigration 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_MsgInitiateFundMigration) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigration.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgInitiateFundMigration.old_key_id": + return protoreflect.ValueOfString("") + case "utss.v1.MsgInitiateFundMigration.chain": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigration 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_MsgInitiateFundMigration) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgInitiateFundMigration", 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_MsgInitiateFundMigration) 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_MsgInitiateFundMigration) 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_MsgInitiateFundMigration) 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_MsgInitiateFundMigration) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitiateFundMigration) + 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.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OldKeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Chain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateFundMigration) + 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.Chain) > 0 { + i -= len(x.Chain) + copy(dAtA[i:], x.Chain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chain))) + i-- + dAtA[i] = 0x1a + } + if len(x.OldKeyId) > 0 { + i -= len(x.OldKeyId) + copy(dAtA[i:], x.OldKeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OldKeyId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*MsgInitiateFundMigration) + 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: MsgInitiateFundMigration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateFundMigration: 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 Signer", 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.Signer = 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 OldKeyId", 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.OldKeyId = 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 Chain", 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.Chain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgInitiateFundMigrationResponse protoreflect.MessageDescriptor + fd_MsgInitiateFundMigrationResponse_migration_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgInitiateFundMigrationResponse = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateFundMigrationResponse") + fd_MsgInitiateFundMigrationResponse_migration_id = md_MsgInitiateFundMigrationResponse.Fields().ByName("migration_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitiateFundMigrationResponse)(nil) + +type fastReflection_MsgInitiateFundMigrationResponse MsgInitiateFundMigrationResponse + +func (x *MsgInitiateFundMigrationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitiateFundMigrationResponse)(x) +} + +func (x *MsgInitiateFundMigrationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_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_MsgInitiateFundMigrationResponse_messageType fastReflection_MsgInitiateFundMigrationResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitiateFundMigrationResponse_messageType{} + +type fastReflection_MsgInitiateFundMigrationResponse_messageType struct{} + +func (x fastReflection_MsgInitiateFundMigrationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitiateFundMigrationResponse)(nil) +} +func (x fastReflection_MsgInitiateFundMigrationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitiateFundMigrationResponse) +} +func (x fastReflection_MsgInitiateFundMigrationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateFundMigrationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitiateFundMigrationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateFundMigrationResponse +} + +// 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_MsgInitiateFundMigrationResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitiateFundMigrationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitiateFundMigrationResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitiateFundMigrationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitiateFundMigrationResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitiateFundMigrationResponse)(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_MsgInitiateFundMigrationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MigrationId != uint64(0) { + value := protoreflect.ValueOfUint64(x.MigrationId) + if !f(fd_MsgInitiateFundMigrationResponse_migration_id, 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_MsgInitiateFundMigrationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigrationResponse.migration_id": + return x.MigrationId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigrationResponse 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_MsgInitiateFundMigrationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigrationResponse.migration_id": + x.MigrationId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigrationResponse 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_MsgInitiateFundMigrationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgInitiateFundMigrationResponse.migration_id": + value := x.MigrationId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigrationResponse 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_MsgInitiateFundMigrationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigrationResponse.migration_id": + x.MigrationId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigrationResponse 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_MsgInitiateFundMigrationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigrationResponse.migration_id": + panic(fmt.Errorf("field migration_id of message utss.v1.MsgInitiateFundMigrationResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigrationResponse 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_MsgInitiateFundMigrationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateFundMigrationResponse.migration_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateFundMigrationResponse 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_MsgInitiateFundMigrationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgInitiateFundMigrationResponse", 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_MsgInitiateFundMigrationResponse) 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_MsgInitiateFundMigrationResponse) 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_MsgInitiateFundMigrationResponse) 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_MsgInitiateFundMigrationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitiateFundMigrationResponse) + 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.MigrationId != 0 { + n += 1 + runtime.Sov(uint64(x.MigrationId)) + } + 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().(*MsgInitiateFundMigrationResponse) + 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.MigrationId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MigrationId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgInitiateFundMigrationResponse) + 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: MsgInitiateFundMigrationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateFundMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MigrationId", wireType) + } + x.MigrationId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MigrationId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_MsgVoteFundMigration protoreflect.MessageDescriptor + fd_MsgVoteFundMigration_signer protoreflect.FieldDescriptor + fd_MsgVoteFundMigration_migration_id protoreflect.FieldDescriptor + fd_MsgVoteFundMigration_tx_hash protoreflect.FieldDescriptor + fd_MsgVoteFundMigration_success protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteFundMigration = File_utss_v1_tx_proto.Messages().ByName("MsgVoteFundMigration") + fd_MsgVoteFundMigration_signer = md_MsgVoteFundMigration.Fields().ByName("signer") + fd_MsgVoteFundMigration_migration_id = md_MsgVoteFundMigration.Fields().ByName("migration_id") + fd_MsgVoteFundMigration_tx_hash = md_MsgVoteFundMigration.Fields().ByName("tx_hash") + fd_MsgVoteFundMigration_success = md_MsgVoteFundMigration.Fields().ByName("success") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteFundMigration)(nil) + +type fastReflection_MsgVoteFundMigration MsgVoteFundMigration + +func (x *MsgVoteFundMigration) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteFundMigration)(x) +} + +func (x *MsgVoteFundMigration) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteFundMigration_messageType fastReflection_MsgVoteFundMigration_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteFundMigration_messageType{} + +type fastReflection_MsgVoteFundMigration_messageType struct{} + +func (x fastReflection_MsgVoteFundMigration_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteFundMigration)(nil) +} +func (x fastReflection_MsgVoteFundMigration_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteFundMigration) +} +func (x fastReflection_MsgVoteFundMigration_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteFundMigration +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteFundMigration) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteFundMigration +} + +// 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_MsgVoteFundMigration) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteFundMigration_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteFundMigration) New() protoreflect.Message { + return new(fastReflection_MsgVoteFundMigration) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteFundMigration) Interface() protoreflect.ProtoMessage { + return (*MsgVoteFundMigration)(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_MsgVoteFundMigration) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgVoteFundMigration_signer, value) { + return + } + } + if x.MigrationId != uint64(0) { + value := protoreflect.ValueOfUint64(x.MigrationId) + if !f(fd_MsgVoteFundMigration_migration_id, value) { + return + } + } + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_MsgVoteFundMigration_tx_hash, value) { + return + } + } + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgVoteFundMigration_success, 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_MsgVoteFundMigration) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgVoteFundMigration.signer": + return x.Signer != "" + case "utss.v1.MsgVoteFundMigration.migration_id": + return x.MigrationId != uint64(0) + case "utss.v1.MsgVoteFundMigration.tx_hash": + return x.TxHash != "" + case "utss.v1.MsgVoteFundMigration.success": + return x.Success != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigration 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_MsgVoteFundMigration) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgVoteFundMigration.signer": + x.Signer = "" + case "utss.v1.MsgVoteFundMigration.migration_id": + x.MigrationId = uint64(0) + case "utss.v1.MsgVoteFundMigration.tx_hash": + x.TxHash = "" + case "utss.v1.MsgVoteFundMigration.success": + x.Success = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigration 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_MsgVoteFundMigration) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgVoteFundMigration.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteFundMigration.migration_id": + value := x.MigrationId + return protoreflect.ValueOfUint64(value) + case "utss.v1.MsgVoteFundMigration.tx_hash": + value := x.TxHash + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteFundMigration.success": + value := x.Success + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigration 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_MsgVoteFundMigration) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgVoteFundMigration.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgVoteFundMigration.migration_id": + x.MigrationId = value.Uint() + case "utss.v1.MsgVoteFundMigration.tx_hash": + x.TxHash = value.Interface().(string) + case "utss.v1.MsgVoteFundMigration.success": + x.Success = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigration 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_MsgVoteFundMigration) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteFundMigration.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgVoteFundMigration is not mutable")) + case "utss.v1.MsgVoteFundMigration.migration_id": + panic(fmt.Errorf("field migration_id of message utss.v1.MsgVoteFundMigration is not mutable")) + case "utss.v1.MsgVoteFundMigration.tx_hash": + panic(fmt.Errorf("field tx_hash of message utss.v1.MsgVoteFundMigration is not mutable")) + case "utss.v1.MsgVoteFundMigration.success": + panic(fmt.Errorf("field success of message utss.v1.MsgVoteFundMigration is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigration 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_MsgVoteFundMigration) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteFundMigration.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteFundMigration.migration_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "utss.v1.MsgVoteFundMigration.tx_hash": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteFundMigration.success": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigration")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigration 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_MsgVoteFundMigration) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteFundMigration", 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_MsgVoteFundMigration) 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_MsgVoteFundMigration) 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_MsgVoteFundMigration) 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_MsgVoteFundMigration) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteFundMigration) + 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.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.MigrationId != 0 { + n += 1 + runtime.Sov(uint64(x.MigrationId)) + } + l = len(x.TxHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Success { + n += 2 + } + 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().(*MsgVoteFundMigration) + 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.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(x.TxHash) > 0 { + i -= len(x.TxHash) + copy(dAtA[i:], x.TxHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) + i-- + dAtA[i] = 0x1a + } + if x.MigrationId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MigrationId)) + i-- + dAtA[i] = 0x10 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + 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().(*MsgVoteFundMigration) + 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: MsgVoteFundMigration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteFundMigration: 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 Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MigrationId", wireType) + } + x.MigrationId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MigrationId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", 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.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + 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_MsgVoteFundMigrationResponse protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteFundMigrationResponse = File_utss_v1_tx_proto.Messages().ByName("MsgVoteFundMigrationResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteFundMigrationResponse)(nil) + +type fastReflection_MsgVoteFundMigrationResponse MsgVoteFundMigrationResponse + +func (x *MsgVoteFundMigrationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteFundMigrationResponse)(x) +} + +func (x *MsgVoteFundMigrationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteFundMigrationResponse_messageType fastReflection_MsgVoteFundMigrationResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteFundMigrationResponse_messageType{} + +type fastReflection_MsgVoteFundMigrationResponse_messageType struct{} + +func (x fastReflection_MsgVoteFundMigrationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteFundMigrationResponse)(nil) +} +func (x fastReflection_MsgVoteFundMigrationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteFundMigrationResponse) +} +func (x fastReflection_MsgVoteFundMigrationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteFundMigrationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteFundMigrationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteFundMigrationResponse +} + +// 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_MsgVoteFundMigrationResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteFundMigrationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteFundMigrationResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteFundMigrationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteFundMigrationResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteFundMigrationResponse)(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_MsgVoteFundMigrationResponse) 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_MsgVoteFundMigrationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigrationResponse 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_MsgVoteFundMigrationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigrationResponse 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_MsgVoteFundMigrationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigrationResponse 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_MsgVoteFundMigrationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigrationResponse 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_MsgVoteFundMigrationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigrationResponse 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_MsgVoteFundMigrationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteFundMigrationResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteFundMigrationResponse 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_MsgVoteFundMigrationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteFundMigrationResponse", 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_MsgVoteFundMigrationResponse) 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_MsgVoteFundMigrationResponse) 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_MsgVoteFundMigrationResponse) 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_MsgVoteFundMigrationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteFundMigrationResponse) + 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().(*MsgVoteFundMigrationResponse) + 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().(*MsgVoteFundMigrationResponse) + 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: MsgVoteFundMigrationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteFundMigrationResponse: 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 @@ -2896,6 +4790,180 @@ func (*MsgVoteTssKeyProcessResponse) Descriptor() ([]byte, []int) { return file_utss_v1_tx_proto_rawDescGZIP(), []int{5} } +// MsgInitiateFundMigration initiates fund migration from old vault to current vault for a chain. +// Admin-only. One message per chain. +type MsgInitiateFundMigration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + OldKeyId string `protobuf:"bytes,2,opt,name=old_key_id,json=oldKeyId,proto3" json:"old_key_id,omitempty"` + Chain string `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain,omitempty"` // CAIP-2 chain identifier +} + +func (x *MsgInitiateFundMigration) Reset() { + *x = MsgInitiateFundMigration{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitiateFundMigration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitiateFundMigration) ProtoMessage() {} + +// Deprecated: Use MsgInitiateFundMigration.ProtoReflect.Descriptor instead. +func (*MsgInitiateFundMigration) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgInitiateFundMigration) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgInitiateFundMigration) GetOldKeyId() string { + if x != nil { + return x.OldKeyId + } + return "" +} + +func (x *MsgInitiateFundMigration) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +type MsgInitiateFundMigrationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MigrationId uint64 `protobuf:"varint,1,opt,name=migration_id,json=migrationId,proto3" json:"migration_id,omitempty"` +} + +func (x *MsgInitiateFundMigrationResponse) Reset() { + *x = MsgInitiateFundMigrationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitiateFundMigrationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitiateFundMigrationResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitiateFundMigrationResponse.ProtoReflect.Descriptor instead. +func (*MsgInitiateFundMigrationResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgInitiateFundMigrationResponse) GetMigrationId() uint64 { + if x != nil { + return x.MigrationId + } + return 0 +} + +// MsgVoteFundMigration allows validators to vote on observed fund migration tx on external chain. +type MsgVoteFundMigration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + MigrationId uint64 `protobuf:"varint,2,opt,name=migration_id,json=migrationId,proto3" json:"migration_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *MsgVoteFundMigration) Reset() { + *x = MsgVoteFundMigration{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteFundMigration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteFundMigration) ProtoMessage() {} + +// Deprecated: Use MsgVoteFundMigration.ProtoReflect.Descriptor instead. +func (*MsgVoteFundMigration) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgVoteFundMigration) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgVoteFundMigration) GetMigrationId() uint64 { + if x != nil { + return x.MigrationId + } + return 0 +} + +func (x *MsgVoteFundMigration) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *MsgVoteFundMigration) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type MsgVoteFundMigrationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgVoteFundMigrationResponse) Reset() { + *x = MsgVoteFundMigrationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteFundMigrationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteFundMigrationResponse) ProtoMessage() {} + +// Deprecated: Use MsgVoteFundMigrationResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteFundMigrationResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{9} +} + var File_utss_v1_tx_proto protoreflect.FileDescriptor var file_utss_v1_tx_proto_rawDesc = []byte{ @@ -2948,34 +5016,76 @@ var file_utss_v1_tx_proto_rawDesc = []byte{ 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 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, 0x65, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 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, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, + 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xc9, 0x01, + 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 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, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, + 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x3a, 0x29, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, + 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, + 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdc, 0x03, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x18, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, + 0x73, 0x73, 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, 0x65, 0x0a, + 0x15, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, + 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, - 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, - 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, - 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x46, 0x75, + 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x29, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, + 0x65, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x46, 0x75, + 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x46, 0x75, 0x6e, + 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x46, 0x75, 0x6e, 0x64, + 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, + 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, + 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, + 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2990,7 +5100,7 @@ func file_utss_v1_tx_proto_rawDescGZIP() []byte { return file_utss_v1_tx_proto_rawDescData } -var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_utss_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse @@ -2998,23 +5108,31 @@ var file_utss_v1_tx_proto_goTypes = []interface{}{ (*MsgInitiateTssKeyProcessResponse)(nil), // 3: utss.v1.MsgInitiateTssKeyProcessResponse (*MsgVoteTssKeyProcess)(nil), // 4: utss.v1.MsgVoteTssKeyProcess (*MsgVoteTssKeyProcessResponse)(nil), // 5: utss.v1.MsgVoteTssKeyProcessResponse - (*Params)(nil), // 6: utss.v1.Params - (TssProcessType)(0), // 7: utss.v1.TssProcessType + (*MsgInitiateFundMigration)(nil), // 6: utss.v1.MsgInitiateFundMigration + (*MsgInitiateFundMigrationResponse)(nil), // 7: utss.v1.MsgInitiateFundMigrationResponse + (*MsgVoteFundMigration)(nil), // 8: utss.v1.MsgVoteFundMigration + (*MsgVoteFundMigrationResponse)(nil), // 9: utss.v1.MsgVoteFundMigrationResponse + (*Params)(nil), // 10: utss.v1.Params + (TssProcessType)(0), // 11: utss.v1.TssProcessType } var file_utss_v1_tx_proto_depIdxs = []int32{ - 6, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params - 7, // 1: utss.v1.MsgInitiateTssKeyProcess.process_type:type_name -> utss.v1.TssProcessType - 0, // 2: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams - 2, // 3: utss.v1.Msg.InitiateTssKeyProcess:input_type -> utss.v1.MsgInitiateTssKeyProcess - 4, // 4: utss.v1.Msg.VoteTssKeyProcess:input_type -> utss.v1.MsgVoteTssKeyProcess - 1, // 5: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse - 3, // 6: utss.v1.Msg.InitiateTssKeyProcess:output_type -> utss.v1.MsgInitiateTssKeyProcessResponse - 5, // 7: utss.v1.Msg.VoteTssKeyProcess:output_type -> utss.v1.MsgVoteTssKeyProcessResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] 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 + 10, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params + 11, // 1: utss.v1.MsgInitiateTssKeyProcess.process_type:type_name -> utss.v1.TssProcessType + 0, // 2: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams + 2, // 3: utss.v1.Msg.InitiateTssKeyProcess:input_type -> utss.v1.MsgInitiateTssKeyProcess + 4, // 4: utss.v1.Msg.VoteTssKeyProcess:input_type -> utss.v1.MsgVoteTssKeyProcess + 6, // 5: utss.v1.Msg.InitiateFundMigration:input_type -> utss.v1.MsgInitiateFundMigration + 8, // 6: utss.v1.Msg.VoteFundMigration:input_type -> utss.v1.MsgVoteFundMigration + 1, // 7: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse + 3, // 8: utss.v1.Msg.InitiateTssKeyProcess:output_type -> utss.v1.MsgInitiateTssKeyProcessResponse + 5, // 9: utss.v1.Msg.VoteTssKeyProcess:output_type -> utss.v1.MsgVoteTssKeyProcessResponse + 7, // 10: utss.v1.Msg.InitiateFundMigration:output_type -> utss.v1.MsgInitiateFundMigrationResponse + 9, // 11: utss.v1.Msg.VoteFundMigration:output_type -> utss.v1.MsgVoteFundMigrationResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_utss_v1_tx_proto_init() } @@ -3097,6 +5215,54 @@ func file_utss_v1_tx_proto_init() { return nil } } + file_utss_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitiateFundMigration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitiateFundMigrationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteFundMigration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteFundMigrationResponse); 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{ @@ -3104,7 +5270,7 @@ func file_utss_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/utss/v1/tx_grpc.pb.go b/api/utss/v1/tx_grpc.pb.go index eb692345..43c053fd 100644 --- a/api/utss/v1/tx_grpc.pb.go +++ b/api/utss/v1/tx_grpc.pb.go @@ -22,6 +22,8 @@ const ( Msg_UpdateParams_FullMethodName = "/utss.v1.Msg/UpdateParams" Msg_InitiateTssKeyProcess_FullMethodName = "/utss.v1.Msg/InitiateTssKeyProcess" Msg_VoteTssKeyProcess_FullMethodName = "/utss.v1.Msg/VoteTssKeyProcess" + Msg_InitiateFundMigration_FullMethodName = "/utss.v1.Msg/InitiateFundMigration" + Msg_VoteFundMigration_FullMethodName = "/utss.v1.Msg/VoteFundMigration" ) // MsgClient is the client API for Msg service. @@ -36,6 +38,10 @@ type MsgClient interface { InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) // VoteTssKeyProcess defines a operation for voting on an existing tss key process VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) + // InitiateFundMigration initiates fund migration from an old TSS key vault to the current one + InitiateFundMigration(ctx context.Context, in *MsgInitiateFundMigration, opts ...grpc.CallOption) (*MsgInitiateFundMigrationResponse, error) + // VoteFundMigration allows validators to vote on an observed fund migration tx + VoteFundMigration(ctx context.Context, in *MsgVoteFundMigration, opts ...grpc.CallOption) (*MsgVoteFundMigrationResponse, error) } type msgClient struct { @@ -73,6 +79,24 @@ func (c *msgClient) VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProc return out, nil } +func (c *msgClient) InitiateFundMigration(ctx context.Context, in *MsgInitiateFundMigration, opts ...grpc.CallOption) (*MsgInitiateFundMigrationResponse, error) { + out := new(MsgInitiateFundMigrationResponse) + err := c.cc.Invoke(ctx, Msg_InitiateFundMigration_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) VoteFundMigration(ctx context.Context, in *MsgVoteFundMigration, opts ...grpc.CallOption) (*MsgVoteFundMigrationResponse, error) { + out := new(MsgVoteFundMigrationResponse) + err := c.cc.Invoke(ctx, Msg_VoteFundMigration_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 @@ -85,6 +109,10 @@ type MsgServer interface { InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) // VoteTssKeyProcess defines a operation for voting on an existing tss key process VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) + // InitiateFundMigration initiates fund migration from an old TSS key vault to the current one + InitiateFundMigration(context.Context, *MsgInitiateFundMigration) (*MsgInitiateFundMigrationResponse, error) + // VoteFundMigration allows validators to vote on an observed fund migration tx + VoteFundMigration(context.Context, *MsgVoteFundMigration) (*MsgVoteFundMigrationResponse, error) mustEmbedUnimplementedMsgServer() } @@ -101,6 +129,12 @@ func (UnimplementedMsgServer) InitiateTssKeyProcess(context.Context, *MsgInitiat func (UnimplementedMsgServer) VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteTssKeyProcess not implemented") } +func (UnimplementedMsgServer) InitiateFundMigration(context.Context, *MsgInitiateFundMigration) (*MsgInitiateFundMigrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitiateFundMigration not implemented") +} +func (UnimplementedMsgServer) VoteFundMigration(context.Context, *MsgVoteFundMigration) (*MsgVoteFundMigrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteFundMigration not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -168,6 +202,42 @@ func _Msg_VoteTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_InitiateFundMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitiateFundMigration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitiateFundMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_InitiateFundMigration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitiateFundMigration(ctx, req.(*MsgInitiateFundMigration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_VoteFundMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteFundMigration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteFundMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_VoteFundMigration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteFundMigration(ctx, req.(*MsgVoteFundMigration)) + } + 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) @@ -187,6 +257,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "VoteTssKeyProcess", Handler: _Msg_VoteTssKeyProcess_Handler, }, + { + MethodName: "InitiateFundMigration", + Handler: _Msg_InitiateFundMigration_Handler, + }, + { + MethodName: "VoteFundMigration", + Handler: _Msg_VoteFundMigration_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/tx.proto", diff --git a/api/utss/v1/types.pulsar.go b/api/utss/v1/types.pulsar.go index c2e161e3..aae1b865 100644 --- a/api/utss/v1/types.pulsar.go +++ b/api/utss/v1/types.pulsar.go @@ -2868,6 +2868,1050 @@ func (x *fastReflection_TssEvent) ProtoMethods() *protoiface.Methods { } } +var ( + md_FundMigration protoreflect.MessageDescriptor + fd_FundMigration_id protoreflect.FieldDescriptor + fd_FundMigration_old_key_id protoreflect.FieldDescriptor + fd_FundMigration_old_tss_pubkey protoreflect.FieldDescriptor + fd_FundMigration_current_key_id protoreflect.FieldDescriptor + fd_FundMigration_current_tss_pubkey protoreflect.FieldDescriptor + fd_FundMigration_chain protoreflect.FieldDescriptor + fd_FundMigration_status protoreflect.FieldDescriptor + fd_FundMigration_initiated_block protoreflect.FieldDescriptor + fd_FundMigration_completed_block protoreflect.FieldDescriptor + fd_FundMigration_tx_hash protoreflect.FieldDescriptor + fd_FundMigration_gas_price protoreflect.FieldDescriptor + fd_FundMigration_gas_limit protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_FundMigration = File_utss_v1_types_proto.Messages().ByName("FundMigration") + fd_FundMigration_id = md_FundMigration.Fields().ByName("id") + fd_FundMigration_old_key_id = md_FundMigration.Fields().ByName("old_key_id") + fd_FundMigration_old_tss_pubkey = md_FundMigration.Fields().ByName("old_tss_pubkey") + fd_FundMigration_current_key_id = md_FundMigration.Fields().ByName("current_key_id") + fd_FundMigration_current_tss_pubkey = md_FundMigration.Fields().ByName("current_tss_pubkey") + fd_FundMigration_chain = md_FundMigration.Fields().ByName("chain") + fd_FundMigration_status = md_FundMigration.Fields().ByName("status") + fd_FundMigration_initiated_block = md_FundMigration.Fields().ByName("initiated_block") + fd_FundMigration_completed_block = md_FundMigration.Fields().ByName("completed_block") + fd_FundMigration_tx_hash = md_FundMigration.Fields().ByName("tx_hash") + fd_FundMigration_gas_price = md_FundMigration.Fields().ByName("gas_price") + fd_FundMigration_gas_limit = md_FundMigration.Fields().ByName("gas_limit") +} + +var _ protoreflect.Message = (*fastReflection_FundMigration)(nil) + +type fastReflection_FundMigration FundMigration + +func (x *FundMigration) ProtoReflect() protoreflect.Message { + return (*fastReflection_FundMigration)(x) +} + +func (x *FundMigration) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_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_FundMigration_messageType fastReflection_FundMigration_messageType +var _ protoreflect.MessageType = fastReflection_FundMigration_messageType{} + +type fastReflection_FundMigration_messageType struct{} + +func (x fastReflection_FundMigration_messageType) Zero() protoreflect.Message { + return (*fastReflection_FundMigration)(nil) +} +func (x fastReflection_FundMigration_messageType) New() protoreflect.Message { + return new(fastReflection_FundMigration) +} +func (x fastReflection_FundMigration_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FundMigration +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_FundMigration) Descriptor() protoreflect.MessageDescriptor { + return md_FundMigration +} + +// 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_FundMigration) Type() protoreflect.MessageType { + return _fastReflection_FundMigration_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_FundMigration) New() protoreflect.Message { + return new(fastReflection_FundMigration) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_FundMigration) Interface() protoreflect.ProtoMessage { + return (*FundMigration)(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_FundMigration) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_FundMigration_id, value) { + return + } + } + if x.OldKeyId != "" { + value := protoreflect.ValueOfString(x.OldKeyId) + if !f(fd_FundMigration_old_key_id, value) { + return + } + } + if x.OldTssPubkey != "" { + value := protoreflect.ValueOfString(x.OldTssPubkey) + if !f(fd_FundMigration_old_tss_pubkey, value) { + return + } + } + if x.CurrentKeyId != "" { + value := protoreflect.ValueOfString(x.CurrentKeyId) + if !f(fd_FundMigration_current_key_id, value) { + return + } + } + if x.CurrentTssPubkey != "" { + value := protoreflect.ValueOfString(x.CurrentTssPubkey) + if !f(fd_FundMigration_current_tss_pubkey, value) { + return + } + } + if x.Chain != "" { + value := protoreflect.ValueOfString(x.Chain) + if !f(fd_FundMigration_chain, value) { + return + } + } + if x.Status != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) + if !f(fd_FundMigration_status, value) { + return + } + } + if x.InitiatedBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.InitiatedBlock) + if !f(fd_FundMigration_initiated_block, value) { + return + } + } + if x.CompletedBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.CompletedBlock) + if !f(fd_FundMigration_completed_block, value) { + return + } + } + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_FundMigration_tx_hash, value) { + return + } + } + if x.GasPrice != "" { + value := protoreflect.ValueOfString(x.GasPrice) + if !f(fd_FundMigration_gas_price, value) { + return + } + } + if x.GasLimit != uint64(0) { + value := protoreflect.ValueOfUint64(x.GasLimit) + if !f(fd_FundMigration_gas_limit, 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_FundMigration) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.FundMigration.id": + return x.Id != uint64(0) + case "utss.v1.FundMigration.old_key_id": + return x.OldKeyId != "" + case "utss.v1.FundMigration.old_tss_pubkey": + return x.OldTssPubkey != "" + case "utss.v1.FundMigration.current_key_id": + return x.CurrentKeyId != "" + case "utss.v1.FundMigration.current_tss_pubkey": + return x.CurrentTssPubkey != "" + case "utss.v1.FundMigration.chain": + return x.Chain != "" + case "utss.v1.FundMigration.status": + return x.Status != 0 + case "utss.v1.FundMigration.initiated_block": + return x.InitiatedBlock != int64(0) + case "utss.v1.FundMigration.completed_block": + return x.CompletedBlock != int64(0) + case "utss.v1.FundMigration.tx_hash": + return x.TxHash != "" + case "utss.v1.FundMigration.gas_price": + return x.GasPrice != "" + case "utss.v1.FundMigration.gas_limit": + return x.GasLimit != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigration")) + } + panic(fmt.Errorf("message utss.v1.FundMigration 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_FundMigration) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.FundMigration.id": + x.Id = uint64(0) + case "utss.v1.FundMigration.old_key_id": + x.OldKeyId = "" + case "utss.v1.FundMigration.old_tss_pubkey": + x.OldTssPubkey = "" + case "utss.v1.FundMigration.current_key_id": + x.CurrentKeyId = "" + case "utss.v1.FundMigration.current_tss_pubkey": + x.CurrentTssPubkey = "" + case "utss.v1.FundMigration.chain": + x.Chain = "" + case "utss.v1.FundMigration.status": + x.Status = 0 + case "utss.v1.FundMigration.initiated_block": + x.InitiatedBlock = int64(0) + case "utss.v1.FundMigration.completed_block": + x.CompletedBlock = int64(0) + case "utss.v1.FundMigration.tx_hash": + x.TxHash = "" + case "utss.v1.FundMigration.gas_price": + x.GasPrice = "" + case "utss.v1.FundMigration.gas_limit": + x.GasLimit = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigration")) + } + panic(fmt.Errorf("message utss.v1.FundMigration 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_FundMigration) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.FundMigration.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "utss.v1.FundMigration.old_key_id": + value := x.OldKeyId + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.old_tss_pubkey": + value := x.OldTssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.current_key_id": + value := x.CurrentKeyId + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.current_tss_pubkey": + value := x.CurrentTssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.chain": + value := x.Chain + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.status": + value := x.Status + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "utss.v1.FundMigration.initiated_block": + value := x.InitiatedBlock + return protoreflect.ValueOfInt64(value) + case "utss.v1.FundMigration.completed_block": + value := x.CompletedBlock + return protoreflect.ValueOfInt64(value) + case "utss.v1.FundMigration.tx_hash": + value := x.TxHash + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.gas_price": + value := x.GasPrice + return protoreflect.ValueOfString(value) + case "utss.v1.FundMigration.gas_limit": + value := x.GasLimit + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigration")) + } + panic(fmt.Errorf("message utss.v1.FundMigration 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_FundMigration) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.FundMigration.id": + x.Id = value.Uint() + case "utss.v1.FundMigration.old_key_id": + x.OldKeyId = value.Interface().(string) + case "utss.v1.FundMigration.old_tss_pubkey": + x.OldTssPubkey = value.Interface().(string) + case "utss.v1.FundMigration.current_key_id": + x.CurrentKeyId = value.Interface().(string) + case "utss.v1.FundMigration.current_tss_pubkey": + x.CurrentTssPubkey = value.Interface().(string) + case "utss.v1.FundMigration.chain": + x.Chain = value.Interface().(string) + case "utss.v1.FundMigration.status": + x.Status = (FundMigrationStatus)(value.Enum()) + case "utss.v1.FundMigration.initiated_block": + x.InitiatedBlock = value.Int() + case "utss.v1.FundMigration.completed_block": + x.CompletedBlock = value.Int() + case "utss.v1.FundMigration.tx_hash": + x.TxHash = value.Interface().(string) + case "utss.v1.FundMigration.gas_price": + x.GasPrice = value.Interface().(string) + case "utss.v1.FundMigration.gas_limit": + x.GasLimit = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigration")) + } + panic(fmt.Errorf("message utss.v1.FundMigration 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_FundMigration) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.FundMigration.id": + panic(fmt.Errorf("field id of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.old_key_id": + panic(fmt.Errorf("field old_key_id of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.old_tss_pubkey": + panic(fmt.Errorf("field old_tss_pubkey of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.current_key_id": + panic(fmt.Errorf("field current_key_id of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.current_tss_pubkey": + panic(fmt.Errorf("field current_tss_pubkey of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.chain": + panic(fmt.Errorf("field chain of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.status": + panic(fmt.Errorf("field status of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.initiated_block": + panic(fmt.Errorf("field initiated_block of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.completed_block": + panic(fmt.Errorf("field completed_block of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.tx_hash": + panic(fmt.Errorf("field tx_hash of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.gas_price": + panic(fmt.Errorf("field gas_price of message utss.v1.FundMigration is not mutable")) + case "utss.v1.FundMigration.gas_limit": + panic(fmt.Errorf("field gas_limit of message utss.v1.FundMigration is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigration")) + } + panic(fmt.Errorf("message utss.v1.FundMigration 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_FundMigration) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.FundMigration.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "utss.v1.FundMigration.old_key_id": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.old_tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.current_key_id": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.current_tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.chain": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.status": + return protoreflect.ValueOfEnum(0) + case "utss.v1.FundMigration.initiated_block": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.FundMigration.completed_block": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.FundMigration.tx_hash": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.gas_price": + return protoreflect.ValueOfString("") + case "utss.v1.FundMigration.gas_limit": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.FundMigration")) + } + panic(fmt.Errorf("message utss.v1.FundMigration 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_FundMigration) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.FundMigration", 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_FundMigration) 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_FundMigration) 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_FundMigration) 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_FundMigration) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*FundMigration) + 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.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.OldKeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OldTssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CurrentKeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CurrentTssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Chain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + if x.InitiatedBlock != 0 { + n += 1 + runtime.Sov(uint64(x.InitiatedBlock)) + } + if x.CompletedBlock != 0 { + n += 1 + runtime.Sov(uint64(x.CompletedBlock)) + } + l = len(x.TxHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.GasPrice) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GasLimit != 0 { + n += 1 + runtime.Sov(uint64(x.GasLimit)) + } + 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().(*FundMigration) + 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.GasLimit != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasLimit)) + i-- + dAtA[i] = 0x60 + } + if len(x.GasPrice) > 0 { + i -= len(x.GasPrice) + copy(dAtA[i:], x.GasPrice) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GasPrice))) + i-- + dAtA[i] = 0x5a + } + if len(x.TxHash) > 0 { + i -= len(x.TxHash) + copy(dAtA[i:], x.TxHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) + i-- + dAtA[i] = 0x52 + } + if x.CompletedBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CompletedBlock)) + i-- + dAtA[i] = 0x48 + } + if x.InitiatedBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.InitiatedBlock)) + i-- + dAtA[i] = 0x40 + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x38 + } + if len(x.Chain) > 0 { + i -= len(x.Chain) + copy(dAtA[i:], x.Chain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chain))) + i-- + dAtA[i] = 0x32 + } + if len(x.CurrentTssPubkey) > 0 { + i -= len(x.CurrentTssPubkey) + copy(dAtA[i:], x.CurrentTssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CurrentTssPubkey))) + i-- + dAtA[i] = 0x2a + } + if len(x.CurrentKeyId) > 0 { + i -= len(x.CurrentKeyId) + copy(dAtA[i:], x.CurrentKeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CurrentKeyId))) + i-- + dAtA[i] = 0x22 + } + if len(x.OldTssPubkey) > 0 { + i -= len(x.OldTssPubkey) + copy(dAtA[i:], x.OldTssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OldTssPubkey))) + i-- + dAtA[i] = 0x1a + } + if len(x.OldKeyId) > 0 { + i -= len(x.OldKeyId) + copy(dAtA[i:], x.OldKeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OldKeyId))) + i-- + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + 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().(*FundMigration) + 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: FundMigration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FundMigration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OldKeyId", 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.OldKeyId = 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 OldTssPubkey", 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.OldTssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentKeyId", 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.CurrentKeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentTssPubkey", 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.CurrentTssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chain", 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.Chain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Status |= FundMigrationStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitiatedBlock", wireType) + } + x.InitiatedBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.InitiatedBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CompletedBlock", wireType) + } + x.CompletedBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.CompletedBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", 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.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasPrice", 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.GasPrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + x.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 @@ -3076,6 +4120,56 @@ func (TssEventStatus) EnumDescriptor() ([]byte, []int) { return file_utss_v1_types_proto_rawDescGZIP(), []int{3} } +// Fund Migration +type FundMigrationStatus int32 + +const ( + FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING FundMigrationStatus = 0 + FundMigrationStatus_FUND_MIGRATION_STATUS_COMPLETED FundMigrationStatus = 1 + FundMigrationStatus_FUND_MIGRATION_STATUS_FAILED FundMigrationStatus = 2 +) + +// Enum value maps for FundMigrationStatus. +var ( + FundMigrationStatus_name = map[int32]string{ + 0: "FUND_MIGRATION_STATUS_PENDING", + 1: "FUND_MIGRATION_STATUS_COMPLETED", + 2: "FUND_MIGRATION_STATUS_FAILED", + } + FundMigrationStatus_value = map[string]int32{ + "FUND_MIGRATION_STATUS_PENDING": 0, + "FUND_MIGRATION_STATUS_COMPLETED": 1, + "FUND_MIGRATION_STATUS_FAILED": 2, + } +) + +func (x FundMigrationStatus) Enum() *FundMigrationStatus { + p := new(FundMigrationStatus) + *p = x + return p +} + +func (x FundMigrationStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FundMigrationStatus) Descriptor() protoreflect.EnumDescriptor { + return file_utss_v1_types_proto_enumTypes[4].Descriptor() +} + +func (FundMigrationStatus) Type() protoreflect.EnumType { + return &file_utss_v1_types_proto_enumTypes[4] +} + +func (x FundMigrationStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FundMigrationStatus.Descriptor instead. +func (FundMigrationStatus) EnumDescriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{4} +} + type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3372,6 +4466,129 @@ func (x *TssEvent) GetTssPubkey() string { return "" } +type FundMigration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + OldKeyId string `protobuf:"bytes,2,opt,name=old_key_id,json=oldKeyId,proto3" json:"old_key_id,omitempty"` + OldTssPubkey string `protobuf:"bytes,3,opt,name=old_tss_pubkey,json=oldTssPubkey,proto3" json:"old_tss_pubkey,omitempty"` + CurrentKeyId string `protobuf:"bytes,4,opt,name=current_key_id,json=currentKeyId,proto3" json:"current_key_id,omitempty"` + CurrentTssPubkey string `protobuf:"bytes,5,opt,name=current_tss_pubkey,json=currentTssPubkey,proto3" json:"current_tss_pubkey,omitempty"` + Chain string `protobuf:"bytes,6,opt,name=chain,proto3" json:"chain,omitempty"` // CAIP-2 chain identifier + Status FundMigrationStatus `protobuf:"varint,7,opt,name=status,proto3,enum=utss.v1.FundMigrationStatus" json:"status,omitempty"` + InitiatedBlock int64 `protobuf:"varint,8,opt,name=initiated_block,json=initiatedBlock,proto3" json:"initiated_block,omitempty"` + CompletedBlock int64 `protobuf:"varint,9,opt,name=completed_block,json=completedBlock,proto3" json:"completed_block,omitempty"` + TxHash string `protobuf:"bytes,10,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + GasPrice string `protobuf:"bytes,11,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // gas price from oracle (wei) + GasLimit uint64 `protobuf:"varint,12,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit for native transfer (21000) +} + +func (x *FundMigration) Reset() { + *x = FundMigration{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FundMigration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FundMigration) ProtoMessage() {} + +// Deprecated: Use FundMigration.ProtoReflect.Descriptor instead. +func (*FundMigration) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{4} +} + +func (x *FundMigration) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *FundMigration) GetOldKeyId() string { + if x != nil { + return x.OldKeyId + } + return "" +} + +func (x *FundMigration) GetOldTssPubkey() string { + if x != nil { + return x.OldTssPubkey + } + return "" +} + +func (x *FundMigration) GetCurrentKeyId() string { + if x != nil { + return x.CurrentKeyId + } + return "" +} + +func (x *FundMigration) GetCurrentTssPubkey() string { + if x != nil { + return x.CurrentTssPubkey + } + return "" +} + +func (x *FundMigration) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +func (x *FundMigration) GetStatus() FundMigrationStatus { + if x != nil { + return x.Status + } + return FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING +} + +func (x *FundMigration) GetInitiatedBlock() int64 { + if x != nil { + return x.InitiatedBlock + } + return 0 +} + +func (x *FundMigration) GetCompletedBlock() int64 { + if x != nil { + return x.CompletedBlock + } + return 0 +} + +func (x *FundMigration) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *FundMigration) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *FundMigration) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + var File_utss_v1_types_proto protoreflect.FileDescriptor var file_utss_v1_types_proto_rawDesc = []byte{ @@ -3443,40 +4660,75 @@ var file_utss_v1_types_proto_rawDesc = []byte{ 0x69, 0x67, 0x68, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x2a, 0x6b, 0x0a, 0x13, 0x54, 0x73, - 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, - 0x43, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, - 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, - 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x60, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x53, 0x53, - 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x47, 0x45, 0x4e, 0x10, - 0x00, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, - 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x53, - 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x51, 0x55, 0x4f, 0x52, 0x55, 0x4d, - 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0c, 0x54, 0x73, 0x73, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x53, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x49, - 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, - 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x49, 0x4e, 0x41, - 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x56, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x53, 0x53, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, - 0x17, 0x0a, 0x13, 0x54, 0x53, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4d, - 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x53, 0x53, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x42, - 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, - 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, - 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, - 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xa8, 0x03, 0x0a, 0x0d, 0x46, + 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x0a, + 0x6f, 0x6c, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, + 0x64, 0x5f, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x54, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x73, 0x73, 0x50, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x75, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2a, 0x6b, 0x0a, 0x13, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, + 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, + 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, + 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x02, 0x2a, 0x60, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, + 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x47, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, + 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x46, 0x52, + 0x45, 0x53, 0x48, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, + 0x43, 0x45, 0x53, 0x53, 0x5f, 0x51, 0x55, 0x4f, 0x52, 0x55, 0x4d, 0x5f, 0x43, 0x48, 0x41, 0x4e, + 0x47, 0x45, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0c, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x53, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, + 0x10, 0x01, 0x2a, 0x56, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x53, + 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x53, 0x53, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x7f, 0x0a, 0x13, 0x46, 0x75, + 0x6e, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x55, 0x4e, 0x44, 0x5f, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x55, 0x4e, 0x44, 0x5f, 0x4d, 0x49, 0x47, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x55, 0x4e, + 0x44, 0x5f, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x42, 0x8f, 0x01, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, + 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3491,28 +4743,31 @@ func file_utss_v1_types_proto_rawDescGZIP() []byte { return file_utss_v1_types_proto_rawDescData } -var file_utss_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_utss_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_utss_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_utss_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_utss_v1_types_proto_goTypes = []interface{}{ (TssKeyProcessStatus)(0), // 0: utss.v1.TssKeyProcessStatus (TssProcessType)(0), // 1: utss.v1.TssProcessType (TssEventType)(0), // 2: utss.v1.TssEventType (TssEventStatus)(0), // 3: utss.v1.TssEventStatus - (*Params)(nil), // 4: utss.v1.Params - (*TssKeyProcess)(nil), // 5: utss.v1.TssKeyProcess - (*TssKey)(nil), // 6: utss.v1.TssKey - (*TssEvent)(nil), // 7: utss.v1.TssEvent + (FundMigrationStatus)(0), // 4: utss.v1.FundMigrationStatus + (*Params)(nil), // 5: utss.v1.Params + (*TssKeyProcess)(nil), // 6: utss.v1.TssKeyProcess + (*TssKey)(nil), // 7: utss.v1.TssKey + (*TssEvent)(nil), // 8: utss.v1.TssEvent + (*FundMigration)(nil), // 9: utss.v1.FundMigration } var file_utss_v1_types_proto_depIdxs = []int32{ 0, // 0: utss.v1.TssKeyProcess.status:type_name -> utss.v1.TssKeyProcessStatus 1, // 1: utss.v1.TssKeyProcess.process_type:type_name -> utss.v1.TssProcessType 2, // 2: utss.v1.TssEvent.event_type:type_name -> utss.v1.TssEventType 3, // 3: utss.v1.TssEvent.status:type_name -> utss.v1.TssEventStatus - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 4, // 4: utss.v1.FundMigration.status:type_name -> utss.v1.FundMigrationStatus + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] 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_utss_v1_types_proto_init() } @@ -3569,14 +4824,26 @@ func file_utss_v1_types_proto_init() { return nil } } + file_utss_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FundMigration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_types_proto_rawDesc, - NumEnums: 4, - NumMessages: 4, + NumEnums: 5, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/uvalidator/v1/ballot.pulsar.go b/api/uvalidator/v1/ballot.pulsar.go index e1f3e123..7cff2556 100644 --- a/api/uvalidator/v1/ballot.pulsar.go +++ b/api/uvalidator/v1/ballot.pulsar.go @@ -1049,10 +1049,11 @@ func (BallotStatus) EnumDescriptor() ([]byte, []int) { type BallotObservationType int32 const ( - BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 - BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 - BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 - BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 + BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 + BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 + BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 + BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 + BallotObservationType_BALLOT_OBSERVATION_TYPE_FUND_MIGRATION BallotObservationType = 4 ) // Enum value maps for BallotObservationType. @@ -1062,12 +1063,14 @@ var ( 1: "BALLOT_OBSERVATION_TYPE_INBOUND_TX", 2: "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX", 3: "BALLOT_OBSERVATION_TYPE_TSS_KEY", + 4: "BALLOT_OBSERVATION_TYPE_FUND_MIGRATION", } BallotObservationType_value = map[string]int32{ - "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, - "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, - "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, - "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, + "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, + "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, + "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, + "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, + "BALLOT_OBSERVATION_TYPE_FUND_MIGRATION": 4, } ) @@ -1286,7 +1289,7 @@ var file_uvalidator_v1_ballot_proto_rawDesc = []byte{ 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x1a, 0x04, - 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0xbc, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x4f, + 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0xe8, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, @@ -1297,26 +1300,29 @@ var file_uvalidator_v1_ballot_proto_rawDesc = []byte{ 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x03, 0x1a, 0x04, 0xa8, - 0xa4, 0x1e, 0x01, 0x2a, 0x63, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x59, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, - 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, - 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x10, 0x02, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, - 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, - 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, - 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x59, 0x50, 0x45, 0x5f, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x03, 0x12, 0x2a, 0x0a, + 0x26, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x5f, 0x4d, 0x49, + 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x2a, + 0x63, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x0a, + 0x19, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x59, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, + 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, + 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x1a, 0x04, + 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/app/app.go b/app/app.go index 3ebe9986..94d3153f 100755 --- a/app/app.go +++ b/app/app.go @@ -766,6 +766,8 @@ func NewChainApp( logger, authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.UvalidatorKeeper, + app.UregistryKeeper, + app.UexecutorKeeper, ) app.UvalidatorKeeper.SetHooks( diff --git a/app/upgrades.go b/app/upgrades.go index e5945337..666dcf5a 100755 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -8,6 +8,7 @@ import ( "github.com/pushchain/push-chain-node/app/upgrades" aiauditfixes "github.com/pushchain/push-chain-node/app/upgrades/ai-audit-fixes" aiauditfixes2 "github.com/pushchain/push-chain-node/app/upgrades/ai-audit-fixes-2" + tssmigration "github.com/pushchain/push-chain-node/app/upgrades/tss-migration" ueamigration "github.com/pushchain/push-chain-node/app/upgrades/uea-migration" ceagasandpayload "github.com/pushchain/push-chain-node/app/upgrades/cea-gas-and-payload" ceapayloadverificationfix "github.com/pushchain/push-chain-node/app/upgrades/cea-payload-verification-fix" @@ -57,6 +58,7 @@ var Upgrades = []upgrades.Upgrade{ aiauditfixes.NewUpgrade(), aiauditfixes2.NewUpgrade(), ueamigration.NewUpgrade(), + tssmigration.NewUpgrade(), } // RegisterUpgradeHandlers registers the chain upgrade handlers diff --git a/app/upgrades/tss-migration/upgrade.go b/app/upgrades/tss-migration/upgrade.go new file mode 100644 index 00000000..12dcb22b --- /dev/null +++ b/app/upgrades/tss-migration/upgrade.go @@ -0,0 +1,38 @@ +package tssmigration + +import ( + "context" + + storetypes "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" + + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/pushchain/push-chain-node/app/upgrades" +) + +const UpgradeName = "tss-migration" + +func NewUpgrade() upgrades.Upgrade { + return upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + }, + } +} + +func CreateUpgradeHandler( + mm upgrades.ModuleManager, + configurator module.Configurator, + ak *upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // utss v2 → v3: adds FundMigrations, NextMigrationId, PendingMigrations collections. + // New collections start empty — no data migration needed. + // RunMigrations will automatically detect the version bump and run the registered no-op migration. + return mm.RunMigrations(ctx, configurator, fromVM) + } +} diff --git a/config/testnet-donut/eth_sepolia/chain.json b/config/testnet-donut/eth_sepolia/chain.json index 8640b769..4744bb09 100644 --- a/config/testnet-donut/eth_sepolia/chain.json +++ b/config/testnet-donut/eth_sepolia/chain.json @@ -12,7 +12,7 @@ { "name": "sendFunds", "identifier": "0x65f4dbe1", - "event_identifier": "0x33e6cf63a9ddbaee9d86893573e2616fe7a78fc9b7b23acb7da8b58bd0024041", + "event_identifier": "0xd9074957cd6846aa1b09b2e676dac3b9cdeecabd643cabd3d0a0f41e2acd1c50", "confirmation_type": 1 }, { @@ -24,7 +24,7 @@ { "name": "executeUniversalTx", "identifier": "0x", - "event_identifier": "0xd3e471a338b7623f0ef3738730f9342bd832aacb78c895b4d08c595eaab2dc65", + "event_identifier": "0xb31071202ec8043435b593e33693894ef14a9106ba62dbbe3766932931c2b01d", "confirmation_type": 1 }, { @@ -38,7 +38,7 @@ { "name": "finalizeUniversalTx", "identifier": "0x", - "event_identifier": "0x593e82a42137d3f939a9002c055384d6c5231185731a4706bf59a0919b674327", + "event_identifier": "0xb689a5db58af5de77bfea50b6d5844e1c1aeed8b24edd7996a9f8b18ac133819", "confirmation_type": 1 } ], diff --git a/config/testnet-donut/eth_sepolia/tokens/usdt.json b/config/testnet-donut/eth_sepolia/tokens/usdt.json index 4cb88be7..b7e81198 100644 --- a/config/testnet-donut/eth_sepolia/tokens/usdt.json +++ b/config/testnet-donut/eth_sepolia/tokens/usdt.json @@ -9,6 +9,6 @@ "token_type": 1, "native_representation": { "denom": "", - "contract_address": "0x00cb38A885cf8D0B2dDfd19Bd1c04aAAC44C5a86" + "contract_address": "0xCA0C5E6F002A389E1580F0DB7cd06e4549B5F9d3" } } diff --git a/proto/utss/v1/genesis.proto b/proto/utss/v1/genesis.proto index 6b361d8a..cb895896 100755 --- a/proto/utss/v1/genesis.proto +++ b/proto/utss/v1/genesis.proto @@ -19,6 +19,12 @@ message TssKeyEntry { TssKey value = 2 [(gogoproto.nullable) = false]; } +// FundMigrationEntry is a key-value pair for exporting FundMigrations map state. +message FundMigrationEntry { + uint64 key = 1; + FundMigration value = 2 [(gogoproto.nullable) = false]; +} + // GenesisState defines the module genesis state message GenesisState { // Params defines all the parameters of the module. @@ -44,4 +50,10 @@ message GenesisState { // next_tss_event_id is the next auto-increment ID for TssEvents. uint64 next_tss_event_id = 8; + + // fund_migrations are entries from the FundMigrations store. + repeated FundMigrationEntry fund_migrations = 9 [(gogoproto.nullable) = false]; + + // next_migration_id is the next auto-increment ID for FundMigrations. + uint64 next_migration_id = 10; } diff --git a/proto/utss/v1/query.proto b/proto/utss/v1/query.proto index 1b0cc60a..48c8cee0 100755 --- a/proto/utss/v1/query.proto +++ b/proto/utss/v1/query.proto @@ -66,6 +66,21 @@ service Query { rpc AllTssEvents(QueryAllTssEventsRequest) returns (QueryAllTssEventsResponse) { option (google.api.http).get = "/utss/v1/event"; } + + // Get a fund migration by ID + rpc GetFundMigration(QueryGetFundMigrationRequest) returns (QueryGetFundMigrationResponse) { + option (google.api.http).get = "/utss/v1/migration/{id}"; + } + + // List pending fund migrations + rpc PendingFundMigrations(QueryPendingFundMigrationsRequest) returns (QueryPendingFundMigrationsResponse) { + option (google.api.http).get = "/utss/v1/migration/pending"; + } + + // List all fund migrations (paginated) + rpc AllFundMigrations(QueryAllFundMigrationsRequest) returns (QueryAllFundMigrationsResponse) { + option (google.api.http).get = "/utss/v1/migration"; + } } // Messages @@ -144,3 +159,24 @@ message QueryAllTssEventsResponse { repeated TssEvent events = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +// Fund Migration queries +message QueryGetFundMigrationRequest { + uint64 id = 1; +} +message QueryGetFundMigrationResponse { + FundMigration migration = 1; +} + +message QueryPendingFundMigrationsRequest {} +message QueryPendingFundMigrationsResponse { + repeated FundMigration migrations = 1; +} + +message QueryAllFundMigrationsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} +message QueryAllFundMigrationsResponse { + repeated FundMigration migrations = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto index 48857486..735c019d 100755 --- a/proto/utss/v1/tx.proto +++ b/proto/utss/v1/tx.proto @@ -24,6 +24,12 @@ service Msg { // VoteTssKeyProcess defines a operation for voting on an existing tss key process rpc VoteTssKeyProcess(MsgVoteTssKeyProcess) returns (MsgVoteTssKeyProcessResponse); + + // InitiateFundMigration initiates fund migration from an old TSS key vault to the current one + rpc InitiateFundMigration(MsgInitiateFundMigration) returns (MsgInitiateFundMigrationResponse); + + // VoteFundMigration allows validators to vote on an observed fund migration tx + rpc VoteFundMigration(MsgVoteFundMigration) returns (MsgVoteFundMigrationResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -70,4 +76,32 @@ message MsgVoteTssKeyProcess { uint64 process_id = 4; } -message MsgVoteTssKeyProcessResponse {} \ No newline at end of file +message MsgVoteTssKeyProcessResponse {} + +// MsgInitiateFundMigration initiates fund migration from old vault to current vault for a chain. +// Admin-only. One message per chain. +message MsgInitiateFundMigration { + option (amino.name) = "utss/MsgInitiateFundMigration"; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string old_key_id = 2; + string chain = 3; // CAIP-2 chain identifier +} + +message MsgInitiateFundMigrationResponse { + uint64 migration_id = 1; +} + +// MsgVoteFundMigration allows validators to vote on observed fund migration tx on external chain. +message MsgVoteFundMigration { + option (amino.name) = "utss/MsgVoteFundMigration"; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 migration_id = 2; + string tx_hash = 3; + bool success = 4; +} + +message MsgVoteFundMigrationResponse {} \ No newline at end of file diff --git a/proto/utss/v1/types.proto b/proto/utss/v1/types.proto index 7cc2af52..beb9ea08 100644 --- a/proto/utss/v1/types.proto +++ b/proto/utss/v1/types.proto @@ -83,3 +83,25 @@ message TssEvent { string key_id = 9; string tss_pubkey = 10; } + +// Fund Migration +enum FundMigrationStatus { + FUND_MIGRATION_STATUS_PENDING = 0; + FUND_MIGRATION_STATUS_COMPLETED = 1; + FUND_MIGRATION_STATUS_FAILED = 2; +} + +message FundMigration { + uint64 id = 1; + string old_key_id = 2; + string old_tss_pubkey = 3; + string current_key_id = 4; + string current_tss_pubkey = 5; + string chain = 6; // CAIP-2 chain identifier + FundMigrationStatus status = 7; + int64 initiated_block = 8; + int64 completed_block = 9; + string tx_hash = 10; + string gas_price = 11; // gas price from oracle (wei) + uint64 gas_limit = 12; // gas limit for native transfer (21000) +} diff --git a/proto/uvalidator/v1/ballot.proto b/proto/uvalidator/v1/ballot.proto index 02bcad3a..d1353e9e 100644 --- a/proto/uvalidator/v1/ballot.proto +++ b/proto/uvalidator/v1/ballot.proto @@ -29,6 +29,7 @@ enum BallotObservationType { BALLOT_OBSERVATION_TYPE_INBOUND_TX = 1; BALLOT_OBSERVATION_TYPE_OUTBOUND_TX = 2; BALLOT_OBSERVATION_TYPE_TSS_KEY = 3; + BALLOT_OBSERVATION_TYPE_FUND_MIGRATION = 4; } // --------------------------- diff --git a/test/integration/utss/fund_migration_test.go b/test/integration/utss/fund_migration_test.go new file mode 100644 index 00000000..c26f53bb --- /dev/null +++ b/test/integration/utss/fund_migration_test.go @@ -0,0 +1,348 @@ +package integrationtest + +import ( + "fmt" + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + + uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +const testChain = "eip155:11155111" + +// setupFundMigrationTest initializes app with validators, a finalized keygen key, and a chain config. +// Returns app, ctx, validator addresses, and the finalized key ID. +func setupFundMigrationTest(t *testing.T, numVals int, outboundEnabled bool) (*app.ChainApp, sdk.Context, []string, string) { + t.Helper() + + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + // Register universal validators + universalVals := make([]string, len(validators)) + for i, val := range validators { + coreValAddr := val.OperatorAddress + pubkey := "pubkey-tss-" + coreValAddr + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) + require.NoError(t, err) + + finalizeAutoInitiatedTssProcess(t, app, ctx, pubkey, "Key-id-tss-"+strconv.Itoa(i)) + universalVals[i] = coreValAddr + } + + // Now do a keygen to get a proper key + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + keygenKeyId := "keygen-key-1" + keygenPubkey := "keygen-pubkey-1" + + // Vote to finalize the keygen + process, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + require.NoError(t, err) + + for _, val := range universalVals { + valAddr, err := sdk.ValAddressFromBech32(val) + require.NoError(t, err) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, keygenPubkey, keygenKeyId, process.Id) + require.NoError(t, err) + } + + // Verify key is finalized + currentKey, err := app.UtssKeeper.CurrentTssKey.Get(ctx) + require.NoError(t, err) + require.Equal(t, keygenKeyId, currentKey.KeyId) + + // Now do ANOTHER keygen so the first becomes the "old" key + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + newKeyId := "keygen-key-2" + newPubkey := "keygen-pubkey-2" + + process, err = app.UtssKeeper.CurrentTssProcess.Get(ctx) + require.NoError(t, err) + + for _, val := range universalVals { + valAddr, err := sdk.ValAddressFromBech32(val) + require.NoError(t, err) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, newPubkey, newKeyId, process.Id) + require.NoError(t, err) + } + + // Verify new key is current, old key is in history + currentKey, err = app.UtssKeeper.CurrentTssKey.Get(ctx) + require.NoError(t, err) + require.Equal(t, newKeyId, currentKey.KeyId) + + oldKey, err := app.UtssKeeper.TssKeyHistory.Get(ctx, keygenKeyId) + require.NoError(t, err) + require.Equal(t, keygenKeyId, oldKey.KeyId) + + // Set up chain config + chainConfig := uregistrytypes.ChainConfig{ + Chain: testChain, + VmType: uregistrytypes.VmType_EVM, + PublicRpcUrl: "https://sepolia.drpc.org", + GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", + BlockConfirmation: &uregistrytypes.BlockConfirmation{ + FastInbound: 5, + StandardInbound: 12, + }, + GatewayMethods: []*uregistrytypes.GatewayMethods{{ + Name: "addFunds", + Identifier: "", + EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", + ConfirmationType: 5, + }}, + Enabled: &uregistrytypes.ChainEnabled{ + IsInboundEnabled: true, + IsOutboundEnabled: outboundEnabled, + }, + } + + err = app.UregistryKeeper.ChainConfigs.Set(ctx, testChain, chainConfig) + require.NoError(t, err) + + return app, ctx, universalVals, keygenKeyId +} + +func TestInitiateFundMigration(t *testing.T) { + t.Run("Successfully initiates fund migration", func(t *testing.T) { + app, ctx, _, oldKeyId := setupFundMigrationTest(t, 3, false) + + migrationId, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + require.Equal(t, uint64(0), migrationId) + + // Verify migration is stored + migration, err := app.UtssKeeper.FundMigrations.Get(ctx, migrationId) + require.NoError(t, err) + require.Equal(t, utsstypes.FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING, migration.Status) + require.Equal(t, oldKeyId, migration.OldKeyId) + require.Equal(t, testChain, migration.Chain) + require.Equal(t, uint64(21000), migration.GasLimit) + require.NotEmpty(t, migration.GasPrice) + + // Verify pending index + _, err = app.UtssKeeper.PendingMigrations.Get(ctx, migrationId) + require.NoError(t, err) + + // Verify event emitted + events := ctx.EventManager().Events() + var found bool + for _, ev := range events { + if ev.Type == utsstypes.EventTypeFundMigrationInitiated { + found = true + break + } + } + require.True(t, found, "FundMigrationInitiatedEvent should be emitted") + }) + + t.Run("Fails if old key not found", func(t *testing.T) { + app, ctx, _, _ := setupFundMigrationTest(t, 3, false) + + _, err := app.UtssKeeper.InitiateFundMigration(ctx, "nonexistent-key", testChain) + require.ErrorContains(t, err, "not found in TssKeyHistory") + }) + + t.Run("Fails if old key was not from keygen", func(t *testing.T) { + app, ctx, universalVals, _ := setupFundMigrationTest(t, 3, false) + + // Initiate a refresh process and finalize it + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_REFRESH) + require.NoError(t, err) + + refreshKeyId := "refresh-key-1" + refreshPubkey := "refresh-pubkey-1" + + process, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + require.NoError(t, err) + + for _, val := range universalVals { + valAddr, _ := sdk.ValAddressFromBech32(val) + _ = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, refreshPubkey, refreshKeyId, process.Id) + } + + // Try to migrate from the refresh key — should fail + _, err = app.UtssKeeper.InitiateFundMigration(ctx, refreshKeyId, testChain) + require.ErrorContains(t, err, "not keygen") + }) + + t.Run("Fails if old key is the current key", func(t *testing.T) { + app, ctx, _, _ := setupFundMigrationTest(t, 3, false) + + currentKey, err := app.UtssKeeper.CurrentTssKey.Get(ctx) + require.NoError(t, err) + + _, err = app.UtssKeeper.InitiateFundMigration(ctx, currentKey.KeyId, testChain) + require.ErrorContains(t, err, "current active key") + }) + + t.Run("Fails if outbound is still enabled", func(t *testing.T) { + app, ctx, _, oldKeyId := setupFundMigrationTest(t, 3, true) // outbound enabled + + _, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.ErrorContains(t, err, "outbound is still enabled") + }) + + t.Run("Fails if duplicate pending migration exists", func(t *testing.T) { + app, ctx, _, oldKeyId := setupFundMigrationTest(t, 3, false) + + _, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + + // Try again — should fail (same chain already has pending migration) + _, err = app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.ErrorContains(t, err, "pending migration already exists for chain") + }) +} + +func TestVoteFundMigration(t *testing.T) { + t.Run("Full migration flow: initiate → vote → complete", func(t *testing.T) { + app, ctx, universalVals, oldKeyId := setupFundMigrationTest(t, 3, false) + + // Initiate migration + migrationId, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + + txHash := "0xdeadbeef1234567890" + + // Vote with all validators (2/3 quorum needed, so 3 votes for 3 validators) + for i, val := range universalVals { + valAddr, err := sdk.ValAddressFromBech32(val) + require.NoError(t, err) + + err = app.UtssKeeper.VoteFundMigration(ctx, valAddr, migrationId, txHash, true) + require.NoError(t, err) + + // Check if finalized after enough votes + migration, err := app.UtssKeeper.FundMigrations.Get(ctx, migrationId) + require.NoError(t, err) + + if i < len(universalVals)-1 { + // Not yet finalized + require.Equal(t, utsstypes.FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING, migration.Status) + } + } + + // Verify migration is now completed + migration, err := app.UtssKeeper.FundMigrations.Get(ctx, migrationId) + require.NoError(t, err) + require.Equal(t, utsstypes.FundMigrationStatus_FUND_MIGRATION_STATUS_COMPLETED, migration.Status) + require.Equal(t, txHash, migration.TxHash) + + // Verify removed from pending + _, err = app.UtssKeeper.PendingMigrations.Get(ctx, migrationId) + require.Error(t, err) // should not be found + + // Verify completion event + events := ctx.EventManager().Events() + var found bool + for _, ev := range events { + if ev.Type == utsstypes.EventTypeFundMigrationCompleted { + found = true + break + } + } + require.True(t, found, "FundMigrationCompletedEvent should be emitted") + }) + + t.Run("Migration failure flow", func(t *testing.T) { + app, ctx, universalVals, oldKeyId := setupFundMigrationTest(t, 3, false) + + migrationId, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + + txHash := "0xfailedtx" + + // Vote failure with all validators + for _, val := range universalVals { + valAddr, _ := sdk.ValAddressFromBech32(val) + err = app.UtssKeeper.VoteFundMigration(ctx, valAddr, migrationId, txHash, false) + require.NoError(t, err) + } + + migration, err := app.UtssKeeper.FundMigrations.Get(ctx, migrationId) + require.NoError(t, err) + require.Equal(t, utsstypes.FundMigrationStatus_FUND_MIGRATION_STATUS_FAILED, migration.Status) + }) + + t.Run("Fails to vote on non-existent migration", func(t *testing.T) { + app, ctx, universalVals, _ := setupFundMigrationTest(t, 3, false) + + valAddr, _ := sdk.ValAddressFromBech32(universalVals[0]) + err := app.UtssKeeper.VoteFundMigration(ctx, valAddr, 999, "0xtx", true) + require.ErrorContains(t, err, "not found") + }) + + t.Run("Fails to vote on already finalized migration", func(t *testing.T) { + app, ctx, universalVals, oldKeyId := setupFundMigrationTest(t, 3, false) + + migrationId, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + + // Finalize it first + for _, val := range universalVals { + valAddr, _ := sdk.ValAddressFromBech32(val) + _ = app.UtssKeeper.VoteFundMigration(ctx, valAddr, migrationId, "0xtx", true) + } + + // Try to vote again + valAddr, _ := sdk.ValAddressFromBech32(universalVals[0]) + err = app.UtssKeeper.VoteFundMigration(ctx, valAddr, migrationId, "0xtx2", true) + require.ErrorContains(t, err, "already finalized") + }) +} + +func TestFundMigrationQueries(t *testing.T) { + t.Run("GetFundMigration returns correct migration", func(t *testing.T) { + app, ctx, _, oldKeyId := setupFundMigrationTest(t, 3, false) + + migrationId, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + + migration, err := app.UtssKeeper.FundMigrations.Get(ctx, migrationId) + require.NoError(t, err) + require.Equal(t, oldKeyId, migration.OldKeyId) + require.Equal(t, testChain, migration.Chain) + }) + + t.Run("PendingMigrations tracks correctly", func(t *testing.T) { + app, ctx, universalVals, oldKeyId := setupFundMigrationTest(t, 3, false) + + migrationId, err := app.UtssKeeper.InitiateFundMigration(ctx, oldKeyId, testChain) + require.NoError(t, err) + + // Should be in pending + var pendingCount int + _ = app.UtssKeeper.PendingMigrations.Walk(ctx, nil, func(k uint64, v uint64) (bool, error) { + pendingCount++ + return false, nil + }) + require.Equal(t, 1, pendingCount) + + // Finalize it + for _, val := range universalVals { + valAddr, _ := sdk.ValAddressFromBech32(val) + _ = app.UtssKeeper.VoteFundMigration(ctx, valAddr, migrationId, "0xtx", true) + } + + // Should be removed from pending + pendingCount = 0 + _ = app.UtssKeeper.PendingMigrations.Walk(ctx, nil, func(k uint64, v uint64) (bool, error) { + pendingCount++ + return false, nil + }) + require.Equal(t, 0, pendingCount) + }) +} diff --git a/universalClient/README.md b/universalClient/README.md new file mode 100644 index 00000000..bd5a62dc --- /dev/null +++ b/universalClient/README.md @@ -0,0 +1,184 @@ +# Universal Client + +Specialized validator node that powers Push Chain's universal crosschain capabilities. + +- **Reads** external chain state (EVM, Solana) and bridges it onto Push Chain via consensus-driven observation and voting +- **Writes** to external chains by collectively signing outbound transactions using threshold cryptography (DKLS TSS) - no single validator holds full signing authority + +## Architecture + +``` +UniversalClient +|-- api/ HTTP health/query endpoints +|-- chains/ Multi-chain lifecycle (create/update/remove per-chain clients) +| |-- common/ Shared interfaces (ChainClient, TxBuilder) +| |-- evm/ Ethereum-compatible chains +| |-- svm/ Solana +| +-- push/ Push Chain internal events +|-- config/ Configuration loading and validation +|-- core/ Main entry point and lifecycle orchestrator +|-- db/ SQLite persistence (per-chain databases) +|-- logger/ Structured logging (zerolog) +|-- pushcore/ Push Chain gRPC client (queries, broadcast) +|-- pushsigner/ HotKey management, AuthZ-wrapped signing, voting +|-- store/ Data models and event constants ++-- tss/ Threshold Signature Scheme (DKLS protocol over libp2p) + |-- coordinator/ Event routing, nonce assignment, setup messages + |-- sessionmanager/ DKLS protocol sessions + |-- txbroadcaster/ Signed tx broadcast to external chains + |-- txresolver/ On-chain verification and terminal status + |-- expirysweeper/ Expired event cleanup and failure voting + |-- keyshare/ Encrypted keyshare storage + |-- eventstore/ Event state queries + |-- networking/ P2P communication (libp2p) + +-- dkls/ DKLS protocol bindings +``` + +## What It Does + +### Multi-Chain Execution + +Push Chain operates as a **hub-and-spoke model** for crosschain execution. Every crosschain operation flows through Push Chain as the coordination layer, rather than chains talking to each other directly. + +``` + Ethereum ----\ /---- Ethereum + Arbitrum -----\ +-----------+ /---- Arbitrum + Base ---------->---| Push |---<----- Base + BSC ----------/ | Chain | \---- BSC + Solana ------/ +-----------+ \--- Solana + + Inbound Hub Outbound + (external -> Push) (Push -> external) +``` + +Two primitives make this work: + +- **Inbound** - an event observed on an external chain and bridged onto Push Chain. Universal Validators watch gateway contracts, confirm finality, and vote the observation into consensus. Once agreed upon, the inbound is executed on Push Chain (e.g., minting bridged tokens to the recipient). + +- **Outbound** - a transaction that Push Chain needs to execute on an external chain. Created as a result of Push Chain logic (smart contract calls, payload execution). Validators collectively sign and broadcast it to the destination chain using TSS. + +A single inbound can trigger Push Chain logic that produces multiple outbounds to different chains. Each of those outbounds, once executed, can emit events that become new inbounds - enabling composable crosschain workflows that fan out and converge across any connected network. + +#### Inbound Flow + +``` +External Chain Universal Validators Push Chain + | | | + | Gateway event emitted | | + |---------------------------------->| | + | | Wait for confirmations | + | | (fast: 2, standard: 12) | + | | | + | | Vote observation (2/3+) | + | |------------------------------>| + | | | + | | Execute inbound + | | (mint tokens, + | | run payload) +``` + +1. The EVM/SVM event listener detects a gateway event on the source chain +2. The event confirmer waits for sufficient block confirmations to ensure finality +3. The event processor votes the observation onto Push Chain via `VoteInbound` +4. Once 2/3+ validators agree, Push Chain executes the inbound (deposits funds, runs payload) +5. If the execution produces outbound events, those become pending outbounds + +#### Outbound Flow + +``` +Push Chain Universal Validators External Chain + | | | + | Pending outbound created | | + |---------------------------------->| | + | | Coordinator assigns nonce | + | | Selects threshold subset | + | | DKLS signing session | + | | | + | | Broadcast signed tx | + | |------------------------------>| + | | | + | | Monitor for confirmation | + | |<------------------------------| + | | | + | Vote result | | + |<----------------------------------| | +``` + +1. The Push Chain listener picks up the pending outbound +2. A rotating coordinator assigns a nonce, selects a threshold subset of participants, and creates a DKLS signing session +3. Each participant independently verifies the signing request against their own RPC view of the destination chain, then collaborates in the distributed signing protocol +4. Every participating validator broadcasts the identical signed transaction; the first to land wins, the rest are idempotent (same nonce, same signature, same tx hash) +5. The resolver monitors the destination chain for confirmation +6. On success, the event is marked complete. On failure (reverted or not found after retries), validators vote failure on Push Chain, which triggers a refund to the user + +### Chain Meta Oracle + +One of the most powerful aspects of the Universal Client is its ability to bring external chain state onto Push Chain in a trust-minimized way. The Chain Meta Oracle is the first expression of this: a decentralized oracle where every Universal Validator independently reads chain metadata and votes it into consensus. + +Today, each validator periodically fetches: + +- **Gas price** (EVM) or **prioritization fee** (Solana) - so the protocol knows what it costs to transact on each chain +- **Block height** or **slot number** - so Push Chain tracks the latest state of every connected network + +These readings are voted onto Push Chain through the same consensus mechanism used for crosschain transfers. No single validator's view is trusted; the protocol converges on what the majority observed. + +### TSS Key Lifecycle Management + +The TSS key is the collective signing authority behind every outbound transaction on every external chain. No single validator ever holds the full key; each holds an encrypted keyshare, and a threshold (2/3+) must collaborate to produce a valid signature. Keeping this key secure is foundational to the protocol's safety. + +Three operations maintain the key, all admin-initiated on Push Chain. For each, the coordinator creates a DKLS setup message, participants run the distributed protocol, store their encrypted keyshare locally (AES-256-GCM with PBKDF2), and vote the result on Push Chain to finalize. + +#### Keygen + +Produces a completely new key with a new public key and new on-chain addresses. This is done as a periodic security rotation to limit the exposure window of any single key. Even if a keyshare were compromised, rotating the key renders it useless. All participants receive fresh keyshares. + +Since keygen creates a new address, funds on external chains still sit under the old key. The protocol handles this automatically via fund migration, transferring funds from the old address to the new one. + +#### Key Refresh + +Redistributes new keyshares without changing the public key or on-chain addresses. Every validator receives a fresh share, instantly invalidating all previous shares. This provides a lightweight security uplift between full keygen rotations - no fund migration, no downtime. + +#### Quorum Change + +Triggered when a Universal Validator joins or leaves the network. Incoming validators receive a keyshare, and departing validators' shares are discarded. The public key and addresses remain the same, so no fund migration is needed. This ensures the signing set always reflects the current active validator membership. + +## Getting Started + +> **Note:** The Universal Validator set is currently permissioned. Only nodes approved by the Push team are eligible. Permissionless participation is on the roadmap as the network matures. + +**Prerequisites:** + +- Active Push Chain validator node approved as a Universal Validator +- AuthZ grants from the validator (granter) to a hot key (grantee) for all required message types: + ``` + /uexecutor.v1.MsgVoteInbound + /uexecutor.v1.MsgVoteChainMeta + /uexecutor.v1.MsgVoteOutbound + /utss.v1.MsgVoteTssKeyProcess + /utss.v1.MsgVoteFundMigration + ``` +- External chain RPC endpoints (Ethereum, Arbitrum, Base, BSC, Solana) + +```bash +# Build +go build -o puniversald ./cmd/puniversald + +# Initialize config with defaults +puniversald init --home ~/.puniversal + +# Edit ~/.puniversal/config/pushuv_config.json: +# - Replace default RPCs with paid endpoints (QuickNode, Alchemy, etc.) +# - Set strong passwords for keyring and TSS +# - Configure chain-specific settings (gas markup, polling intervals) +# +# For Solana: place a relayer keypair at ~/.puniversal/relayer/solana.json +# (standard Solana keypair format: JSON array of 64 bytes). +# Fund this address with a small amount of SOL - the relayer pays for Solana +# tx fees, but each outbound tx reimburses the gas back, so funding is one-time. + +# Start the universal validator +puniversald start --home ~/.puniversal + +# Run tests +go test ./universalClient/... +``` diff --git a/universalClient/chains/common/event_processor.go b/universalClient/chains/common/event_processor.go index d632f496..8c1ba957 100644 --- a/universalClient/chains/common/event_processor.go +++ b/universalClient/chains/common/event_processor.go @@ -151,6 +151,10 @@ func (ep *EventProcessor) processConfirmedEvents(ctx context.Context) error { // processOutboundEvent processes an outbound event by voting on it func (ep *EventProcessor) processOutboundEvent(ctx context.Context, event *store.Event) error { + ep.logger.Info(). + Str("event_id", event.EventID). + Msg("processing outbound event") + // Parse outbound event data once outboundData, err := ep.parseOutboundEventData(event) if err != nil { @@ -184,10 +188,8 @@ func (ep *EventProcessor) processOutboundEvent(ctx context.Context, event *store ep.logger.Info(). Str("event_id", event.EventID). - Str("tx_id", txID). - Str("utx_id", utxID). Str("vote_tx_hash", voteTxHash). - Msg("voted on outbound event") + Msg("outbound event marked as COMPLETED") return nil } @@ -196,9 +198,6 @@ func (ep *EventProcessor) processOutboundEvent(ctx context.Context, event *store func (ep *EventProcessor) processInboundEvent(ctx context.Context, event *store.Event) error { ep.logger.Info(). Str("event_id", event.EventID). - Uint32("id", uint32(event.ID)). - Uint64("block", event.BlockHeight). - Str("current_status", event.Status). Msg("processing inbound event") // Extract inbound data from event @@ -230,7 +229,7 @@ func (ep *EventProcessor) processInboundEvent(ctx context.Context, event *store. ep.logger.Info(). Str("event_id", event.EventID). Str("vote_tx_hash", voteTxHash). - Msg("inbound event processed and confirmed successfully") + Msg("inbound event marked as COMPLETED") return nil } diff --git a/universalClient/chains/common/types.go b/universalClient/chains/common/types.go index 807f7c56..24b9591e 100644 --- a/universalClient/chains/common/types.go +++ b/universalClient/chains/common/types.go @@ -2,6 +2,7 @@ package common import ( "context" + "math/big" uetypes "github.com/pushchain/push-chain-node/x/uexecutor/types" ) @@ -17,28 +18,37 @@ type ChainClient interface { // IsHealthy checks if the chain client is operational IsHealthy() bool - // GetTxBuilder returns the OutboundTxBuilder for this chain + // GetTxBuilder returns the TxBuilder for this chain // Returns an error if txBuilder is not supported for this chain (e.g., Push chain) - GetTxBuilder() (OutboundTxBuilder, error) + GetTxBuilder() (TxBuilder, error) } -// UnSignedOutboundTxReq contains the request for signing an outbound transaction -type UnSignedOutboundTxReq struct { +// FundMigrationData contains the data needed to build a fund migration transaction. +// Populated by the coordinator from the migration event + derived addresses. +type FundMigrationData struct { + From string // Old TSS address (derived from old pubkey) + To string // New TSS address (derived from current pubkey) + GasPrice *big.Int // Gas price from the migration event + GasLimit uint64 // Gas limit from the migration event +} + +// UnsignedSigningReq contains the request for signing an outbound transaction +type UnsignedSigningReq struct { SigningHash []byte // Hash to be signed by TSS Nonce uint64 // evm - TSS Address nonce | svm - PDA nonce } -// OutboundTxBuilder builds and broadcasts transactions for outbound transfers -type OutboundTxBuilder interface { +// TxBuilder builds and broadcasts transactions for outbound transfers +type TxBuilder interface { // GetOutboundSigningRequest creates a signing request from outbound event data - GetOutboundSigningRequest(ctx context.Context, data *uetypes.OutboundCreatedEvent, nonce uint64) (*UnSignedOutboundTxReq, error) + GetOutboundSigningRequest(ctx context.Context, data *uetypes.OutboundCreatedEvent, nonce uint64) (*UnsignedSigningReq, error) // GetNextNonce returns the next nonce for the given signer on this chain (for seeding local nonce). // useFinalized: for EVM, if true use finalized block nonce (aggressive/replace stuck); if false use pending. SVM ignores this. GetNextNonce(ctx context.Context, signerAddress string, useFinalized bool) (uint64, error) // BroadcastOutboundSigningRequest assembles and broadcasts a signed transaction from the signing request, event data, and signature - BroadcastOutboundSigningRequest(ctx context.Context, req *UnSignedOutboundTxReq, data *uetypes.OutboundCreatedEvent, signature []byte) (string, error) + BroadcastOutboundSigningRequest(ctx context.Context, req *UnsignedSigningReq, data *uetypes.OutboundCreatedEvent, signature []byte) (string, error) // VerifyBroadcastedTx checks the status of a broadcasted transaction on the destination chain. // Returns (found, blockHeight, confirmations, status, error): @@ -60,6 +70,13 @@ type OutboundTxBuilder interface { // SVM: returns "0" (gas accounting is handled via vault gasFee reimbursement). // Returns "0" if the transaction is not found. GetGasFeeUsed(ctx context.Context, txHash string) (string, error) + + // GetFundMigrationSigningRequest builds a native token transfer for fund migration, + // transferring the maximum possible balance (balance minus gas cost). + GetFundMigrationSigningRequest(ctx context.Context, data *FundMigrationData, nonce uint64) (*UnsignedSigningReq, error) + + // BroadcastFundMigrationTx assembles and broadcasts a signed fund migration transaction. + BroadcastFundMigrationTx(ctx context.Context, req *UnsignedSigningReq, data *FundMigrationData, signature []byte) (string, error) } // UniversalTx Payload diff --git a/universalClient/chains/evm/chain_meta_oracle.go b/universalClient/chains/evm/chain_meta_oracle.go index f6917271..534eb9f0 100644 --- a/universalClient/chains/evm/chain_meta_oracle.go +++ b/universalClient/chains/evm/chain_meta_oracle.go @@ -89,7 +89,7 @@ func (g *ChainMetaOracle) fetchAndVoteChainMeta(ctx context.Context) { } // Log the gas price - g.logger.Info(). + g.logger.Debug(). Str("chain", g.chainID). Str("gas_price", gasPrice.String()). Msg("fetched gas price") @@ -107,7 +107,7 @@ func (g *ChainMetaOracle) fetchAndVoteChainMeta(ctx context.Context) { markup.Div(markup, big.NewInt(100)) gasPrice.Add(gasPrice, markup) - g.logger.Info(). + g.logger.Debug(). Str("chain", g.chainID). Int("markup_percent", g.gasPriceMarkupPercent). Str("adjusted_gas_price", gasPrice.String()). diff --git a/universalClient/chains/evm/client.go b/universalClient/chains/evm/client.go index 84a100a9..7b0e7eff 100644 --- a/universalClient/chains/evm/client.go +++ b/universalClient/chains/evm/client.go @@ -178,8 +178,8 @@ func (c *Client) GetConfig() *uregistrytypes.ChainConfig { return c.registryConfig } -// GetTxBuilder returns the OutboundTxBuilder for this chain -func (c *Client) GetTxBuilder() (common.OutboundTxBuilder, error) { +// GetTxBuilder returns the TxBuilder for this chain +func (c *Client) GetTxBuilder() (common.TxBuilder, error) { if c.txBuilder == nil { return nil, fmt.Errorf("txBuilder not available for chain %s (gateway not configured)", c.chainIDStr) } diff --git a/universalClient/chains/evm/event_confirmer.go b/universalClient/chains/evm/event_confirmer.go index 9dbf8a89..719b6f97 100644 --- a/universalClient/chains/evm/event_confirmer.go +++ b/universalClient/chains/evm/event_confirmer.go @@ -204,13 +204,11 @@ func (ec *EventConfirmer) processPendingEvents(ctx context.Context) error { confirmedCount++ ec.logger.Info(). Str("event_id", event.EventID). - Str("tx_hash", txHash). - Uint64("block", receipt.BlockNumber.Uint64()). - Uint64("latest", latestBlock). + Str("event_type", event.Type). Uint64("confirmations", confirmations). - Uint64("required", requiredConfirmations). + Uint64("required_confirmations", requiredConfirmations). Str("confirmation_type", event.ConfirmationType). - Msg("event confirmed and marked as CONFIRMED") + Msg("event marked as CONFIRMED") } } } diff --git a/universalClient/chains/evm/rpc_client.go b/universalClient/chains/evm/rpc_client.go index b7c45d0a..2c486500 100644 --- a/universalClient/chains/evm/rpc_client.go +++ b/universalClient/chains/evm/rpc_client.go @@ -168,6 +168,19 @@ func (rc *RPCClient) GetGasPrice(ctx context.Context) (*big.Int, error) { return gasPrice, err } +// GetBalance fetches the native token balance for an address at the latest block. +func (rc *RPCClient) GetBalance(ctx context.Context, address ethcommon.Address) (*big.Int, error) { + var balance *big.Int + err := rc.executeWithFailover(ctx, "get_balance", func(client *ethclient.Client) error { + callCtx, cancel := context.WithTimeout(ctx, 10*time.Second) + defer cancel() + var innerErr error + balance, innerErr = client.BalanceAt(callCtx, address, nil) + return innerErr + }) + return balance, err +} + // FilterLogs fetches logs matching the filter query func (rc *RPCClient) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) { var logs []types.Log diff --git a/universalClient/chains/evm/tx_builder.go b/universalClient/chains/evm/tx_builder.go index f61cb138..7976f9af 100644 --- a/universalClient/chains/evm/tx_builder.go +++ b/universalClient/chains/evm/tx_builder.go @@ -25,7 +25,7 @@ type RevertInstructions struct { RevertMsg []byte } -// TxBuilder implements OutboundTxBuilder for EVM chains using the Vault contract. +// TxBuilder implements TxBuilder for EVM chains using the Vault contract. type TxBuilder struct { rpcClient *RPCClient chainID string @@ -82,7 +82,7 @@ func (tb *TxBuilder) GetOutboundSigningRequest( ctx context.Context, data *uetypes.OutboundCreatedEvent, nonce uint64, -) (*common.UnSignedOutboundTxReq, error) { +) (*common.UnsignedSigningReq, error) { if data == nil { return nil, fmt.Errorf("outbound event data is nil") } @@ -145,7 +145,7 @@ func (tb *TxBuilder) GetOutboundSigningRequest( signer := types.NewEIP155Signer(big.NewInt(tb.chainIDInt)) txHash := signer.Hash(tx).Bytes() - return &common.UnSignedOutboundTxReq{ + return &common.UnsignedSigningReq{ SigningHash: txHash, Nonce: nonce, }, nil @@ -166,7 +166,7 @@ func (tb *TxBuilder) GetNextNonce(ctx context.Context, signerAddress string, use // BroadcastOutboundSigningRequest assembles and broadcasts a signed transaction func (tb *TxBuilder) BroadcastOutboundSigningRequest( ctx context.Context, - req *common.UnSignedOutboundTxReq, + req *common.UnsignedSigningReq, data *uetypes.OutboundCreatedEvent, signature []byte, ) (string, error) { @@ -469,3 +469,108 @@ func (tb *TxBuilder) GetGasFeeUsed(ctx context.Context, txHash string) (string, gasFeeUsed := new(big.Int).Mul(gasUsed, gasPrice) return gasFeeUsed.String(), nil } + +// GetFundMigrationSigningRequest builds a native token transfer for fund migration, +// transferring the maximum possible balance (balance minus gas cost). +// Fund migration only triggers when outbound is disabled and no pending outbounds remain, +// so the balance at signing time will equal the balance at broadcast time. +func (tb *TxBuilder) GetFundMigrationSigningRequest(ctx context.Context, data *common.FundMigrationData, nonce uint64) (*common.UnsignedSigningReq, error) { + fromAddr := ethcommon.HexToAddress(data.From) + toAddr := ethcommon.HexToAddress(data.To) + + if data.GasPrice == nil || data.GasPrice.Sign() == 0 { + return nil, fmt.Errorf("gas price must be provided for fund migration") + } + + balance, err := tb.rpcClient.GetBalance(ctx, fromAddr) + if err != nil { + return nil, fmt.Errorf("failed to get balance of %s: %w", data.From, err) + } + + gasCost := new(big.Int).Mul(data.GasPrice, new(big.Int).SetUint64(data.GasLimit)) + maxTransfer := new(big.Int).Sub(balance, gasCost) + if maxTransfer.Sign() <= 0 { + return nil, fmt.Errorf("insufficient balance for gas: balance=%s gasCost=%s", balance.String(), gasCost.String()) + } + + tb.logger.Info(). + Str("from", data.From). + Str("to", data.To). + Str("balance", balance.String()). + Str("gas_price", data.GasPrice.String()). + Uint64("gas_limit", data.GasLimit). + Str("transfer_amount", maxTransfer.String()). + Msg("building fund migration tx") + + tx := types.NewTransaction( + nonce, + toAddr, + maxTransfer, + data.GasLimit, + data.GasPrice, + nil, // no calldata for simple transfer + ) + + signer := types.NewEIP155Signer(big.NewInt(tb.chainIDInt)) + txHash := signer.Hash(tx).Bytes() + + return &common.UnsignedSigningReq{ + SigningHash: txHash, + Nonce: nonce, + }, nil +} + +// BroadcastFundMigrationTx assembles and broadcasts a signed fund migration transaction. +func (tb *TxBuilder) BroadcastFundMigrationTx(ctx context.Context, req *common.UnsignedSigningReq, data *common.FundMigrationData, signature []byte) (string, error) { + if len(signature) != 65 { + return "", fmt.Errorf("signature must be 65 bytes [r(32)|s(32)|v(1)], got %d", len(signature)) + } + + if data.GasPrice == nil || data.GasPrice.Sign() == 0 { + return "", fmt.Errorf("gas price must be provided for fund migration") + } + + fromAddr := ethcommon.HexToAddress(data.From) + toAddr := ethcommon.HexToAddress(data.To) + + balance, err := tb.rpcClient.GetBalance(ctx, fromAddr) + if err != nil { + return "", fmt.Errorf("failed to get balance of %s: %w", data.From, err) + } + + gasCost := new(big.Int).Mul(data.GasPrice, new(big.Int).SetUint64(data.GasLimit)) + maxTransfer := new(big.Int).Sub(balance, gasCost) + if maxTransfer.Sign() <= 0 { + return "", fmt.Errorf("insufficient balance for gas during broadcast") + } + + tx := types.NewTransaction( + req.Nonce, + toAddr, + maxTransfer, + data.GasLimit, + data.GasPrice, + nil, + ) + + signer := types.NewEIP155Signer(big.NewInt(tb.chainIDInt)) + signedTx, err := tx.WithSignature(signer, signature) + if err != nil { + return "", fmt.Errorf("failed to apply signature: %w", err) + } + + txHashStr := signedTx.Hash().Hex() + + if _, err := tb.rpcClient.BroadcastTransaction(ctx, signedTx); err != nil { + return txHashStr, fmt.Errorf("failed to broadcast fund migration tx: %w", err) + } + + tb.logger.Info(). + Str("tx_hash", txHashStr). + Str("from", data.From). + Str("to", data.To). + Str("amount", maxTransfer.String()). + Msg("fund migration tx broadcast successfully") + + return txHashStr, nil +} diff --git a/universalClient/chains/push/client.go b/universalClient/chains/push/client.go index cb468a1f..abbaf17e 100644 --- a/universalClient/chains/push/client.go +++ b/universalClient/chains/push/client.go @@ -130,8 +130,8 @@ func (c *Client) IsHealthy() bool { return err == nil } -// GetTxBuilder returns the OutboundTxBuilder for this chain +// GetTxBuilder returns the TxBuilder for this chain // Push chain does not support outbound transactions, so this always returns an error -func (c *Client) GetTxBuilder() (common.OutboundTxBuilder, error) { +func (c *Client) GetTxBuilder() (common.TxBuilder, error) { return nil, fmt.Errorf("txBuilder not supported for Push chain") } diff --git a/universalClient/chains/push/event_listener.go b/universalClient/chains/push/event_listener.go index ce0b4ae5..170981dd 100644 --- a/universalClient/chains/push/event_listener.go +++ b/universalClient/chains/push/event_listener.go @@ -135,15 +135,17 @@ func (el *EventListener) run(ctx context.Context) { } } -// poll fetches TSS events and pending outbounds, stores them, and updates latest block height. +// poll fetches pending TSS, outbound & fund migration events, stores them, and updates latest block height. func (el *EventListener) poll(ctx context.Context) { tssCount := el.pollTssEvents(ctx) outboundCount := el.pollOutboundEvents(ctx) + migrationCount := el.pollFundMigrationEvents(ctx) - if total := tssCount + outboundCount; total > 0 { + if total := tssCount + outboundCount + migrationCount; total > 0 { el.logger.Info(). Int("tss_events", tssCount). Int("outbound_events", outboundCount). + Int("migration_events", migrationCount). Msg("stored new events") } @@ -211,6 +213,29 @@ func (el *EventListener) pollOutboundEvents(ctx context.Context) int { return newCount } +// pollFundMigrationEvents fetches pending fund migrations and inserts them into the DB. +// Returns new event count. +func (el *EventListener) pollFundMigrationEvents(ctx context.Context) int { + migrations, err := el.pushCore.GetPendingFundMigrations(ctx) + if err != nil { + el.logger.Error().Err(err).Msg("failed to fetch pending fund migrations") + return 0 + } + + var newCount int + for _, m := range migrations { + event, err := convertFundMigrationEvent(m) + if err != nil { + el.logger.Warn().Err(err).Uint64("migration_id", m.Id).Msg("failed to convert fund migration event") + continue + } + + newCount += el.storeEvent(event) + } + + return newCount +} + // storeEvent inserts an event into the DB if it doesn't already exist. // Returns 1 if stored, 0 if duplicate or error. func (el *EventListener) storeEvent(event *store.Event) int { diff --git a/universalClient/chains/push/event_parser.go b/universalClient/chains/push/event_parser.go index 94d555da..061fbf7b 100644 --- a/universalClient/chains/push/event_parser.go +++ b/universalClient/chains/push/event_parser.go @@ -1,6 +1,8 @@ package push import ( + "crypto/sha256" + "encoding/hex" "encoding/json" "fmt" @@ -9,9 +11,17 @@ import ( utsstypes "github.com/pushchain/push-chain-node/x/utss/types" ) -// OutboundExpiryOffset is the number of blocks after event detection -// before an outbound event expires (~10 minutes at ~1s block time). -const OutboundExpiryOffset = 600 +// hashEventID generates a unique event ID by hashing eventType + ":" + rawID. +// This prevents collisions between different event types that may share numeric IDs. +func hashEventID(eventType, rawID string) string { + h := sha256.Sum256([]byte(eventType + ":" + rawID)) + return hex.EncodeToString(h[:]) +} + +// DefaultExpiryOffset is the number of blocks after event detection +// before an event expires (~10 minutes at ~1s block time). +// Used for outbound and fund migration events. +const DefaultExpiryOffset = 600 // convertTssEvent converts a gRPC TssEvent to a store.Event. func convertTssEvent(tssEvent *utsstypes.TssEvent) (*store.Event, error) { @@ -44,7 +54,7 @@ func convertTssEvent(tssEvent *utsstypes.TssEvent) (*store.Event, error) { } return &store.Event{ - EventID: fmt.Sprintf("%d", tssEvent.ProcessId), + EventID: hashEventID(protocolType, fmt.Sprintf("%d", tssEvent.ProcessId)), BlockHeight: uint64(tssEvent.BlockHeight), ExpiryBlockHeight: uint64(tssEvent.ExpiryHeight), Type: protocolType, @@ -54,6 +64,39 @@ func convertTssEvent(tssEvent *utsstypes.TssEvent) (*store.Event, error) { }, nil } + +// convertFundMigrationEvent converts a FundMigration to a store.Event. +func convertFundMigrationEvent(migration *utsstypes.FundMigration) (*store.Event, error) { + if migration == nil { + return nil, fmt.Errorf("fund migration is nil") + } + + eventData, err := json.Marshal(utsstypes.FundMigrationInitiatedEventData{ + MigrationID: migration.Id, + OldKeyID: migration.OldKeyId, + OldTssPubkey: migration.OldTssPubkey, + CurrentKeyID: migration.CurrentKeyId, + CurrentTssPubkey: migration.CurrentTssPubkey, + Chain: migration.Chain, + BlockHeight: migration.InitiatedBlock, + }) + if err != nil { + return nil, fmt.Errorf("failed to marshal fund migration event data: %w", err) + } + + blockHeight := uint64(migration.InitiatedBlock) + + return &store.Event{ + EventID: hashEventID(store.EventTypeSignFundMigrate, fmt.Sprintf("%d", migration.Id)), + BlockHeight: blockHeight, + ExpiryBlockHeight: blockHeight + DefaultExpiryOffset, + Type: store.EventTypeSignFundMigrate, + ConfirmationType: store.ConfirmationInstant, + Status: store.StatusConfirmed, + EventData: eventData, + }, nil +} + // convertOutboundToEvent converts a PendingOutboundEntry + OutboundTx to a store.Event. func convertOutboundToEvent(entry *uexecutortypes.PendingOutboundEntry, outbound *uexecutortypes.OutboundTx) (*store.Event, error) { if entry == nil || outbound == nil { @@ -102,8 +145,8 @@ func convertOutboundToEvent(entry *uexecutortypes.PendingOutboundEntry, outbound return &store.Event{ EventID: outbound.Id, BlockHeight: blockHeight, - ExpiryBlockHeight: blockHeight + OutboundExpiryOffset, - Type: store.EventTypeSign, + ExpiryBlockHeight: blockHeight + DefaultExpiryOffset, + Type: store.EventTypeSignOutbound, ConfirmationType: store.ConfirmationInstant, Status: store.StatusConfirmed, EventData: eventData, diff --git a/universalClient/chains/push/event_parser_test.go b/universalClient/chains/push/event_parser_test.go index 9c80efa5..35628d53 100644 --- a/universalClient/chains/push/event_parser_test.go +++ b/universalClient/chains/push/event_parser_test.go @@ -46,7 +46,7 @@ func TestConvertTssEvent(t *testing.T) { require.NoError(t, err) require.NotNil(t, result) - assert.Equal(t, "123", result.EventID) + assert.Equal(t, hashEventID(store.EventTypeKeygen, "123"), result.EventID) assert.Equal(t, store.EventTypeKeygen, result.Type) assert.Equal(t, uint64(500), result.BlockHeight) assert.Equal(t, uint64(1000), result.ExpiryBlockHeight) @@ -70,7 +70,7 @@ func TestConvertTssEvent(t *testing.T) { BlockHeight: 600, }) require.NoError(t, err) - assert.Equal(t, "456", result.EventID) + assert.Equal(t, hashEventID(store.EventTypeKeyrefresh, "456"), result.EventID) assert.Equal(t, store.EventTypeKeyrefresh, result.Type) assert.Equal(t, uint64(600), result.BlockHeight) assert.Nil(t, result.EventData) // no participants @@ -84,7 +84,7 @@ func TestConvertTssEvent(t *testing.T) { BlockHeight: 700, }) require.NoError(t, err) - assert.Equal(t, "789", result.EventID) + assert.Equal(t, hashEventID(store.EventTypeQuorumChange, "789"), result.EventID) assert.Equal(t, store.EventTypeQuorumChange, result.Type) assert.Equal(t, uint64(2000), result.ExpiryBlockHeight) }) @@ -147,9 +147,9 @@ func TestConvertOutboundToEvent(t *testing.T) { // Verify store.Event fields assert.Equal(t, "0x123abc", result.EventID) - assert.Equal(t, store.EventTypeSign, result.Type) + assert.Equal(t, store.EventTypeSignOutbound, result.Type) assert.Equal(t, uint64(1000), result.BlockHeight) - assert.Equal(t, uint64(1000+OutboundExpiryOffset), result.ExpiryBlockHeight) + assert.Equal(t, uint64(1000+DefaultExpiryOffset), result.ExpiryBlockHeight) assert.Equal(t, store.StatusConfirmed, result.Status) assert.Equal(t, store.ConfirmationInstant, result.ConfirmationType) @@ -192,7 +192,7 @@ func TestConvertOutboundToEvent(t *testing.T) { assert.Equal(t, "0xminimal", result.EventID) assert.Equal(t, uint64(500), result.BlockHeight) - assert.Equal(t, uint64(500+OutboundExpiryOffset), result.ExpiryBlockHeight) + assert.Equal(t, uint64(500+DefaultExpiryOffset), result.ExpiryBlockHeight) var data uexecutortypes.OutboundCreatedEvent require.NoError(t, json.Unmarshal(result.EventData, &data)) @@ -247,6 +247,59 @@ func TestConvertOutboundToEvent(t *testing.T) { }) } -func TestOutboundExpiryOffset(t *testing.T) { - assert.Equal(t, uint64(600), uint64(OutboundExpiryOffset)) +func TestDefaultExpiryOffset(t *testing.T) { + assert.Equal(t, uint64(600), uint64(DefaultExpiryOffset)) +} + +func TestConvertFundMigrationEvent(t *testing.T) { + t.Run("nil migration returns error", func(t *testing.T) { + result, err := convertFundMigrationEvent(nil) + require.Error(t, err) + assert.Nil(t, result) + assert.Contains(t, err.Error(), "fund migration is nil") + }) + + t.Run("valid migration converts correctly", func(t *testing.T) { + migration := &utsstypes.FundMigration{ + Id: 1, + OldKeyId: "old-key-001", + OldTssPubkey: "0x02abc123", + CurrentKeyId: "new-key-002", + CurrentTssPubkey: "0x03def456", + Chain: "eip155:421614", + InitiatedBlock: 5000, + } + + result, err := convertFundMigrationEvent(migration) + require.NoError(t, err) + require.NotNil(t, result) + + assert.Equal(t, hashEventID(store.EventTypeSignFundMigrate, "1"), result.EventID) + assert.Equal(t, store.EventTypeSignFundMigrate, result.Type) + assert.Equal(t, store.StatusConfirmed, result.Status) + assert.Equal(t, store.ConfirmationInstant, result.ConfirmationType) + assert.Equal(t, uint64(5000), result.BlockHeight) + assert.Equal(t, uint64(5000+DefaultExpiryOffset), result.ExpiryBlockHeight) + + var data utsstypes.FundMigrationInitiatedEventData + require.NoError(t, json.Unmarshal(result.EventData, &data)) + assert.Equal(t, uint64(1), data.MigrationID) + assert.Equal(t, "old-key-001", data.OldKeyID) + assert.Equal(t, "0x02abc123", data.OldTssPubkey) + assert.Equal(t, "new-key-002", data.CurrentKeyID) + assert.Equal(t, "0x03def456", data.CurrentTssPubkey) + assert.Equal(t, "eip155:421614", data.Chain) + assert.Equal(t, int64(5000), data.BlockHeight) + }) + + t.Run("event ID is hash of type and migration ID", func(t *testing.T) { + migration := &utsstypes.FundMigration{ + Id: 42, + InitiatedBlock: 100, + } + + result, err := convertFundMigrationEvent(migration) + require.NoError(t, err) + assert.Equal(t, hashEventID(store.EventTypeSignFundMigrate, "42"), result.EventID) + }) } diff --git a/universalClient/chains/svm/chain_meta_oracle.go b/universalClient/chains/svm/chain_meta_oracle.go index 5d46cff9..63fcab7b 100644 --- a/universalClient/chains/svm/chain_meta_oracle.go +++ b/universalClient/chains/svm/chain_meta_oracle.go @@ -89,7 +89,7 @@ func (g *ChainMetaOracle) fetchAndVoteChainMeta(ctx context.Context) { } // Log the gas price - g.logger.Info(). + g.logger.Debug(). Str("chain", g.chainID). Str("gas_price", gasPrice.String()). Msg("fetched gas price") @@ -107,7 +107,7 @@ func (g *ChainMetaOracle) fetchAndVoteChainMeta(ctx context.Context) { markup.Div(markup, big.NewInt(100)) gasPrice.Add(gasPrice, markup) - g.logger.Info(). + g.logger.Debug(). Str("chain", g.chainID). Int("markup_percent", g.gasPriceMarkupPercent). Str("adjusted_gas_price", gasPrice.String()). diff --git a/universalClient/chains/svm/client.go b/universalClient/chains/svm/client.go index d9eaec49..84a75ab1 100644 --- a/universalClient/chains/svm/client.go +++ b/universalClient/chains/svm/client.go @@ -187,8 +187,8 @@ func (c *Client) GetConfig() *uregistrytypes.ChainConfig { return c.registryConfig } -// GetTxBuilder returns the OutboundTxBuilder for this chain -func (c *Client) GetTxBuilder() (common.OutboundTxBuilder, error) { +// GetTxBuilder returns the TxBuilder for this chain +func (c *Client) GetTxBuilder() (common.TxBuilder, error) { if c.txBuilder == nil { return nil, fmt.Errorf("txBuilder not available for chain %s (gateway not configured)", c.chainIDStr) } diff --git a/universalClient/chains/svm/event_confirmer.go b/universalClient/chains/svm/event_confirmer.go index 825c4918..192f06ba 100644 --- a/universalClient/chains/svm/event_confirmer.go +++ b/universalClient/chains/svm/event_confirmer.go @@ -184,13 +184,11 @@ func (ec *EventConfirmer) processPendingEvents(ctx context.Context) error { confirmedCount++ ec.logger.Info(). Str("event_id", event.EventID). - Str("tx_signature", txSignatureStr). - Uint64("slot", txSlot). - Uint64("latest", latestSlot). + Str("event_type", event.Type). Uint64("confirmations", confirmations). - Uint64("required", requiredConfirmations). + Uint64("required_confirmations", requiredConfirmations). Str("confirmation_type", event.ConfirmationType). - Msg("event confirmed and marked as CONFIRMED") + Msg("event marked as CONFIRMED") } } } diff --git a/universalClient/chains/svm/tx_builder.go b/universalClient/chains/svm/tx_builder.go index a39e0be1..58d2489e 100644 --- a/universalClient/chains/svm/tx_builder.go +++ b/universalClient/chains/svm/tx_builder.go @@ -91,7 +91,7 @@ type GatewayAccountMeta struct { } // TxBuilder constructs and broadcasts Solana transactions for cross-chain operations. -// It implements the common.OutboundTxBuilder interface shared with the EVM tx builder. +// It implements the common.TxBuilder interface shared with the EVM tx builder. // // The builder needs: // - rpcClient: to talk to a Solana RPC node (fetch account data, send transactions) @@ -195,7 +195,7 @@ func (tb *TxBuilder) GetOutboundSigningRequest( ctx context.Context, data *uetypes.OutboundCreatedEvent, nonce uint64, -) (*common.UnSignedOutboundTxReq, error) { +) (*common.UnsignedSigningReq, error) { if data == nil { return nil, fmt.Errorf("outbound event data is nil") } @@ -409,7 +409,7 @@ func (tb *TxBuilder) GetOutboundSigningRequest( return nil, fmt.Errorf("failed to construct TSS message: %w", err) } - return &common.UnSignedOutboundTxReq{ + return &common.UnsignedSigningReq{ SigningHash: messageHash, // This is the keccak256 hash to be signed by TSS Nonce: nonce, }, nil @@ -479,7 +479,7 @@ func (tb *TxBuilder) GetGasFeeUsed(ctx context.Context, txHash string) (string, // TSS signature and broadcasts it to the Solana network. func (tb *TxBuilder) BroadcastOutboundSigningRequest( ctx context.Context, - req *common.UnSignedOutboundTxReq, + req *common.UnsignedSigningReq, data *uetypes.OutboundCreatedEvent, signature []byte, ) (string, error) { @@ -549,7 +549,7 @@ func (tb *TxBuilder) fetchAddressTables(ctx context.Context, mintPubkey solana.P // the instruction ID for logging. Use this for simulation or inspection. func (tb *TxBuilder) BuildOutboundTransaction( ctx context.Context, - req *common.UnSignedOutboundTxReq, + req *common.UnsignedSigningReq, data *uetypes.OutboundCreatedEvent, signature []byte, ) (*solana.Transaction, uint8, error) { @@ -1780,3 +1780,13 @@ func (tb *TxBuilder) buildCreateATAIdempotentInstruction( // Instruction index 1 = CreateIdempotent return solana.NewInstruction(ataProgramID, accounts, []byte{1}) } + +// GetFundMigrationSigningRequest is not supported for SVM - funds are held by the program, not the TSS key. +func (tb *TxBuilder) GetFundMigrationSigningRequest(ctx context.Context, data *common.FundMigrationData, nonce uint64) (*common.UnsignedSigningReq, error) { + return nil, fmt.Errorf("fund migration not supported for SVM") +} + +// BroadcastFundMigrationTx is not supported for SVM - funds are held by the program, not the TSS key. +func (tb *TxBuilder) BroadcastFundMigrationTx(ctx context.Context, req *common.UnsignedSigningReq, data *common.FundMigrationData, signature []byte) (string, error) { + return "", fmt.Errorf("fund migration not supported for SVM") +} diff --git a/universalClient/pushcore/pushCore.go b/universalClient/pushcore/pushCore.go index 6a6d6293..b53db407 100644 --- a/universalClient/pushcore/pushCore.go +++ b/universalClient/pushcore/pushCore.go @@ -329,6 +329,23 @@ func (c *Client) GetPendingTssEvents(ctx context.Context) ([]*utsstypes.TssEvent ) } +// GetPendingFundMigrations retrieves all pending fund migrations from Push Chain. +func (c *Client) GetPendingFundMigrations(ctx context.Context) ([]*utsstypes.FundMigration, error) { + return retryWithRoundRobin( + len(c.utssClients), + &c.rr, + func(idx int) ([]*utsstypes.FundMigration, error) { + resp, err := c.utssClients[idx].PendingFundMigrations(ctx, &utsstypes.QueryPendingFundMigrationsRequest{}) + if err != nil { + return nil, err + } + return resp.Migrations, nil + }, + "GetPendingFundMigrations", + c.logger, + ) +} + // GetAllPendingOutbounds retrieves up to the first 1000 pending outbound transactions from Push Chain. // Sorted by created_at (block height) ascending — oldest first. func (c *Client) GetAllPendingOutbounds(ctx context.Context) ([]*uexecutortypes.PendingOutboundEntry, []*uexecutortypes.OutboundTx, error) { diff --git a/universalClient/pushcore/pushCore_test.go b/universalClient/pushcore/pushCore_test.go index 2051be55..1e74f49f 100644 --- a/universalClient/pushcore/pushCore_test.go +++ b/universalClient/pushcore/pushCore_test.go @@ -714,6 +714,58 @@ func TestClient_GetPendingTssEvents(t *testing.T) { }) } +func TestClient_GetPendingFundMigrations(t *testing.T) { + logger := zerolog.Nop() + ctx := context.Background() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + utssClients: []utsstypes.QueryClient{}, + } + + migrations, err := client.GetPendingFundMigrations(ctx) + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, migrations) + }) + + t.Run("successful query with mock", func(t *testing.T) { + mockClient := &mockUTSSQueryClient{ + pendingFundMigrationsResp: &utsstypes.QueryPendingFundMigrationsResponse{ + Migrations: []*utsstypes.FundMigration{ + {Id: 1, OldKeyId: "key-old", Chain: "eip155:1"}, + {Id: 2, OldKeyId: "key-old", Chain: "eip155:42161"}, + }, + }, + } + + client := &Client{ + logger: logger, + utssClients: []utsstypes.QueryClient{mockClient}, + } + + migrations, err := client.GetPendingFundMigrations(ctx) + require.NoError(t, err) + require.Len(t, migrations, 2) + assert.Equal(t, uint64(1), migrations[0].Id) + assert.Equal(t, "eip155:42161", migrations[1].Chain) + }) + + t.Run("all endpoints fail", func(t *testing.T) { + client := &Client{ + logger: logger, + utssClients: []utsstypes.QueryClient{ + &mockUTSSQueryClient{err: assert.AnError}, + }, + } + + migrations, err := client.GetPendingFundMigrations(ctx) + require.Error(t, err) + assert.Nil(t, migrations) + }) +} + func TestClient_GetAllPendingOutbounds(t *testing.T) { logger := zerolog.Nop() ctx := context.Background() @@ -845,9 +897,10 @@ func (m *mockUValidatorQueryClient) UniversalValidator(ctx context.Context, req type mockUTSSQueryClient struct { utsstypes.QueryClient - currentKeyResp *utsstypes.QueryCurrentKeyResponse - pendingTssEventsResp *utsstypes.QueryAllPendingTssEventsResponse - err error + currentKeyResp *utsstypes.QueryCurrentKeyResponse + pendingTssEventsResp *utsstypes.QueryAllPendingTssEventsResponse + pendingFundMigrationsResp *utsstypes.QueryPendingFundMigrationsResponse + err error } func (m *mockUTSSQueryClient) CurrentKey(ctx context.Context, req *utsstypes.QueryCurrentKeyRequest, opts ...grpc.CallOption) (*utsstypes.QueryCurrentKeyResponse, error) { @@ -864,6 +917,13 @@ func (m *mockUTSSQueryClient) AllPendingTssEvents(ctx context.Context, req *utss return m.pendingTssEventsResp, nil } +func (m *mockUTSSQueryClient) PendingFundMigrations(ctx context.Context, req *utsstypes.QueryPendingFundMigrationsRequest, opts ...grpc.CallOption) (*utsstypes.QueryPendingFundMigrationsResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.pendingFundMigrationsResp, nil +} + func (m *mockUTSSQueryClient) KeyById(ctx context.Context, req *utsstypes.QueryKeyByIdRequest, opts ...grpc.CallOption) (*utsstypes.QueryKeyByIdResponse, error) { return nil, nil } diff --git a/universalClient/pushsigner/grant_verifier.go b/universalClient/pushsigner/grant_verifier.go index ace5eb60..a4e92b4d 100644 --- a/universalClient/pushsigner/grant_verifier.go +++ b/universalClient/pushsigner/grant_verifier.go @@ -25,6 +25,7 @@ var requiredMsgGrants = []string{ "/uexecutor.v1.MsgVoteChainMeta", "/uexecutor.v1.MsgVoteOutbound", "/utss.v1.MsgVoteTssKeyProcess", + "/utss.v1.MsgVoteFundMigration", } // GrantInfo represents information about a single AuthZ grant. diff --git a/universalClient/pushsigner/grant_verifier_test.go b/universalClient/pushsigner/grant_verifier_test.go index 1ee4a955..0fd9e348 100644 --- a/universalClient/pushsigner/grant_verifier_test.go +++ b/universalClient/pushsigner/grant_verifier_test.go @@ -22,6 +22,7 @@ func TestVerifyGrants(t *testing.T) { {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteChainMeta", Expiration: &futureTime}, {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteOutbound", Expiration: &futureTime}, {Granter: granter, MessageType: "/utss.v1.MsgVoteTssKeyProcess", Expiration: &futureTime}, + {Granter: granter, MessageType: "/utss.v1.MsgVoteFundMigration", Expiration: &futureTime}, } msgs, err := verifyGrants(grants, granter) @@ -40,6 +41,7 @@ func TestVerifyGrants(t *testing.T) { {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteChainMeta", Expiration: nil}, {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteOutbound", Expiration: nil}, {Granter: granter, MessageType: "/utss.v1.MsgVoteTssKeyProcess", Expiration: nil}, + {Granter: granter, MessageType: "/utss.v1.MsgVoteFundMigration", Expiration: nil}, } msgs, err := verifyGrants(grants, granter) @@ -65,6 +67,7 @@ func TestVerifyGrants(t *testing.T) { {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteChainMeta", Expiration: &futureTime}, {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteOutbound", Expiration: &futureTime}, {Granter: granter, MessageType: "/utss.v1.MsgVoteTssKeyProcess", Expiration: &futureTime}, + {Granter: granter, MessageType: "/utss.v1.MsgVoteFundMigration", Expiration: &futureTime}, } msgs, err := verifyGrants(grants, granter) @@ -81,6 +84,7 @@ func TestVerifyGrants(t *testing.T) { {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteChainMeta", Expiration: &futureTime}, {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteOutbound", Expiration: &futureTime}, {Granter: granter, MessageType: "/utss.v1.MsgVoteTssKeyProcess", Expiration: &futureTime}, + {Granter: granter, MessageType: "/utss.v1.MsgVoteFundMigration", Expiration: &futureTime}, } msgs, err := verifyGrants(grants, granter) @@ -105,6 +109,7 @@ func TestVerifyGrants(t *testing.T) { {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteChainMeta", Expiration: &futureTime}, {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteOutbound", Expiration: &futureTime}, {Granter: granter, MessageType: "/utss.v1.MsgVoteTssKeyProcess", Expiration: &futureTime}, + {Granter: granter, MessageType: "/utss.v1.MsgVoteFundMigration", Expiration: &futureTime}, } msgs, err := verifyGrants(grants, granter) @@ -118,6 +123,7 @@ func TestVerifyGrants(t *testing.T) { {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteChainMeta", Expiration: &futureTime}, {Granter: granter, MessageType: "/uexecutor.v1.MsgVoteOutbound", Expiration: &futureTime}, {Granter: granter, MessageType: "/utss.v1.MsgVoteTssKeyProcess", Expiration: &futureTime}, + {Granter: granter, MessageType: "/utss.v1.MsgVoteFundMigration", Expiration: &futureTime}, {Granter: granter, MessageType: "/some.other.v1.MsgNotRequired", Expiration: &futureTime}, // Extra grant } diff --git a/universalClient/pushsigner/pushsigner.go b/universalClient/pushsigner/pushsigner.go index 470b9915..b25410e8 100644 --- a/universalClient/pushsigner/pushsigner.go +++ b/universalClient/pushsigner/pushsigner.go @@ -126,6 +126,11 @@ func (s *Signer) VoteTssKeyProcess(ctx context.Context, tssPubKey string, keyID return voteTssKeyProcess(ctx, s, s.log, s.granter, tssPubKey, keyID, processID) } +// VoteFundMigration votes on a fund migration result. +func (s *Signer) VoteFundMigration(ctx context.Context, migrationID uint64, txHash string, success bool) (string, error) { + return voteFundMigration(ctx, s, s.log, s.granter, migrationID, txHash, success) +} + // signAndBroadcastAuthZTx signs and broadcasts an AuthZ transaction func (s *Signer) signAndBroadcastAuthZTx( ctx context.Context, diff --git a/universalClient/pushsigner/pushsigner_test.go b/universalClient/pushsigner/pushsigner_test.go index 30e5dbd5..331a407e 100644 --- a/universalClient/pushsigner/pushsigner_test.go +++ b/universalClient/pushsigner/pushsigner_test.go @@ -609,6 +609,22 @@ func TestVoteTssKeyProcess(t *testing.T) { assert.Equal(t, "VOTE_OK", txHash) } +func TestVoteFundMigration(t *testing.T) { + signer := createTestSigner(t, successMock(t)) + + txHash, err := signer.VoteFundMigration(context.Background(), 1, "0xabc123", true) + require.NoError(t, err) + assert.Equal(t, "VOTE_OK", txHash) +} + +func TestVoteFundMigrationFailure(t *testing.T) { + signer := createTestSigner(t, successMock(t)) + + txHash, err := signer.VoteFundMigration(context.Background(), 2, "0xdef456", false) + require.NoError(t, err) + assert.Equal(t, "VOTE_OK", txHash) +} + func TestVoteOnChainRejection(t *testing.T) { mock := &mockChainClient{ getAccountFn: func(ctx context.Context, address string) (*authtypes.QueryAccountResponse, error) { diff --git a/universalClient/pushsigner/vote.go b/universalClient/pushsigner/vote.go index d47a84c8..3312f463 100644 --- a/universalClient/pushsigner/vote.go +++ b/universalClient/pushsigner/vote.go @@ -161,6 +161,26 @@ func voteOutbound( return vote(ctx, signer, log, msg, memo) } +// voteFundMigration votes on a fund migration result +func voteFundMigration( + ctx context.Context, + signer *Signer, + log zerolog.Logger, + granter string, + migrationID uint64, + txHash string, + success bool, +) (string, error) { + msg := &utsstypes.MsgVoteFundMigration{ + Signer: granter, + MigrationId: migrationID, + TxHash: txHash, + Success: success, + } + memo := fmt.Sprintf("Vote fund migration: %d", migrationID) + return vote(ctx, signer, log, msg, memo) +} + // voteTssKeyProcess votes on a TSS key process func voteTssKeyProcess( ctx context.Context, diff --git a/universalClient/store/models.go b/universalClient/store/models.go index 61bdc59a..550cc26d 100644 --- a/universalClient/store/models.go +++ b/universalClient/store/models.go @@ -24,7 +24,8 @@ const ( EventTypeKeygen = "KEYGEN" EventTypeKeyrefresh = "KEYREFRESH" EventTypeQuorumChange = "QUORUM_CHANGE" - EventTypeSign = "SIGN" + EventTypeSignOutbound = "SIGN_OUTBOUND" + EventTypeSignFundMigrate = "SIGN_FUND_MIGRATE" EventTypeInbound = "INBOUND" EventTypeOutbound = "OUTBOUND" ) diff --git a/universalClient/tss/coordinator/coordinator.go b/universalClient/tss/coordinator/coordinator.go index ebf85d35..18ada959 100644 --- a/universalClient/tss/coordinator/coordinator.go +++ b/universalClient/tss/coordinator/coordinator.go @@ -5,6 +5,7 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math/big" "sort" "strings" "sync" @@ -23,6 +24,7 @@ import ( "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" "github.com/pushchain/push-chain-node/universalClient/tss/keyshare" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/x/uvalidator/types" ) @@ -231,26 +233,19 @@ func (c *Coordinator) GetCurrentTSSKey(ctx context.Context) (string, string, err return key.KeyId, key.TssPubkey, nil } -// GetTSSAddress returns the TSS ECDSA address derived from the current TSS public key (compressed secp256k1). -func (c *Coordinator) GetTSSAddress(ctx context.Context) (string, error) { - key, err := c.pushCore.GetCurrentKey(ctx) - if err != nil { - return "", fmt.Errorf("failed to get current TSS key: %w", err) - } - if key == nil || key.TssPubkey == "" { - return "", fmt.Errorf("no TSS key found") - } - pubkeyHex := strings.TrimPrefix(strings.TrimSpace(key.TssPubkey), "0x") +// DeriveEVMAddressFromPubkey derives an EVM address from a hex-encoded compressed secp256k1 public key. +func DeriveEVMAddressFromPubkey(pubkeyHex string) (string, error) { + pubkeyHex = strings.TrimPrefix(strings.TrimSpace(pubkeyHex), "0x") pubkeyBytes, err := hex.DecodeString(pubkeyHex) if err != nil { - return "", fmt.Errorf("failed to decode TSS public key: %w", err) + return "", fmt.Errorf("failed to decode public key: %w", err) } if len(pubkeyBytes) != 33 { - return "", fmt.Errorf("invalid TSS public key length: %d bytes (expected 33)", len(pubkeyBytes)) + return "", fmt.Errorf("invalid public key length: %d bytes (expected 33)", len(pubkeyBytes)) } vkX, vkY := secp256k1.DecompressPubkey(pubkeyBytes) if vkX == nil || vkY == nil { - return "", fmt.Errorf("failed to decompress TSS public key") + return "", fmt.Errorf("failed to decompress public key") } xBytes := vkX.FillBytes(make([]byte, 32)) yBytes := vkY.FillBytes(make([]byte, 32)) @@ -258,6 +253,18 @@ func (c *Coordinator) GetTSSAddress(ctx context.Context) (string, error) { return "0x" + hex.EncodeToString(addressBytes), nil } +// GetTSSAddress returns the TSS ECDSA address derived from the current TSS public key (compressed secp256k1). +func (c *Coordinator) GetTSSAddress(ctx context.Context) (string, error) { + key, err := c.pushCore.GetCurrentKey(ctx) + if err != nil { + return "", fmt.Errorf("failed to get current TSS key: %w", err) + } + if key == nil || key.TssPubkey == "" { + return "", fmt.Errorf("no TSS key found") + } + return DeriveEVMAddressFromPubkey(key.TssPubkey) +} + // GetEligibleUV returns ALL eligible validators for the given protocol type (no random selection). // Used by the session manager to check whether a setup-message sender is eligible to participate. // For SIGN coordinator setup the coordinator calls getSignParticipants (random threshold subset). @@ -396,8 +403,13 @@ func (c *Coordinator) processConfirmedEvents(ctx context.Context) error { for _, event := range events { var assignedNonce *uint64 - if event.Type == store.EventTypeSign { - chain := extractDestinationChain(event.EventData) + if event.Type == store.EventTypeSignOutbound || event.Type == store.EventTypeSignFundMigrate { + var chain string + if event.Type == store.EventTypeSignFundMigrate { + chain = extractFundMigrateChain(event.EventData) + } else { + chain = extractDestinationChain(event.EventData) + } if chain == "" { continue } @@ -411,11 +423,21 @@ func (c *Coordinator) processConfirmedEvents(ctx context.Context) error { continue } - nonce, ok := c.assignSignNonce(ctx, event, chain, inFlightPerChain, nonceByChain, skippedChains) - if !ok { - continue + // For FUND_MIGRATE, use old TSS address for nonce lookup + if event.Type == store.EventTypeSignFundMigrate { + nonce, err := c.assignFundMigrateNonce(ctx, event, chain) + if err != nil { + c.logger.Error().Err(err).Str("event_id", event.EventID).Msg("failed to assign fund migration nonce") + continue + } + assignedNonce = &nonce + } else { + nonce, ok := c.assignSignNonce(ctx, event, chain, inFlightPerChain, nonceByChain, skippedChains) + if !ok { + continue + } + assignedNonce = &nonce } - assignedNonce = &nonce } c.logger.Info(). @@ -423,11 +445,11 @@ func (c *Coordinator) processConfirmedEvents(ctx context.Context) error { Str("type", event.Type). Uint64("block_height", event.BlockHeight). Msg("processing event as coordinator") - // For SIGN: pick a random threshold subset (>2/3 of eligible) rather than all eligible. + // For SIGN/FUND_MIGRATE: pick a random threshold subset (>2/3 of eligible) rather than all eligible. // A threshold subset suffices for signing and is more resilient when some nodes are offline. // For all other protocols (keygen, keyrefresh, quorum_change), all eligible must participate. var participants []*types.UniversalValidator - if event.Type == store.EventTypeSign { + if event.Type == store.EventTypeSignOutbound || event.Type == store.EventTypeSignFundMigrate { participants = getSignParticipants(allValidators) } else { participants = getEligibleForProtocol(event.Type, allValidators) @@ -484,7 +506,7 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store // Create setup message based on event type var setupData []byte - var unsignedTxReq *common.UnSignedOutboundTxReq + var unsignedTxReq *common.UnsignedSigningReq var err error switch event.Type { case store.EventTypeKeygen, store.EventTypeKeyrefresh: @@ -492,8 +514,10 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store setupData, err = c.createKeygenSetup(threshold, partyIDs) case store.EventTypeQuorumChange: setupData, err = c.createQcSetup(ctx, threshold, partyIDs, sortedParticipants) - case store.EventTypeSign: + case store.EventTypeSignOutbound: setupData, unsignedTxReq, err = c.createSignSetup(ctx, event.EventData, partyIDs, assignedNonce) + case store.EventTypeSignFundMigrate: + setupData, unsignedTxReq, err = c.createFundMigrationSignSetup(ctx, event.EventData, partyIDs, assignedNonce) default: err = fmt.Errorf("unknown protocol type: %s", event.Type) } @@ -504,11 +528,11 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store // Create and send setup message to all participants setupMsg := Message{ - Type: "setup", - EventID: event.EventID, - Payload: setupData, - Participants: partyIDs, - UnSignedOutboundTxReq: unsignedTxReq, // nil for non-sign events + Type: "setup", + EventID: event.EventID, + Payload: setupData, + Participants: partyIDs, + UnsignedSigningReq: unsignedTxReq, // nil for non-sign events } setupMsgBytes, err := json.Marshal(setupMsg) if err != nil { @@ -653,6 +677,83 @@ func (c *Coordinator) HandleACK(ctx context.Context, senderPeerID string, eventI return nil } +// createFundMigrationSignSetup creates a sign setup message for fund migration. +// Uses the OLD key (not the current key) to sign a transaction moving funds from old TSS to current TSS. +func (c *Coordinator) createFundMigrationSignSetup(ctx context.Context, eventData []byte, partyIDs []string, assignedNonce *uint64) ([]byte, *common.UnsignedSigningReq, error) { + // Parse migration event data + var migrationData utsstypes.FundMigrationInitiatedEventData + if err := json.Unmarshal(eventData, &migrationData); err != nil { + return nil, nil, fmt.Errorf("failed to unmarshal fund migration event data: %w", err) + } + + // Load old keyshare (we sign with the old key to move funds out of old TSS) + keyshareBytes, err := c.keyshareManager.Get(migrationData.OldKeyID) + if err != nil { + return nil, nil, fmt.Errorf("failed to load keyshare for old keyId %s: %w", migrationData.OldKeyID, err) + } + _ = keyshareBytes // Keyshare is loaded for validation, keyID is derived from string + + // Derive key ID bytes from old key ID (SHA256 hash) + keyIDBytes := deriveKeyIDBytes(migrationData.OldKeyID) + + // Derive old and current TSS addresses + oldTSSAddr, err := DeriveEVMAddressFromPubkey(migrationData.OldTssPubkey) + if err != nil { + return nil, nil, fmt.Errorf("failed to derive old TSS address: %w", err) + } + currentTSSAddr, err := DeriveEVMAddressFromPubkey(migrationData.CurrentTssPubkey) + if err != nil { + return nil, nil, fmt.Errorf("failed to derive current TSS address: %w", err) + } + + // Get chain client and tx builder + if c.chains == nil { + return nil, nil, fmt.Errorf("chains manager not configured") + } + client, err := c.chains.GetClient(migrationData.Chain) + if err != nil { + return nil, nil, fmt.Errorf("failed to get client for chain %s: %w", migrationData.Chain, err) + } + builder, err := client.GetTxBuilder() + if err != nil { + return nil, nil, fmt.Errorf("failed to get tx builder for chain %s: %w", migrationData.Chain, err) + } + + // Build fund migration signing request + if assignedNonce == nil { + return nil, nil, fmt.Errorf("assigned nonce is required for fund migration transaction") + } + gasPrice := new(big.Int) + gasPrice.SetString(migrationData.GasPrice, 10) + + migrationFundData := &common.FundMigrationData{ + From: oldTSSAddr, + To: currentTSSAddr, + GasPrice: gasPrice, + GasLimit: migrationData.GasLimit, + } + signingReq, err := builder.GetFundMigrationSigningRequest(ctx, migrationFundData, *assignedNonce) + if err != nil { + return nil, nil, fmt.Errorf("failed to get fund migration signing request: %w", err) + } + + // Encode participant IDs (separated by null bytes) + participantIDs := make([]byte, 0, len(partyIDs)*10) + for i, partyID := range partyIDs { + if i > 0 { + participantIDs = append(participantIDs, 0) // Separator + } + participantIDs = append(participantIDs, []byte(partyID)...) + } + + setupData, err := session.DklsSignSetupMsgNew(keyIDBytes, nil, signingReq.SigningHash, participantIDs) + if err != nil { + return nil, nil, fmt.Errorf("failed to create fund migration sign setup: %w", err) + } + + return setupData, signingReq, nil +} + // createKeygenSetup creates a keygen/keyrefresh setup message. // Both keygen and keyrefresh use the same setup structure (keyID is nil - produces a new random keyId). func (c *Coordinator) createKeygenSetup(threshold int, partyIDs []string) ([]byte, error) { @@ -673,10 +774,10 @@ func (c *Coordinator) createKeygenSetup(threshold int, partyIDs []string) ([]byt } // createSignSetup creates a sign setup message and returns the unsigned transaction request. -// Uses the OutboundTxBuilder to build the actual transaction for the destination chain. +// Uses the TxBuilder to build the actual transaction for the destination chain. // assignedNonce must be set for SIGN (coordinator-assigned nonce); participants use it for verification. // Returns the setup data, unsigned transaction request (for participant verification), and error. -func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, partyIDs []string, assignedNonce *uint64) ([]byte, *common.UnSignedOutboundTxReq, error) { +func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, partyIDs []string, assignedNonce *uint64) ([]byte, *common.UnsignedSigningReq, error) { // Get current TSS keyId from pushCore key, err := c.pushCore.GetCurrentKey(ctx) if err != nil { @@ -720,8 +821,8 @@ func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, par return setupData, signingReq, nil } -// buildSignTransaction builds the outbound transaction using the appropriate OutboundTxBuilder. -func (c *Coordinator) buildSignTransaction(ctx context.Context, eventData []byte, assignedNonce *uint64) (*common.UnSignedOutboundTxReq, error) { +// buildSignTransaction builds the outbound transaction using the appropriate TxBuilder. +func (c *Coordinator) buildSignTransaction(ctx context.Context, eventData []byte, assignedNonce *uint64) (*common.UnsignedSigningReq, error) { if len(eventData) == 0 { return nil, fmt.Errorf("event data is empty") } @@ -848,7 +949,7 @@ func getEligibleForProtocol(protocolType string, allValidators []*types.Universa case store.EventTypeKeyrefresh: // Active + Pending Leave return getSignEligible(allValidators) - case store.EventTypeSign: + case store.EventTypeSignOutbound, store.EventTypeSignFundMigrate: // Active + Pending Leave return getSignEligible(allValidators) default: @@ -1067,3 +1168,46 @@ func extractDestinationChain(eventData []byte) string { } return data.DestinationChain } + +// extractFundMigrateChain extracts the chain field from FundMigrationInitiatedEventData JSON. +func extractFundMigrateChain(eventData []byte) string { + if len(eventData) == 0 { + return "" + } + var data struct { + Chain string `json:"chain"` + } + if err := json.Unmarshal(eventData, &data); err != nil { + return "" + } + return data.Chain +} + +// assignFundMigrateNonce resolves the nonce for a FUND_MIGRATE event using the old TSS address. +// Since the chain ensures at most 1 migration per chain and no pending outbounds, +// we simply fetch the finalized nonce for the old TSS address. +func (c *Coordinator) assignFundMigrateNonce(ctx context.Context, event store.Event, chain string) (uint64, error) { + var migrationData utsstypes.FundMigrationInitiatedEventData + if err := json.Unmarshal(event.EventData, &migrationData); err != nil { + return 0, fmt.Errorf("failed to unmarshal fund migration event data: %w", err) + } + + oldTSSAddr, err := DeriveEVMAddressFromPubkey(migrationData.OldTssPubkey) + if err != nil { + return 0, fmt.Errorf("failed to derive old TSS address: %w", err) + } + + if c.chains == nil { + return 0, fmt.Errorf("chains manager not configured") + } + client, err := c.chains.GetClient(chain) + if err != nil { + return 0, err + } + builder, err := client.GetTxBuilder() + if err != nil { + return 0, err + } + + return builder.GetNextNonce(ctx, oldTSSAddr, true) +} diff --git a/universalClient/tss/coordinator/coordinator_test.go b/universalClient/tss/coordinator/coordinator_test.go index 61b792f2..afe50198 100644 --- a/universalClient/tss/coordinator/coordinator_test.go +++ b/universalClient/tss/coordinator/coordinator_test.go @@ -184,7 +184,7 @@ func TestGetEligibleUV(t *testing.T) { t.Run("sign returns ALL Active+PendingLeave (no random selection here)", func(t *testing.T) { // GetEligibleUV is used for validation, not coordinator setup. // validator1 and validator2 are Active; validator3 is PendingJoin (not eligible for sign). - eligible := coord.GetEligibleUV("SIGN") + eligible := coord.GetEligibleUV("SIGN_OUTBOUND") assert.Len(t, eligible, 2, "sign = active(2); pending_join excluded") addrs := validatorAddresses(eligible) assert.True(t, addrs["validator1"]) @@ -319,6 +319,71 @@ func TestExtractDestinationChain(t *testing.T) { }) } +func TestExtractFundMigrateChain(t *testing.T) { + t.Run("valid JSON with chain field", func(t *testing.T) { + data := []byte(`{"migration_id":1,"chain":"eip155:421614","old_key_id":"key-1"}`) + assert.Equal(t, "eip155:421614", extractFundMigrateChain(data)) + }) + + t.Run("missing chain field", func(t *testing.T) { + assert.Equal(t, "", extractFundMigrateChain([]byte(`{"migration_id":1}`))) + }) + + t.Run("nil or empty input", func(t *testing.T) { + assert.Equal(t, "", extractFundMigrateChain(nil)) + assert.Equal(t, "", extractFundMigrateChain([]byte{})) + }) + + t.Run("invalid JSON", func(t *testing.T) { + assert.Equal(t, "", extractFundMigrateChain([]byte("not-json"))) + }) +} + +func TestDeriveEVMAddressFromPubkey(t *testing.T) { + t.Run("valid compressed secp256k1 pubkey", func(t *testing.T) { + // Generator point pubkey - well-known test vector + addr, err := DeriveEVMAddressFromPubkey("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798") + require.NoError(t, err) + assert.True(t, len(addr) == 42, "address should be 42 chars (0x + 40 hex)") + assert.Equal(t, "0x", addr[:2]) + }) + + t.Run("deterministic output", func(t *testing.T) { + pubkey := "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" + addr1, _ := DeriveEVMAddressFromPubkey(pubkey) + addr2, _ := DeriveEVMAddressFromPubkey(pubkey) + assert.Equal(t, addr1, addr2) + }) + + t.Run("different pubkeys produce different addresses", func(t *testing.T) { + addr1, _ := DeriveEVMAddressFromPubkey("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798") + addr2, _ := DeriveEVMAddressFromPubkey("02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5") + assert.NotEqual(t, addr1, addr2) + }) + + t.Run("handles 0x prefix", func(t *testing.T) { + addr1, _ := DeriveEVMAddressFromPubkey("0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798") + addr2, _ := DeriveEVMAddressFromPubkey("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798") + assert.Equal(t, addr1, addr2) + }) + + t.Run("invalid hex returns error", func(t *testing.T) { + _, err := DeriveEVMAddressFromPubkey("not-hex") + require.Error(t, err) + }) + + t.Run("wrong length returns error", func(t *testing.T) { + _, err := DeriveEVMAddressFromPubkey("0279be667ef9dc") + require.Error(t, err) + assert.Contains(t, err.Error(), "expected 33") + }) + + t.Run("empty string returns error", func(t *testing.T) { + _, err := DeriveEVMAddressFromPubkey("") + require.Error(t, err) + }) +} + func TestDeriveKeyIDBytes(t *testing.T) { b := deriveKeyIDBytes("test-key-id") assert.Len(t, b, 32, "SHA256 hash is always 32 bytes") @@ -339,13 +404,13 @@ func TestGetInFlightSignCountPerChain(t *testing.T) { polyData := []byte(`{"destination_chain":"polygon"}`) // IN_PROGRESS and SIGNED both count as in-flight. - db.Create(&store.Event{EventID: "e1", Type: "SIGN", Status: store.StatusInProgress, EventData: ethData}) - db.Create(&store.Event{EventID: "e2", Type: "SIGN", Status: store.StatusInProgress, EventData: ethData}) - db.Create(&store.Event{EventID: "e3", Type: "SIGN", Status: store.StatusSigned, EventData: polyData}) + db.Create(&store.Event{EventID: "e1", Type: "SIGN_OUTBOUND", Status: store.StatusInProgress, EventData: ethData}) + db.Create(&store.Event{EventID: "e2", Type: "SIGN_OUTBOUND", Status: store.StatusInProgress, EventData: ethData}) + db.Create(&store.Event{EventID: "e3", Type: "SIGN_OUTBOUND", Status: store.StatusSigned, EventData: polyData}) // These must NOT be counted. - db.Create(&store.Event{EventID: "e4", Type: "SIGN", Status: store.StatusConfirmed, EventData: ethData}) // not yet in-flight - db.Create(&store.Event{EventID: "e5", Type: "SIGN", Status: store.StatusBroadcasted, EventData: ethData}) // pending nonce RPC covers it + db.Create(&store.Event{EventID: "e4", Type: "SIGN_OUTBOUND", Status: store.StatusConfirmed, EventData: ethData}) // not yet in-flight + db.Create(&store.Event{EventID: "e5", Type: "SIGN_OUTBOUND", Status: store.StatusBroadcasted, EventData: ethData}) // pending nonce RPC covers it db.Create(&store.Event{EventID: "e6", Type: "KEYGEN", Status: store.StatusInProgress}) // not a SIGN event perChain, err := coord.getInFlightSignCountPerChain() diff --git a/universalClient/tss/coordinator/types.go b/universalClient/tss/coordinator/types.go index 3f87cd6e..0ce02321 100644 --- a/universalClient/tss/coordinator/types.go +++ b/universalClient/tss/coordinator/types.go @@ -18,7 +18,7 @@ type Message struct { Payload []byte `json:"payload"` Participants []string `json:"participants"` // Array of PartyIDs (validator addresses) participating in this process - // UnSignedOutboundTxReq is included for SIGN protocol setup messages. + // UnsignedSigningReq is included for SIGN protocol setup messages. // Participants use this to verify the signing hash before proceeding. - UnSignedOutboundTxReq *common.UnSignedOutboundTxReq `json:"unsigned_outbound_tx_req,omitempty"` + UnsignedSigningReq *common.UnsignedSigningReq `json:"unsigned_outbound_tx_req,omitempty"` } diff --git a/universalClient/tss/eventstore/store.go b/universalClient/tss/eventstore/store.go index a8c96830..ae26953f 100644 --- a/universalClient/tss/eventstore/store.go +++ b/universalClient/tss/eventstore/store.go @@ -103,8 +103,8 @@ func (s *Store) GetNonExpiredConfirmedEvents(currentBlock, minBlockConfirmation // would make the coordinator wait for the resolver unnecessarily. func (s *Store) GetInFlightSignEvents() ([]store.Event, error) { var events []store.Event - if err := s.db.Where("type = ? AND status IN (?, ?)", - store.EventTypeSign, store.StatusInProgress, store.StatusSigned). + if err := s.db.Where("type IN (?, ?) AND status IN (?, ?)", + store.EventTypeSignOutbound, store.EventTypeSignFundMigrate, store.StatusInProgress, store.StatusSigned). Find(&events).Error; err != nil { return nil, fmt.Errorf("failed to query in-flight sign events: %w", err) } @@ -117,7 +117,7 @@ func (s *Store) GetSignedSignEvents(limit int) ([]store.Event, error) { limit = 50 } var events []store.Event - if err := s.db.Where("type = ? AND status = ?", store.EventTypeSign, store.StatusSigned). + if err := s.db.Where("type IN (?, ?) AND status = ?", store.EventTypeSignOutbound, store.EventTypeSignFundMigrate, store.StatusSigned). Order("block_height ASC, created_at ASC"). Limit(limit). Find(&events).Error; err != nil { @@ -132,7 +132,7 @@ func (s *Store) GetBroadcastedSignEvents(limit int) ([]store.Event, error) { limit = 50 } var events []store.Event - if err := s.db.Where("type = ? AND status = ? AND broadcasted_tx_hash != ?", store.EventTypeSign, store.StatusBroadcasted, ""). + if err := s.db.Where("type IN (?, ?) AND status = ? AND broadcasted_tx_hash != ?", store.EventTypeSignOutbound, store.EventTypeSignFundMigrate, store.StatusBroadcasted, ""). Order("block_height ASC, created_at ASC"). Limit(limit). Find(&events).Error; err != nil { diff --git a/universalClient/tss/eventstore/store_test.go b/universalClient/tss/eventstore/store_test.go index 73cf65ee..ae1e19f1 100644 --- a/universalClient/tss/eventstore/store_test.go +++ b/universalClient/tss/eventstore/store_test.go @@ -499,9 +499,9 @@ func TestGetExpiredConfirmedEvents(t *testing.T) { func TestGetInFlightSignEvents(t *testing.T) { s := setupTestStore(t) - createTestEventWithType(t, s, "sign-inprogress", 10, store.StatusInProgress, 200, store.EventTypeSign) - createTestEventWithType(t, s, "sign-signed", 11, store.StatusSigned, 200, store.EventTypeSign) - createTestEventWithType(t, s, "sign-broadcasted", 12, store.StatusBroadcasted, 200, store.EventTypeSign) + createTestEventWithType(t, s, "sign-inprogress", 10, store.StatusInProgress, 200, store.EventTypeSignOutbound) + createTestEventWithType(t, s, "sign-signed", 11, store.StatusSigned, 200, store.EventTypeSignOutbound) + createTestEventWithType(t, s, "sign-broadcasted", 12, store.StatusBroadcasted, 200, store.EventTypeSignOutbound) createTestEventWithType(t, s, "keygen-inprogress", 13, store.StatusInProgress, 200, store.EventTypeKeygen) events, err := s.GetInFlightSignEvents() @@ -514,12 +514,30 @@ func TestGetInFlightSignEvents(t *testing.T) { } } +func TestGetInFlightSignEvents_IncludesFundMigrate(t *testing.T) { + s := setupTestStore(t) + + createTestEventWithType(t, s, "sign-inprogress", 10, store.StatusInProgress, 200, store.EventTypeSignOutbound) + createTestEventWithType(t, s, "fm-inprogress", 11, store.StatusInProgress, 200, store.EventTypeSignFundMigrate) + createTestEventWithType(t, s, "fm-signed", 12, store.StatusSigned, 200, store.EventTypeSignFundMigrate) + createTestEventWithType(t, s, "keygen-inprogress", 13, store.StatusInProgress, 200, store.EventTypeKeygen) + + events, err := s.GetInFlightSignEvents() + if err != nil { + t.Fatalf("GetInFlightSignEvents() error = %v", err) + } + // Should return both SIGN_OUTBOUND and SIGN_FUND_MIGRATE, NOT keygen + if len(events) != 3 { + t.Fatalf("GetInFlightSignEvents() returned %d events, want 3", len(events)) + } +} + func TestGetSignedSignEvents(t *testing.T) { s := setupTestStore(t) - createTestEventWithType(t, s, "signed-1", 10, store.StatusSigned, 200, store.EventTypeSign) - createTestEventWithType(t, s, "signed-2", 11, store.StatusSigned, 200, store.EventTypeSign) - createTestEventWithType(t, s, "inprogress-1", 12, store.StatusInProgress, 200, store.EventTypeSign) + createTestEventWithType(t, s, "signed-1", 10, store.StatusSigned, 200, store.EventTypeSignOutbound) + createTestEventWithType(t, s, "signed-2", 11, store.StatusSigned, 200, store.EventTypeSignOutbound) + createTestEventWithType(t, s, "inprogress-1", 12, store.StatusInProgress, 200, store.EventTypeSignOutbound) t.Run("returns only signed events", func(t *testing.T) { events, err := s.GetSignedSignEvents(10) @@ -552,6 +570,21 @@ func TestGetSignedSignEvents(t *testing.T) { }) } +func TestGetSignedSignEvents_IncludesFundMigrate(t *testing.T) { + s := setupTestStore(t) + + createTestEventWithType(t, s, "signed-outbound", 10, store.StatusSigned, 200, store.EventTypeSignOutbound) + createTestEventWithType(t, s, "signed-fm", 11, store.StatusSigned, 200, store.EventTypeSignFundMigrate) + + events, err := s.GetSignedSignEvents(10) + if err != nil { + t.Fatalf("GetSignedSignEvents() error = %v", err) + } + if len(events) != 2 { + t.Errorf("GetSignedSignEvents() returned %d events, want 2", len(events)) + } +} + func TestGetBroadcastedSignEvents(t *testing.T) { s := setupTestStore(t) @@ -560,7 +593,7 @@ func TestGetBroadcastedSignEvents(t *testing.T) { EventID: "bc-1", BlockHeight: 10, ExpiryBlockHeight: 200, - Type: store.EventTypeSign, + Type: store.EventTypeSignOutbound, Status: store.StatusBroadcasted, BroadcastedTxHash: "0xhash123", } @@ -573,7 +606,7 @@ func TestGetBroadcastedSignEvents(t *testing.T) { EventID: "bc-2", BlockHeight: 11, ExpiryBlockHeight: 200, - Type: store.EventTypeSign, + Type: store.EventTypeSignOutbound, Status: store.StatusBroadcasted, BroadcastedTxHash: "", } @@ -605,3 +638,39 @@ func TestGetBroadcastedSignEvents(t *testing.T) { }) } +func TestGetBroadcastedSignEvents_IncludesFundMigrate(t *testing.T) { + s := setupTestStore(t) + + evt := store.Event{ + EventID: "bc-outbound", + BlockHeight: 10, + ExpiryBlockHeight: 200, + Type: store.EventTypeSignOutbound, + Status: store.StatusBroadcasted, + BroadcastedTxHash: "0xhash1", + } + if err := s.db.Create(&evt).Error; err != nil { + t.Fatalf("failed to create event: %v", err) + } + + evt2 := store.Event{ + EventID: "bc-fm", + BlockHeight: 11, + ExpiryBlockHeight: 200, + Type: store.EventTypeSignFundMigrate, + Status: store.StatusBroadcasted, + BroadcastedTxHash: "0xhash2", + } + if err := s.db.Create(&evt2).Error; err != nil { + t.Fatalf("failed to create event: %v", err) + } + + events, err := s.GetBroadcastedSignEvents(10) + if err != nil { + t.Fatalf("GetBroadcastedSignEvents() error = %v", err) + } + if len(events) != 2 { + t.Errorf("got %d events, want 2", len(events)) + } +} + diff --git a/universalClient/tss/expirysweeper/sweeper.go b/universalClient/tss/expirysweeper/sweeper.go index 4d72c77c..40b2cfd7 100644 --- a/universalClient/tss/expirysweeper/sweeper.go +++ b/universalClient/tss/expirysweeper/sweeper.go @@ -9,6 +9,7 @@ import ( "github.com/rs/zerolog" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/universalClient/pushcore" "github.com/pushchain/push-chain-node/universalClient/pushsigner" @@ -94,9 +95,14 @@ func (s *Sweeper) sweep(ctx context.Context) { swept := 0 for _, event := range events { - if event.Type == store.EventTypeSign { - if err := s.voteFailureAndMarkReverted(ctx, &event, "event expired before TSS could start"); err != nil { - s.logger.Error().Err(err).Str("event_id", event.EventID).Msg("failed to sweep expired SIGN event") + if event.Type == store.EventTypeSignOutbound { + if err := s.voteOutboundFailureAndMarkReverted(ctx, &event, "event expired before TSS could start"); err != nil { + s.logger.Error().Err(err).Str("event_id", event.EventID).Msg("failed to sweep expired SIGN_OUTBOUND event") + continue + } + } else if event.Type == store.EventTypeSignFundMigrate { + if err := s.voteFundMigrationFailureAndMarkReverted(ctx, &event, "event expired before TSS could start"); err != nil { + s.logger.Error().Err(err).Str("event_id", event.EventID).Msg("failed to sweep expired SIGN_FUND_MIGRATE event") continue } } else { @@ -115,8 +121,8 @@ func (s *Sweeper) sweep(ctx context.Context) { Msg("swept expired confirmed events") } -// voteFailureAndMarkReverted submits a failure vote to Push chain and marks the event REVERTED. -func (s *Sweeper) voteFailureAndMarkReverted(ctx context.Context, event *store.Event, errorMsg string) error { +// voteOutboundFailureAndMarkReverted submits a failure vote for an outbound event and marks it REVERTED. +func (s *Sweeper) voteOutboundFailureAndMarkReverted(ctx context.Context, event *store.Event, errorMsg string) error { var data uexecutortypes.OutboundCreatedEvent if err := json.Unmarshal(event.EventData, &data); err != nil { return fmt.Errorf("failed to parse outbound event data for event %s: %w", event.EventID, err) @@ -147,6 +153,36 @@ func (s *Sweeper) voteFailureAndMarkReverted(ctx context.Context, event *store.E Str("event_id", event.EventID). Str("tx_id", data.TxID). Str("error_msg", errorMsg). - Msg("voted failure and marked REVERTED") + Msg("voted outbound failure and marked REVERTED") + return nil +} + +// voteFundMigrationFailureAndMarkReverted submits a failure vote for a fund migration event and marks it REVERTED. +func (s *Sweeper) voteFundMigrationFailureAndMarkReverted(ctx context.Context, event *store.Event, errorMsg string) error { + var data utsstypes.FundMigrationInitiatedEventData + if err := json.Unmarshal(event.EventData, &data); err != nil { + return fmt.Errorf("failed to parse fund migration event data for event %s: %w", event.EventID, err) + } + + fields := map[string]any{"status": store.StatusReverted} + + if s.pushSigner == nil { + s.logger.Warn().Str("event_id", event.EventID).Msg("pushSigner not configured, skipping failure vote") + } else { + voteTxHash, err := s.pushSigner.VoteFundMigration(ctx, data.MigrationID, "", false) + if err != nil { + return fmt.Errorf("failed to vote fund migration failure for event %s: %w", event.EventID, err) + } + fields["vote_tx_hash"] = voteTxHash + } + + if err := s.eventStore.Update(event.EventID, fields); err != nil { + return fmt.Errorf("failed to mark event %s as reverted: %w", event.EventID, err) + } + s.logger.Info(). + Str("event_id", event.EventID). + Uint64("migration_id", data.MigrationID). + Str("error_msg", errorMsg). + Msg("voted fund migration failure and marked REVERTED") return nil } diff --git a/universalClient/tss/expirysweeper/sweeper_test.go b/universalClient/tss/expirysweeper/sweeper_test.go index 7bf30a4f..dca9f5d6 100644 --- a/universalClient/tss/expirysweeper/sweeper_test.go +++ b/universalClient/tss/expirysweeper/sweeper_test.go @@ -54,8 +54,8 @@ func runSweepBatch(t *testing.T, s *Sweeper, currentBlock uint64) { require.NoError(t, err) for _, event := range events { ev := event - if ev.Type == store.EventTypeSign { - require.NoError(t, s.voteFailureAndMarkReverted(ctx, &ev, "event expired before TSS could start")) + if ev.Type == store.EventTypeSignOutbound { + require.NoError(t, s.voteOutboundFailureAndMarkReverted(ctx, &ev, "event expired before TSS could start")) } else { require.NoError(t, s.eventStore.Update(ev.EventID, map[string]any{"status": store.StatusReverted})) } @@ -67,7 +67,7 @@ func TestSweep(t *testing.T) { sweeper, evtStore, db := setupTestSweeper(t) db.Create(&store.Event{EventID: "expired-sign", BlockHeight: 50, ExpiryBlockHeight: 90, - Status: "CONFIRMED", Type: "SIGN", EventData: signEventData(t, "tx-1", "utx-1")}) + Status: "CONFIRMED", Type: "SIGN_OUTBOUND", EventData: signEventData(t, "tx-1", "utx-1")}) runSweepBatch(t, sweeper, 100) @@ -94,7 +94,7 @@ func TestSweep(t *testing.T) { db.Create(&store.Event{EventID: "expired-keygen", BlockHeight: 50, ExpiryBlockHeight: 90, Status: "CONFIRMED", Type: "KEYGEN"}) db.Create(&store.Event{EventID: "expired-sign", BlockHeight: 60, ExpiryBlockHeight: 100, - Status: "CONFIRMED", Type: "SIGN", EventData: signEventData(t, "tx-1", "utx-1")}) + Status: "CONFIRMED", Type: "SIGN_OUTBOUND", EventData: signEventData(t, "tx-1", "utx-1")}) // Non-expired CONFIRMED — unchanged db.Create(&store.Event{EventID: "valid-1", BlockHeight: 50, ExpiryBlockHeight: 200, Status: "CONFIRMED", Type: "KEYGEN"}) @@ -102,9 +102,9 @@ func TestSweep(t *testing.T) { db.Create(&store.Event{EventID: "ip-expired", BlockHeight: 50, ExpiryBlockHeight: 90, Status: "IN_PROGRESS", Type: "KEYGEN"}) db.Create(&store.Event{EventID: "signed-expired", BlockHeight: 50, ExpiryBlockHeight: 90, - Status: "SIGNED", Type: "SIGN", EventData: signEventData(t, "tx-2", "utx-2")}) + Status: "SIGNED", Type: "SIGN_OUTBOUND", EventData: signEventData(t, "tx-2", "utx-2")}) db.Create(&store.Event{EventID: "broadcasted-expired", BlockHeight: 50, ExpiryBlockHeight: 90, - Status: "BROADCASTED", Type: "SIGN", EventData: signEventData(t, "tx-3", "utx-3")}) + Status: "BROADCASTED", Type: "SIGN_OUTBOUND", EventData: signEventData(t, "tx-3", "utx-3")}) runSweepBatch(t, sweeper, 100) diff --git a/universalClient/tss/sessionmanager/sessionmanager.go b/universalClient/tss/sessionmanager/sessionmanager.go index 7e8e4cdb..c0c896de 100644 --- a/universalClient/tss/sessionmanager/sessionmanager.go +++ b/universalClient/tss/sessionmanager/sessionmanager.go @@ -7,7 +7,8 @@ import ( "encoding/hex" "encoding/json" "fmt" - "strconv" + "math/big" + "sync" "time" @@ -23,6 +24,7 @@ import ( "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" "github.com/pushchain/push-chain-node/universalClient/tss/keyshare" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" ) // SendFunc is a function type for sending messages to participants. @@ -36,7 +38,7 @@ type sessionState struct { expiryTime time.Time // when session expires participants []string // list of participants (from setup message) stepMu sync.Mutex // mutex to serialize Step() calls (DKLS may not be thread-safe) - signingReq *common.UnSignedOutboundTxReq // cached from coordinator setup (sign sessions only) + signingReq *common.UnsignedSigningReq // cached from coordinator setup (sign sessions only) } // SessionManager manages TSS protocol sessions and handles incoming messages. @@ -170,12 +172,19 @@ func (sm *SessionManager) handleSetupMessage(ctx context.Context, senderPeerID s } // 6. For SIGN events, verify the signing hash independently - if event.Type == store.EventTypeSign { - if err := sm.verifySigningRequest(ctx, event, msg.UnSignedOutboundTxReq); err != nil { + if event.Type == store.EventTypeSignOutbound { + if err := sm.verifyOutboundSigningRequest(ctx, event, msg.UnsignedSigningReq); err != nil { return fmt.Errorf("signing request verification failed: %w", err) } } + // 6b. For FUND_MIGRATE events, verify the fund migration signing hash independently + if event.Type == store.EventTypeSignFundMigrate { + if err := sm.verifyFundMigrationSigningRequest(ctx, event, msg.UnsignedSigningReq); err != nil { + return fmt.Errorf("fund migration signing request verification failed: %w", err) + } + } + // 7. Create session based on protocol type session, err := sm.createSession(ctx, event, msg) if err != nil { @@ -190,7 +199,7 @@ func (sm *SessionManager) handleSetupMessage(ctx context.Context, senderPeerID s coordinator: senderPeerID, expiryTime: time.Now().Add(sm.sessionExpiryTime), participants: msg.Participants, - signingReq: msg.UnSignedOutboundTxReq, + signingReq: msg.UnsignedSigningReq, } sm.mu.Unlock() @@ -402,8 +411,8 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str return fmt.Errorf("failed to get result for session %s: %w", eventID, err) } - // SIGN sessions: broadcast the signed tx, then done (status managed by handleSigningComplete) - if state.protocolType == store.EventTypeSign { + // SIGN and FUND_MIGRATE sessions: broadcast the signed tx, then done (status managed by handleSigningComplete) + if state.protocolType == store.EventTypeSignOutbound || state.protocolType == store.EventTypeSignFundMigrate { return sm.handleSignFinished(ctx, eventID, result, state.signingReq) } @@ -412,7 +421,7 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str } // handleSignFinished handles a completed SIGN session by broadcasting the signed transaction. -func (sm *SessionManager) handleSignFinished(ctx context.Context, eventID string, result *dkls.Result, signingReq *common.UnSignedOutboundTxReq) error { +func (sm *SessionManager) handleSignFinished(ctx context.Context, eventID string, result *dkls.Result, signingReq *common.UnsignedSigningReq) error { sm.logger.Info(). Str("event_id", eventID). Str("signature", hex.EncodeToString(result.Signature)). @@ -459,10 +468,18 @@ func (sm *SessionManager) handleKeyFinished(ctx context.Context, eventID, protoc if sm.pushSigner != nil { pubKeyHex := hex.EncodeToString(result.PublicKey) - processID, err := strconv.ParseUint(eventID, 10, 64) + // Extract process_id from event data (eventID is a hash, not the raw process ID) + event, err := sm.eventStore.GetEvent(eventID) if err != nil { - return fmt.Errorf("failed to parse process id from %s: %w", eventID, err) + return fmt.Errorf("failed to get event %s for process ID extraction: %w", eventID, err) + } + var eventData struct { + ProcessID uint64 `json:"process_id"` } + if err := json.Unmarshal(event.EventData, &eventData); err != nil { + return fmt.Errorf("failed to parse process id from event data: %w", err) + } + processID := eventData.ProcessID voteTxHash, err = sm.pushSigner.VoteTssKeyProcess(ctx, pubKeyHex, storageID, processID) if err != nil { @@ -554,7 +571,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.Event, oldKeyshare, ) - case store.EventTypeSign: + case store.EventTypeSignOutbound: // Get current keyID keyID, _, err := sm.coordinator.GetCurrentTSSKey(ctx) if err != nil { @@ -573,7 +590,30 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.Event, sm.partyID, msg.Participants, keyshareBytes, - msg.UnSignedOutboundTxReq.SigningHash, + msg.UnsignedSigningReq.SigningHash, + nil, // chainPath + ) + + case store.EventTypeSignFundMigrate: + // Parse event data to get OldKeyID + var migrationData utsstypes.FundMigrationInitiatedEventData + if err := json.Unmarshal(event.EventData, &migrationData); err != nil { + return nil, fmt.Errorf("failed to parse fund migration data: %w", err) + } + + // Load OLD keyshare (we sign with old key to move funds from old TSS) + oldKeyshare, err := sm.keyshareManager.Get(migrationData.OldKeyID) + if err != nil { + return nil, fmt.Errorf("failed to load old keyshare %s: %w", migrationData.OldKeyID, err) + } + + return dkls.NewSignSession( + msg.Payload, // setupData + msg.EventID, // sessionID + sm.partyID, + msg.Participants, + oldKeyshare, + msg.UnsignedSigningReq.SigningHash, nil, // chainPath ) @@ -626,14 +666,14 @@ func (sm *SessionManager) validateParticipants(participants []string, event *sto } } - case store.EventTypeSign: - // For SIGN the coordinator picks a random threshold subset (>2/3 of eligible) rather than - // all eligible validators. Accept any subset as long as it meets the threshold minimum; - // all participants are already verified eligible by the eligibleSet check above. + case store.EventTypeSignOutbound, store.EventTypeSignFundMigrate: + // For SIGN and FUND_MIGRATE the coordinator picks a random threshold subset (>2/3 of eligible) + // rather than all eligible validators. Accept any subset as long as it meets the threshold + // minimum; all participants are already verified eligible by the eligibleSet check above. threshold := coordinator.CalculateThreshold(len(eligibleList)) if len(participants) < threshold { - return fmt.Errorf("SIGN participants count %d is below required threshold %d (eligible: %d)", - len(participants), threshold, len(eligibleList)) + return fmt.Errorf("%s participants count %d is below required threshold %d (eligible: %d)", + event.Type, len(participants), threshold, len(eligibleList)) } default: @@ -718,8 +758,8 @@ func (sm *SessionManager) checkExpiredSessions(ctx context.Context, blockDelay u } } -// verifySigningRequest validates the coordinator's signing request: hash verification (coordinator nonce is source of truth). -func (sm *SessionManager) verifySigningRequest(ctx context.Context, event *store.Event, req *common.UnSignedOutboundTxReq) error { +// verifyOutboundSigningRequest validates the coordinator's signing request: hash verification (coordinator nonce is source of truth). +func (sm *SessionManager) verifyOutboundSigningRequest(ctx context.Context, event *store.Event, req *common.UnsignedSigningReq) error { if req == nil { return fmt.Errorf("unsigned transaction request is required for SIGN events") } @@ -799,6 +839,93 @@ func (sm *SessionManager) verifySigningRequest(ctx context.Context, event *store return nil } +// verifyFundMigrationSigningRequest validates the coordinator's fund migration signing request. +// It independently rebuilds the signing hash from the event data and compares it with the coordinator's hash. +func (sm *SessionManager) verifyFundMigrationSigningRequest(ctx context.Context, event *store.Event, req *common.UnsignedSigningReq) error { + if req == nil { + return fmt.Errorf("unsigned transaction request is required for FUND_MIGRATE events") + } + + if len(req.SigningHash) == 0 { + return fmt.Errorf("signing hash is missing in request") + } + + // Parse event data to get fund migration details + var migrationData utsstypes.FundMigrationInitiatedEventData + if err := json.Unmarshal(event.EventData, &migrationData); err != nil { + return fmt.Errorf("failed to parse fund migration event data: %w", err) + } + + // Derive old and current TSS addresses from TSS public keys + oldTSSAddr, err := coordinator.DeriveEVMAddressFromPubkey(migrationData.OldTssPubkey) + if err != nil { + return fmt.Errorf("failed to derive old TSS address: %w", err) + } + currentTSSAddr, err := coordinator.DeriveEVMAddressFromPubkey(migrationData.CurrentTssPubkey) + if err != nil { + return fmt.Errorf("failed to derive current TSS address: %w", err) + } + + // Get chain client and tx builder + if sm.chains == nil { + sm.logger.Warn().Msg("chains manager not configured, skipping fund migration hash verification") + return nil + } + client, err := sm.chains.GetClient(migrationData.Chain) + if err != nil { + sm.logger.Warn().Err(err).Str("chain", migrationData.Chain).Msg("failed to get client, skipping fund migration hash verification") + return nil + } + builder, err := client.GetTxBuilder() + if err != nil { + sm.logger.Warn().Err(err).Str("chain", migrationData.Chain).Msg("failed to get tx builder, skipping fund migration hash verification") + return nil + } + + // Guard against stale / replayed nonces: reject if coordinator's nonce is below the + // last finalized nonce on chain for the old TSS address. + if finalizedNonce, nonceErr := builder.GetNextNonce(ctx, oldTSSAddr, true /* useFinalized */); nonceErr != nil { + sm.logger.Warn().Err(nonceErr).Str("chain", migrationData.Chain).Msg("cannot get finalized nonce for old TSS, skipping nonce check") + } else if req.Nonce < finalizedNonce { + return fmt.Errorf("coordinator assigned nonce %d is below chain finalized nonce %d for old TSS %s — nonce already used on chain", + req.Nonce, finalizedNonce, oldTSSAddr) + } + + // Rebuild fund migration signing request with coordinator's nonce + gasPrice := new(big.Int) + gasPrice.SetString(migrationData.GasPrice, 10) + + migrationFundData := &common.FundMigrationData{ + From: oldTSSAddr, + To: currentTSSAddr, + GasPrice: gasPrice, + GasLimit: migrationData.GasLimit, + } + signingReq, err := builder.GetFundMigrationSigningRequest(ctx, migrationFundData, req.Nonce) + if err != nil { + return fmt.Errorf("failed to get fund migration signing request for verification: %w", err) + } + + // Compare hashes - must match exactly + if !bytes.Equal(signingReq.SigningHash, req.SigningHash) { + sm.logger.Error(). + Str("our_hash", hex.EncodeToString(signingReq.SigningHash)). + Str("coordinator_hash", hex.EncodeToString(req.SigningHash)). + Str("event_id", event.EventID). + Msg("fund migration signing hash mismatch - rejecting signing request") + return fmt.Errorf("fund migration signing hash mismatch: our computed hash does not match coordinator's hash") + } + + sm.logger.Debug(). + Str("event_id", event.EventID). + Str("signing_hash", hex.EncodeToString(req.SigningHash)). + Str("old_tss_addr", oldTSSAddr). + Str("current_tss_addr", currentTSSAddr). + Msg("fund migration sign metadata verified - hash matches") + + return nil +} + // getTSSAddress gets the TSS ECDSA address from the current TSS public key // The TSS address is always the same ECDSA address derived from the TSS public key func (sm *SessionManager) getTSSAddress(ctx context.Context) (string, error) { @@ -810,7 +937,7 @@ func (sm *SessionManager) getTSSAddress(ctx context.Context) (string, error) { // handleSigningComplete handles post-sign steps. EVM: set status SIGNED and store payload (txlifecycle/signed runs BroadcastOutboundSigningRequest). Solana: enqueue for sequential per-chain broadcast (PDA nonce order). // signingReq is the cached signing request from the coordinator setup message. -func (sm *SessionManager) handleSigningComplete(_ context.Context, eventID string, eventData []byte, signature []byte, signingReq *common.UnSignedOutboundTxReq) error { +func (sm *SessionManager) handleSigningComplete(_ context.Context, eventID string, eventData []byte, signature []byte, signingReq *common.UnsignedSigningReq) error { if signingReq == nil { return fmt.Errorf("signing request is nil - cannot persist signing data") } diff --git a/universalClient/tss/sessionmanager/sessionmanager_test.go b/universalClient/tss/sessionmanager/sessionmanager_test.go index c4afc5bf..170461fd 100644 --- a/universalClient/tss/sessionmanager/sessionmanager_test.go +++ b/universalClient/tss/sessionmanager/sessionmanager_test.go @@ -310,7 +310,7 @@ func TestValidateParticipants(t *testing.T) { } setCoordinatorValidators(coord, fourActive) - signEvent := &store.Event{EventID: "sign-1", Type: "SIGN"} + signEvent := &store.Event{EventID: "sign-1", Type: "SIGN_OUTBOUND"} keygenEvent := &store.Event{EventID: "keygen-1", Type: "KEYGEN"} // --- SIGN: threshold subset rules --- @@ -337,6 +337,20 @@ func TestValidateParticipants(t *testing.T) { assert.Contains(t, err.Error(), "not eligible") }) + // --- SIGN_FUND_MIGRATE: same threshold rules as SIGN_OUTBOUND --- + + fmEvent := &store.Event{EventID: "fm-1", Type: store.EventTypeSignFundMigrate} + + t.Run("SIGN_FUND_MIGRATE: threshold subset is valid", func(t *testing.T) { + assert.NoError(t, sm.validateParticipants([]string{"v1", "v2", "v3"}, fmEvent)) + }) + + t.Run("SIGN_FUND_MIGRATE: below threshold is rejected", func(t *testing.T) { + err := sm.validateParticipants([]string{"v1", "v2"}, fmEvent) + require.Error(t, err) + assert.Contains(t, err.Error(), "threshold") + }) + // --- KEYGEN: exact-match rules (all eligible must participate) --- t.Run("KEYGEN: all eligible is valid", func(t *testing.T) { @@ -405,17 +419,17 @@ func TestVerifySigningRequest_OutboundDisabled(t *testing.T) { event := &store.Event{ EventID: "sign-event-1", - Type: "SIGN", + Type: "SIGN_OUTBOUND", Status: store.StatusConfirmed, EventData: eventDataBytes, } - req := &common.UnSignedOutboundTxReq{ + req := &common.UnsignedSigningReq{ SigningHash: []byte{0x01, 0x02, 0x03}, } t.Run("rejects signing when outbound disabled for destination chain", func(t *testing.T) { - err := sm.verifySigningRequest(ctx, event, req) + err := sm.verifyOutboundSigningRequest(ctx, event, req) require.Error(t, err) assert.Contains(t, err.Error(), "outbound disabled") assert.Contains(t, err.Error(), "eip155:1") @@ -423,7 +437,7 @@ func TestVerifySigningRequest_OutboundDisabled(t *testing.T) { t.Run("nil chains skips outbound check", func(t *testing.T) { sm.chains = nil - err := sm.verifySigningRequest(ctx, event, req) + err := sm.verifyOutboundSigningRequest(ctx, event, req) // Should pass the outbound check (skipped) and fail later on gas price validation // or hash verification — but NOT on "outbound disabled" if err != nil { diff --git a/universalClient/tss/txbroadcaster/broadcaster.go b/universalClient/tss/txbroadcaster/broadcaster.go index b4e3faf0..dde29a18 100644 --- a/universalClient/tss/txbroadcaster/broadcaster.go +++ b/universalClient/tss/txbroadcaster/broadcaster.go @@ -10,6 +10,7 @@ import ( "github.com/rs/zerolog" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/universalClient/chains" "github.com/pushchain/push-chain-node/universalClient/chains/common" @@ -17,6 +18,10 @@ import ( "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" ) +// --------------------------------------------------------------------------- +// Signed event data types +// --------------------------------------------------------------------------- + // SigningData holds the signing parameters persisted by sessionManager when marking SIGNED. type SigningData struct { Signature string `json:"signature"` // hex-encoded 64/65 byte signature @@ -24,12 +29,22 @@ type SigningData struct { Nonce uint64 `json:"nonce"` } -// SignedEventData wraps OutboundCreatedEvent with signing data appended by sessionManager. -type SignedEventData struct { +// SignedOutboundData wraps OutboundCreatedEvent with signing data. +type SignedOutboundData struct { uexecutortypes.OutboundCreatedEvent SigningData *SigningData `json:"signing_data,omitempty"` } +// SignedFundMigrationData wraps FundMigrationInitiatedEventData with signing data. +type SignedFundMigrationData struct { + utsstypes.FundMigrationInitiatedEventData + SigningData *SigningData `json:"signing_data,omitempty"` +} + +// --------------------------------------------------------------------------- +// Broadcaster +// --------------------------------------------------------------------------- + // Config holds configuration for the broadcaster. type Config struct { EventStore *eventstore.Store @@ -107,39 +122,95 @@ func (b *Broadcaster) processSigned(ctx context.Context) { } } +// broadcastEvent dispatches to the appropriate handler based on event type. func (b *Broadcaster) broadcastEvent(ctx context.Context, event *store.Event) { - data, err := parseSignedEventData(event.EventData) - if err != nil { - b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to parse signed event data") + switch event.Type { + case store.EventTypeSignOutbound: + b.broadcastOutbound(ctx, event) + case store.EventTypeSignFundMigrate: + b.broadcastFundMigration(ctx, event) + default: + b.logger.Warn().Str("event_id", event.EventID).Str("type", event.Type). + Msg("unknown signed event type, skipping") + } +} + +// --------------------------------------------------------------------------- +// Outbound broadcast (parsing + chain dispatch) +// --------------------------------------------------------------------------- + +// broadcastOutbound parses outbound event data and delegates to chain-specific broadcast. +func (b *Broadcaster) broadcastOutbound(ctx context.Context, event *store.Event) { + var data SignedOutboundData + if err := json.Unmarshal(event.EventData, &data); err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to parse signed outbound data") + return + } + if data.SigningData == nil { + b.logger.Warn().Str("event_id", event.EventID).Msg("signing_data missing from outbound event") return } chainID := data.DestinationChain - - // Skip if outbound is disabled for destination chain if !b.chains.IsChainOutboundEnabled(chainID) { b.logger.Warn().Str("chain", chainID).Str("event_id", event.EventID). - Msg("outbound disabled for destination chain, skipping broadcast") + Msg("outbound disabled, skipping broadcast") return } if b.chains.IsEVMChain(chainID) { - b.broadcastEVM(ctx, event, data, chainID) + b.broadcastEVM(ctx, event, &data, chainID) } else { - b.broadcastSVM(ctx, event, data, chainID) + b.broadcastSVM(ctx, event, &data, chainID) } } -// parseSignedEventData unmarshals EventData into SignedEventData (OutboundCreatedEvent + SigningData). -func parseSignedEventData(eventData []byte) (*SignedEventData, error) { - var data SignedEventData - if err := json.Unmarshal(eventData, &data); err != nil { - return nil, fmt.Errorf("failed to unmarshal signed event data: %w", err) +// --------------------------------------------------------------------------- +// Fund migration broadcast (parsing + chain dispatch) +// --------------------------------------------------------------------------- + +// broadcastFundMigration parses fund migration event data and delegates to chain-specific broadcast. +func (b *Broadcaster) broadcastFundMigration(ctx context.Context, event *store.Event) { + var data SignedFundMigrationData + if err := json.Unmarshal(event.EventData, &data); err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to parse fund migration signed data") + return } if data.SigningData == nil { - return nil, fmt.Errorf("signing_data missing from event data") + b.logger.Warn().Str("event_id", event.EventID).Msg("signing_data missing from fund migration event") + return + } + + chainID := data.Chain + + if b.chains.IsEVMChain(chainID) { + b.broadcastFundMigrationEVM(ctx, event, &data, chainID) + } else { + b.logger.Warn().Str("chain", chainID).Str("event_id", event.EventID). + Msg("fund migration not supported for this chain type") } - return &data, nil +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +// decodeSigningData extracts the UnsignedSigningReq and raw signature bytes from SigningData. +func decodeSigningData(sd *SigningData) (*common.UnsignedSigningReq, []byte, error) { + signingHash, err := hex.DecodeString(sd.SigningHash) + if err != nil { + return nil, nil, fmt.Errorf("failed to decode signing hash: %w", err) + } + + signature, err := hex.DecodeString(sd.Signature) + if err != nil { + return nil, nil, fmt.Errorf("failed to decode signature: %w", err) + } + + return &common.UnsignedSigningReq{ + SigningHash: signingHash, + Nonce: sd.Nonce, + }, signature, nil } // markBroadcasted updates the event status to BROADCASTED with the given tx hash. @@ -155,16 +226,3 @@ func (b *Broadcaster) markBroadcasted(event *store.Event, chainID, txHash string b.logger.Info().Str("event_id", event.EventID).Str("tx_hash", txHash).Str("chain", chainID). Msg("marked BROADCASTED") } - -// reconstructSigningReq rebuilds UnSignedOutboundTxReq from persisted SigningData. -func reconstructSigningReq(sd *SigningData) (*common.UnSignedOutboundTxReq, error) { - signingHash, err := hex.DecodeString(sd.SigningHash) - if err != nil { - return nil, fmt.Errorf("failed to decode signing hash: %w", err) - } - - return &common.UnSignedOutboundTxReq{ - SigningHash: signingHash, - Nonce: sd.Nonce, - }, nil -} diff --git a/universalClient/tss/txbroadcaster/broadcaster_test.go b/universalClient/tss/txbroadcaster/broadcaster_test.go index eecfbf77..4c378b68 100644 --- a/universalClient/tss/txbroadcaster/broadcaster_test.go +++ b/universalClient/tss/txbroadcaster/broadcaster_test.go @@ -17,6 +17,7 @@ import ( uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/universalClient/chains" "github.com/pushchain/push-chain-node/universalClient/chains/common" @@ -31,12 +32,12 @@ import ( type mockTxBuilder struct{ mock.Mock } -func (m *mockTxBuilder) GetOutboundSigningRequest(ctx context.Context, data *uexecutortypes.OutboundCreatedEvent, nonce uint64) (*common.UnSignedOutboundTxReq, error) { +func (m *mockTxBuilder) GetOutboundSigningRequest(ctx context.Context, data *uexecutortypes.OutboundCreatedEvent, nonce uint64) (*common.UnsignedSigningReq, error) { args := m.Called(ctx, data, nonce) if args.Get(0) == nil { return nil, args.Error(1) } - return args.Get(0).(*common.UnSignedOutboundTxReq), args.Error(1) + return args.Get(0).(*common.UnsignedSigningReq), args.Error(1) } func (m *mockTxBuilder) GetNextNonce(ctx context.Context, addr string, useFinalized bool) (uint64, error) { @@ -44,7 +45,7 @@ func (m *mockTxBuilder) GetNextNonce(ctx context.Context, addr string, useFinali return args.Get(0).(uint64), args.Error(1) } -func (m *mockTxBuilder) BroadcastOutboundSigningRequest(ctx context.Context, req *common.UnSignedOutboundTxReq, data *uexecutortypes.OutboundCreatedEvent, sig []byte) (string, error) { +func (m *mockTxBuilder) BroadcastOutboundSigningRequest(ctx context.Context, req *common.UnsignedSigningReq, data *uexecutortypes.OutboundCreatedEvent, sig []byte) (string, error) { args := m.Called(ctx, req, data, sig) return args.String(0), args.Error(1) } @@ -64,12 +65,25 @@ func (m *mockTxBuilder) GetGasFeeUsed(ctx context.Context, txHash string) (strin return args.String(0), args.Error(1) } +func (m *mockTxBuilder) GetFundMigrationSigningRequest(ctx context.Context, data *common.FundMigrationData, nonce uint64) (*common.UnsignedSigningReq, error) { + args := m.Called(ctx, data, nonce) + if args.Get(0) == nil { + return nil, args.Error(1) + } + return args.Get(0).(*common.UnsignedSigningReq), args.Error(1) +} + +func (m *mockTxBuilder) BroadcastFundMigrationTx(ctx context.Context, req *common.UnsignedSigningReq, data *common.FundMigrationData, sig []byte) (string, error) { + args := m.Called(ctx, req, data, sig) + return args.String(0), args.Error(1) +} + type mockChainClient struct{ builder *mockTxBuilder } func (m *mockChainClient) Start(context.Context) error { return nil } func (m *mockChainClient) Stop() error { return nil } func (m *mockChainClient) IsHealthy() bool { return true } -func (m *mockChainClient) GetTxBuilder() (common.OutboundTxBuilder, error) { return m.builder, nil } +func (m *mockChainClient) GetTxBuilder() (common.TxBuilder, error) { return m.builder, nil } // --------------------------------------------------------------------------- // Helpers @@ -108,11 +122,11 @@ func newTestChains(t *testing.T, chainID string, vmType uregistrytypes.VmType, c return c } -func makeSignedEventData(t *testing.T, destChain string, nonce uint64) []byte { +func makeSignedOutboundData(t *testing.T, destChain string, nonce uint64) []byte { t.Helper() sig := hex.EncodeToString(make([]byte, 64)) hash := hex.EncodeToString(make([]byte, 32)) - data := SignedEventData{ + data := SignedOutboundData{ OutboundCreatedEvent: uexecutortypes.OutboundCreatedEvent{ TxID: "tx-123", UniversalTxId: "utx-456", @@ -137,10 +151,10 @@ func insertSignedEvent(t *testing.T, db *gorm.DB, eventID, destChain string, non EventID: eventID, BlockHeight: 100, ExpiryBlockHeight: 99999, - Type: "SIGN", + Type: "SIGN_OUTBOUND", ConfirmationType: "STANDARD", Status: store.StatusSigned, - EventData: makeSignedEventData(t, destChain, nonce), + EventData: makeSignedOutboundData(t, destChain, nonce), } require.NoError(t, db.Create(&event).Error) } @@ -453,3 +467,109 @@ func TestMarkBroadcasted_EmptyTxHash(t *testing.T) { updated := getEvent(t, db, "ev-1") require.Equal(t, "solana:mainnet:", updated.BroadcastedTxHash) } + +// --------------------------------------------------------------------------- +// Fund Migration EVM Tests +// --------------------------------------------------------------------------- + +// testOldTSSPubkey is a valid compressed secp256k1 pubkey for testing. +// Derived address: coordinator.DeriveEVMAddressFromPubkey will succeed with this. +const testOldTSSPubkey = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" +const testNewTSSPubkey = "02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5" + +func makeSignedFundMigrationData(t *testing.T, chainID string, nonce uint64) []byte { + t.Helper() + sig := hex.EncodeToString(make([]byte, 65)) + hash := hex.EncodeToString(make([]byte, 32)) + data := SignedFundMigrationData{ + FundMigrationInitiatedEventData: utsstypes.FundMigrationInitiatedEventData{ + MigrationID: 1, + OldKeyID: "old-key", + OldTssPubkey: testOldTSSPubkey, + CurrentKeyID: "new-key", + CurrentTssPubkey: testNewTSSPubkey, + Chain: chainID, + GasPrice: "1000000000", + GasLimit: 21000, + }, + SigningData: &SigningData{ + Signature: sig, + SigningHash: hash, + Nonce: nonce, + }, + } + b, err := json.Marshal(data) + require.NoError(t, err) + return b +} + +func insertSignedFundMigrationEvent(t *testing.T, db *gorm.DB, eventID, chainID string, nonce uint64) { + t.Helper() + event := store.Event{ + EventID: eventID, + BlockHeight: 100, + ExpiryBlockHeight: 99999, + Type: store.EventTypeSignFundMigrate, + ConfirmationType: "INSTANT", + Status: store.StatusSigned, + EventData: makeSignedFundMigrationData(t, chainID, nonce), + } + require.NoError(t, db.Create(&event).Error) +} + +func TestFundMigrationEVM_BroadcastSuccess(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertSignedFundMigrationEvent(t, db, "fm-1", "eip155:1", 0) + + builder.On("BroadcastFundMigrationTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return("0xmigrate123", nil) + + b := newBroadcaster(evtStore, ch, "") + b.processSigned(context.Background()) + + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) + require.Equal(t, "eip155:1:0xmigrate123", ev.BroadcastedTxHash) +} + +func TestFundMigrationEVM_BroadcastFails_NonceConsumed(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertSignedFundMigrationEvent(t, db, "fm-1", "eip155:1", 5) + + builder.On("BroadcastFundMigrationTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return("0xfailed", fmt.Errorf("already known")) + builder.On("GetNextNonce", mock.Anything, mock.Anything, true).Return(uint64(10), nil) + + b := newBroadcaster(evtStore, ch, "") + b.processSigned(context.Background()) + + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) +} + +func TestFundMigrationEVM_BroadcastFails_NonceNotConsumed_StaysSigned(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertSignedFundMigrationEvent(t, db, "fm-1", "eip155:1", 5) + + builder.On("BroadcastFundMigrationTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return("0xfailed", fmt.Errorf("rpc error")) + builder.On("GetNextNonce", mock.Anything, mock.Anything, true).Return(uint64(3), nil) + + b := newBroadcaster(evtStore, ch, "") + b.processSigned(context.Background()) + + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusSigned, ev.Status) // stays SIGNED for retry +} diff --git a/universalClient/tss/txbroadcaster/evm.go b/universalClient/tss/txbroadcaster/evm.go index f1f9ff92..e1aac19e 100644 --- a/universalClient/tss/txbroadcaster/evm.go +++ b/universalClient/tss/txbroadcaster/evm.go @@ -2,12 +2,14 @@ package txbroadcaster import ( "context" - "encoding/hex" + "math/big" + "github.com/pushchain/push-chain-node/universalClient/chains/common" "github.com/pushchain/push-chain-node/universalClient/store" + "github.com/pushchain/push-chain-node/universalClient/tss/coordinator" ) -// broadcastEVM broadcasts a signed EVM transaction. +// broadcastEVM broadcasts a signed EVM outbound transaction. // // All validators produce the same signed tx (deterministic TSS output), so the // tx hash is known before broadcasting (computed from the assembled signed tx). @@ -18,19 +20,7 @@ import ( // 3. Error → check finalized nonce on chain: // - nonce consumed (tx landed) → BROADCASTED with tx hash // - nonce NOT consumed → keep SIGNED, retry next tick -func (b *Broadcaster) broadcastEVM(ctx context.Context, event *store.Event, data *SignedEventData, chainID string) { - signingReq, err := reconstructSigningReq(data.SigningData) - if err != nil { - b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to reconstruct signing request") - return - } - - signature, err := hex.DecodeString(data.SigningData.Signature) - if err != nil { - b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to decode signature") - return - } - +func (b *Broadcaster) broadcastEVM(ctx context.Context, event *store.Event, data *SignedOutboundData, chainID string) { client, err := b.chains.GetClient(chainID) if err != nil { b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to get chain client") @@ -42,6 +32,12 @@ func (b *Broadcaster) broadcastEVM(ctx context.Context, event *store.Event, data return } + signingReq, signature, err := decodeSigningData(data.SigningData) + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to decode signing data") + return + } + // Broadcast — tx hash is computed before sending, so it's returned even on RPC error outboundData := data.OutboundCreatedEvent txHash, broadcastErr := builder.BroadcastOutboundSigningRequest(ctx, signingReq, &outboundData, signature) @@ -53,13 +49,11 @@ func (b *Broadcaster) broadcastEVM(ctx context.Context, event *store.Event, data // Broadcast failed — check if the tx landed on chain anyway (another node, or "already known") if txHash == "" { - // Tx couldn't even be assembled (bad signature, invalid data) — permanent error, retry won't help b.logger.Warn().Err(broadcastErr).Str("event_id", event.EventID).Str("chain", chainID). Msg("failed to assemble tx, will retry next tick") return } - eventNonce := data.SigningData.Nonce tssAddress := "" if b.getTSSAddress != nil { var addrErr error @@ -71,7 +65,78 @@ func (b *Broadcaster) broadcastEVM(ctx context.Context, event *store.Event, data } } - finalizedNonce, err := builder.GetNextNonce(ctx, tssAddress, true) + b.checkNonceAndMarkBroadcasted(ctx, event, builder, chainID, txHash, tssAddress, data.SigningData.Nonce, broadcastErr) +} + +// broadcastFundMigrationEVM broadcasts a signed EVM fund migration transaction. +// Same nonce-consumed recovery pattern as outbound, but uses old TSS address for nonce check. +func (b *Broadcaster) broadcastFundMigrationEVM(ctx context.Context, event *store.Event, data *SignedFundMigrationData, chainID string) { + oldTSSAddr, err := coordinator.DeriveEVMAddressFromPubkey(data.OldTssPubkey) + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to derive old TSS address") + return + } + currentTSSAddr, err := coordinator.DeriveEVMAddressFromPubkey(data.CurrentTssPubkey) + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to derive new TSS address") + return + } + + client, err := b.chains.GetClient(chainID) + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to get chain client") + return + } + builder, err := client.GetTxBuilder() + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to get tx builder") + return + } + + signingReq, signature, err := decodeSigningData(data.SigningData) + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to decode signing data") + return + } + + gasPrice := new(big.Int) + gasPrice.SetString(data.GasPrice, 10) + + migrationData := &common.FundMigrationData{ + From: oldTSSAddr, + To: currentTSSAddr, + GasPrice: gasPrice, + GasLimit: data.GasLimit, + } + + txHash, broadcastErr := builder.BroadcastFundMigrationTx(ctx, signingReq, migrationData, signature) + + if broadcastErr == nil { + b.markBroadcasted(event, chainID, txHash) + return + } + + if txHash == "" { + b.logger.Warn().Err(broadcastErr).Str("event_id", event.EventID).Str("chain", chainID). + Msg("failed to assemble fund migration tx, will retry next tick") + return + } + + // Use old TSS address for nonce check since that's the sender + b.checkNonceAndMarkBroadcasted(ctx, event, builder, chainID, txHash, oldTSSAddr, data.SigningData.Nonce, broadcastErr) +} + +// checkNonceAndMarkBroadcasted checks if a nonce has been consumed on-chain despite broadcast error. +// If consumed, the tx landed and we mark BROADCASTED. Otherwise keep SIGNED for retry. +func (b *Broadcaster) checkNonceAndMarkBroadcasted( + ctx context.Context, + event *store.Event, + builder common.TxBuilder, + chainID, txHash, signerAddr string, + eventNonce uint64, + broadcastErr error, +) { + finalizedNonce, err := builder.GetNextNonce(ctx, signerAddr, true) if err == nil && eventNonce < finalizedNonce { // Nonce consumed — tx is on chain. Mark BROADCASTED so the resolver can verify it. b.logger.Info().Err(broadcastErr).Str("event_id", event.EventID).Str("chain", chainID). diff --git a/universalClient/tss/txbroadcaster/svm.go b/universalClient/tss/txbroadcaster/svm.go index dcfa934c..70ea667b 100644 --- a/universalClient/tss/txbroadcaster/svm.go +++ b/universalClient/tss/txbroadcaster/svm.go @@ -2,7 +2,6 @@ package txbroadcaster import ( "context" - "encoding/hex" "github.com/pushchain/push-chain-node/universalClient/store" ) @@ -20,21 +19,9 @@ import ( // 3. Error → check if ExecutedTx PDA exists on-chain: // - PDA exists (another relayer already processed it) → BROADCASTED // - PDA not found (permanent failure: bad payload, simulation error) → BROADCASTED -// with empty tx hash, resolver will verify and REVERT +// with empty tx hash, resolver will verify and REVERT // - PDA check fails (RPC truly down) → stay SIGNED, retry next tick -func (b *Broadcaster) broadcastSVM(ctx context.Context, event *store.Event, data *SignedEventData, chainID string) { - signingReq, err := reconstructSigningReq(data.SigningData) - if err != nil { - b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to reconstruct signing request") - return - } - - signature, err := hex.DecodeString(data.SigningData.Signature) - if err != nil { - b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to decode signature") - return - } - +func (b *Broadcaster) broadcastSVM(ctx context.Context, event *store.Event, data *SignedOutboundData, chainID string) { client, err := b.chains.GetClient(chainID) if err != nil { b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to get chain client") @@ -46,6 +33,12 @@ func (b *Broadcaster) broadcastSVM(ctx context.Context, event *store.Event, data return } + signingReq, signature, err := decodeSigningData(data.SigningData) + if err != nil { + b.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to decode signing data") + return + } + outboundData := data.OutboundCreatedEvent txHash, broadcastErr := builder.BroadcastOutboundSigningRequest(ctx, signingReq, &outboundData, signature) diff --git a/universalClient/tss/txresolver/evm.go b/universalClient/tss/txresolver/evm.go index 77afc3a9..192192d2 100644 --- a/universalClient/tss/txresolver/evm.go +++ b/universalClient/tss/txresolver/evm.go @@ -3,38 +3,28 @@ package txresolver import ( "context" - "github.com/pushchain/push-chain-node/universalClient/chains/common" "github.com/pushchain/push-chain-node/universalClient/store" ) -// resolveEVM checks the on-chain receipt and moves the event to COMPLETED or REVERTED. -// -// EVM resolution flow: -// 1. Look up the tx receipt by hash on the destination chain. -// 2. If NOT FOUND for maxNotFoundRetries consecutive polls (~5 min): vote failure and REVERT. -// This covers cases where the tx was dropped from the mempool (gas spike, nonce replaced). -// 3. If FOUND but not enough confirmations yet: wait (retry next tick). -// 4. If FOUND with enough confirmations and receipt status == 0 (reverted): vote failure and REVERT -// with the receipt's block height and tx hash. -// 5. If FOUND with enough confirmations and receipt status == 1 (success): mark COMPLETED, -// success vote will be done by destination chain event listening. -// -// The failure vote triggers a refund of user funds on Push chain. -// -// Observation semantics for the user: -// - txHash + blockHeight → tx landed on chain (success or revert) -// - no txHash + no blockHeight → protocol issue (tx dropped, invalid hash, etc.) -func (r *Resolver) resolveEVM(ctx context.Context, event *store.Event, chainID, rawTxHash string) { - txID, utxID, err := extractOutboundIDs(event) - if err != nil { - r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to extract outbound IDs") - return - } +// txCheckResult represents the outcome of verifying a tx on chain with not-found retry handling. +type txCheckResult int + +const ( + txCheckRetry txCheckResult = iota // tx not found or not enough confirmations, retry later + txCheckMaxRetries // tx not found after max retries + txCheckReverted // tx found, confirmed, status=0 + txCheckSuccess // tx found, confirmed, status=1 +) + +// checkEVMTx verifies a tx on chain and handles the not-found retry counter. +// Returns the check result, block height, and raw tx hash for further processing. +func (r *Resolver) checkEVMTx(ctx context.Context, event *store.Event, chainID, rawTxHash string) (txCheckResult, uint64) { found, blockHeight, confirmations, status, err := r.verifyTxOnChain(ctx, chainID, rawTxHash) if err != nil { r.logger.Debug().Err(err).Str("event_id", event.EventID).Msg("tx verification error") - return + return txCheckRetry, 0 } + if !found { r.notFoundCounts[event.EventID]++ count := r.notFoundCounts[event.EventID] @@ -44,55 +34,79 @@ func (r *Resolver) resolveEVM(ctx context.Context, event *store.Event, chainID, if count >= maxNotFoundRetries { delete(r.notFoundCounts, event.EventID) - // Protocol issue: tx dropped/not found — no txHash, no height, no gas used - _ = r.voteFailureAndMarkReverted(ctx, event, txID, utxID, "", 0, "0", "tx not found on destination chain after max retries") + return txCheckMaxRetries, 0 } - return + return txCheckRetry, 0 } - // Tx found — clear any not-found tracking delete(r.notFoundCounts, event.EventID) requiredConfs := r.chains.GetStandardConfirmations(chainID) if confirmations < requiredConfs { - return // not enough confirmations yet, retry next tick + return txCheckRetry, 0 } - // Enough confirmations: finalize based on status if status == 0 { - // Destination chain revert — fetch gas used and attach receipt info + return txCheckReverted, blockHeight + } + + return txCheckSuccess, blockHeight +} + +// resolveOutboundEVM checks the on-chain receipt for an outbound EVM tx. +// Success vote is done by destination chain event listener, not here. +func (r *Resolver) resolveOutboundEVM(ctx context.Context, event *store.Event, chainID, rawTxHash string) { + txID, utxID, err := extractOutboundIDs(event) + if err != nil { + r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to extract outbound IDs") + return + } + + result, blockHeight := r.checkEVMTx(ctx, event, chainID, rawTxHash) + + switch result { + case txCheckRetry: + return + + case txCheckMaxRetries: + _ = r.voteOutboundFailureAndMarkReverted(ctx, event, txID, utxID, "", 0, "0", + "tx not found on destination chain after max retries") + + case txCheckReverted: gasFeeUsed := "0" if builder, err := r.getBuilder(chainID); err == nil { if fee, err := builder.GetGasFeeUsed(ctx, rawTxHash); err == nil { gasFeeUsed = fee } } - _ = r.voteFailureAndMarkReverted(ctx, event, txID, utxID, rawTxHash, blockHeight, gasFeeUsed, "tx execution reverted on destination chain") - return - } + _ = r.voteOutboundFailureAndMarkReverted(ctx, event, txID, utxID, rawTxHash, blockHeight, gasFeeUsed, + "tx execution reverted on destination chain") - // status == 1 (success) - if err := r.eventStore.Update(event.EventID, map[string]any{"status": store.StatusCompleted}); err != nil { - r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to mark event COMPLETED") - return + case txCheckSuccess: + // Success vote done by destination chain event listener + if err := r.eventStore.Update(event.EventID, map[string]any{"status": store.StatusCompleted}); err != nil { + r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to mark event COMPLETED") + return + } + r.logger.Info(). + Str("event_id", event.EventID).Str("tx_hash", rawTxHash). + Msg("outbound EVM tx marked COMPLETED") } - r.logger.Info(). - Str("event_id", event.EventID).Str("tx_hash", rawTxHash). - Uint64("confirmations", confirmations).Msg("broadcasted EVM tx marked COMPLETED") } -func (r *Resolver) verifyTxOnChain(ctx context.Context, chainID, txHash string) (bool, uint64, uint64, uint8, error) { - builder, err := r.getBuilder(chainID) - if err != nil { - return false, 0, 0, 0, err - } - return builder.VerifyBroadcastedTx(ctx, txHash) -} +// resolveFundMigrationEVM checks the on-chain receipt for a fund migration EVM tx. +// Votes success/failure explicitly since there is no gateway event listener for native transfers. +func (r *Resolver) resolveFundMigrationEVM(ctx context.Context, event *store.Event, chainID, rawTxHash string, migrationID uint64) { + result, _ := r.checkEVMTx(ctx, event, chainID, rawTxHash) -func (r *Resolver) getBuilder(chainID string) (common.OutboundTxBuilder, error) { - client, err := r.chains.GetClient(chainID) - if err != nil { - return nil, err + switch result { + case txCheckRetry: + return + case txCheckMaxRetries: + r.voteFundMigrationAndMark(ctx, event, migrationID, "", false) + case txCheckReverted: + r.voteFundMigrationAndMark(ctx, event, migrationID, rawTxHash, false) + case txCheckSuccess: + r.voteFundMigrationAndMark(ctx, event, migrationID, rawTxHash, true) } - return client.GetTxBuilder() } diff --git a/universalClient/tss/txresolver/resolver.go b/universalClient/tss/txresolver/resolver.go index fccd1df1..83c102fd 100644 --- a/universalClient/tss/txresolver/resolver.go +++ b/universalClient/tss/txresolver/resolver.go @@ -10,13 +10,19 @@ import ( "github.com/rs/zerolog" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/universalClient/chains" + "github.com/pushchain/push-chain-node/universalClient/chains/common" "github.com/pushchain/push-chain-node/universalClient/pushsigner" "github.com/pushchain/push-chain-node/universalClient/store" "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" ) +// --------------------------------------------------------------------------- +// Resolver +// --------------------------------------------------------------------------- + // Config holds configuration for the tx resolver. type Config struct { EventStore *eventstore.Store @@ -31,19 +37,13 @@ type Config struct { const maxNotFoundRetries = 10 // Resolver takes BROADCASTED txs and moves them to terminal status (COMPLETED or REVERTED). -// -// Chain-specific behavior: -// - EVM: Checks on-chain receipt. Success (status=1) → COMPLETED. Failure (status=0) -// or tx not found after retries → vote failure on Push chain and REVERT (refunds user). -// - SVM (Solana): Checks on-chain ExecutedTx PDA via IsAlreadyExecuted. PDA exists → -// COMPLETED. PDA absent → vote failure and REVERT. RPC error → stay BROADCASTED, retry. type Resolver struct { eventStore *eventstore.Store chains *chains.Chains pushSigner *pushsigner.Signer checkInterval time.Duration logger zerolog.Logger - notFoundCounts map[string]int // eventID → consecutive not-found count + notFoundCounts map[string]int // eventID -> consecutive not-found count } // NewResolver creates a new tx resolver. @@ -106,34 +106,119 @@ func (r *Resolver) processBroadcasted(ctx context.Context) { } } +// resolveEvent dispatches to the appropriate handler based on event type. func (r *Resolver) resolveEvent(ctx context.Context, event *store.Event) { - // Extract chain ID early to check outbound flag - chainID, rawTxHash, err := parseCAIPTxHash(event.BroadcastedTxHash) - if err == nil && !r.chains.IsChainOutboundEnabled(chainID) { - r.logger.Warn().Str("chain", chainID).Str("event_id", event.EventID). - Msg("outbound disabled for destination chain, skipping resolution") - return + switch event.Type { + case store.EventTypeSignOutbound: + r.resolveOutbound(ctx, event) + case store.EventTypeSignFundMigrate: + r.resolveFundMigration(ctx, event) + default: + r.logger.Warn().Str("event_id", event.EventID).Str("type", event.Type). + Msg("unknown broadcasted event type, skipping") } +} + +// --------------------------------------------------------------------------- +// Outbound resolution (parsing + chain dispatch) +// --------------------------------------------------------------------------- + +// resolveOutbound parses the CAIP tx hash and delegates to chain-specific resolution. +func (r *Resolver) resolveOutbound(ctx context.Context, event *store.Event) { + chainID, rawTxHash, err := parseCAIPTxHash(event.BroadcastedTxHash) if err != nil { txID, utxID, extractErr := extractOutboundIDs(event) if extractErr != nil { - r.logger.Warn().Err(extractErr).Str("event_id", event.EventID).Msg("invalid broadcasted tx hash and failed to extract outbound IDs") + r.logger.Warn().Err(extractErr).Str("event_id", event.EventID). + Msg("invalid broadcasted tx hash and failed to extract outbound IDs") return } - _ = r.voteFailureAndMarkReverted(ctx, event, txID, utxID, "", 0, "0", "invalid broadcasted tx hash format") + _ = r.voteOutboundFailureAndMarkReverted(ctx, event, txID, utxID, "", 0, "0", "invalid broadcasted tx hash format") + return + } + + if !r.chains.IsChainOutboundEnabled(chainID) { + r.logger.Warn().Str("chain", chainID).Str("event_id", event.EventID). + Msg("outbound disabled, skipping resolution") return } if r.chains.IsEVMChain(chainID) { - r.resolveEVM(ctx, event, chainID, rawTxHash) + r.resolveOutboundEVM(ctx, event, chainID, rawTxHash) + } else { + r.resolveSVM(ctx, event, chainID) + } +} + +// --------------------------------------------------------------------------- +// Fund migration resolution (parsing + EVM resolution with explicit voting) +// --------------------------------------------------------------------------- + +// resolveFundMigration resolves a SIGN_FUND_MIGRATE event. +// Unlike outbound where success voting is done by the destination chain event listener, +// fund migration requires the resolver to vote both success and failure explicitly +// since there is no gateway event to observe for native transfers. +func (r *Resolver) resolveFundMigration(ctx context.Context, event *store.Event) { + chainID, rawTxHash, err := parseCAIPTxHash(event.BroadcastedTxHash) + if err != nil { + r.logger.Warn().Err(err).Str("event_id", event.EventID). + Msg("fund migration: invalid broadcasted tx hash format") return } - // Solana (or other non-EVM): verify on-chain PDA - r.resolveSVM(ctx, event, chainID) + var migrationData utsstypes.FundMigrationInitiatedEventData + if err := json.Unmarshal(event.EventData, &migrationData); err != nil { + r.logger.Warn().Err(err).Str("event_id", event.EventID). + Msg("fund migration: failed to parse event data") + return + } + + if r.chains.IsEVMChain(chainID) { + r.resolveFundMigrationEVM(ctx, event, chainID, rawTxHash, migrationData.MigrationID) + } else { + r.logger.Warn().Str("chain", chainID).Str("event_id", event.EventID). + Msg("fund migration resolution not supported for this chain type") + } +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +func parseCAIPTxHash(caipTxHash string) (chainID, txHash string, err error) { + lastColon := strings.LastIndex(caipTxHash, ":") + if lastColon <= 0 || lastColon == len(caipTxHash)-1 { + return "", "", fmt.Errorf("invalid CAIP tx hash format: %s", caipTxHash) + } + return caipTxHash[:lastColon], caipTxHash[lastColon+1:], nil } -func (r *Resolver) voteFailureAndMarkReverted(ctx context.Context, event *store.Event, txID, utxID, txHash string, blockHeight uint64, gasFeeUsed string, errorMsg string) error { +func extractOutboundIDs(event *store.Event) (txID, utxID string, err error) { + var data uexecutortypes.OutboundCreatedEvent + if err := json.Unmarshal(event.EventData, &data); err != nil { + return "", "", fmt.Errorf("failed to parse outbound event data: %w", err) + } + return data.TxID, data.UniversalTxId, nil +} + +func (r *Resolver) getBuilder(chainID string) (common.TxBuilder, error) { + client, err := r.chains.GetClient(chainID) + if err != nil { + return nil, err + } + return client.GetTxBuilder() +} + +func (r *Resolver) verifyTxOnChain(ctx context.Context, chainID, txHash string) (bool, uint64, uint64, uint8, error) { + builder, err := r.getBuilder(chainID) + if err != nil { + return false, 0, 0, 0, err + } + return builder.VerifyBroadcastedTx(ctx, txHash) +} + +// voteOutboundFailureAndMarkReverted votes failure for an outbound event and marks it REVERTED. +func (r *Resolver) voteOutboundFailureAndMarkReverted(ctx context.Context, event *store.Event, txID, utxID, txHash string, blockHeight uint64, gasFeeUsed string, errorMsg string) error { if r.pushSigner == nil { r.logger.Warn().Str("event_id", event.EventID).Msg("pushSigner not configured, cannot vote failure") return nil @@ -150,7 +235,7 @@ func (r *Resolver) voteFailureAndMarkReverted(ctx context.Context, event *store. } voteTxHash, err := r.pushSigner.VoteOutbound(ctx, txID, utxID, observation) if err != nil { - r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to vote failure") + r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to vote outbound failure") return err } if err := r.eventStore.Update(event.EventID, map[string]any{"status": store.StatusReverted, "vote_tx_hash": voteTxHash}); err != nil { @@ -158,22 +243,36 @@ func (r *Resolver) voteFailureAndMarkReverted(ctx context.Context, event *store. } r.logger.Info(). Str("event_id", event.EventID).Str("tx_id", txID). - Str("error_msg", errorMsg).Msg("voted failure and marked REVERTED") + Str("error_msg", errorMsg).Msg("voted outbound failure and marked REVERTED") return nil } -func extractOutboundIDs(event *store.Event) (txID, utxID string, err error) { - var data uexecutortypes.OutboundCreatedEvent - if err := json.Unmarshal(event.EventData, &data); err != nil { - return "", "", fmt.Errorf("failed to parse outbound event data: %w", err) +// voteFundMigrationAndMark votes the fund migration result on Push chain and updates the event status. +func (r *Resolver) voteFundMigrationAndMark(ctx context.Context, event *store.Event, migrationID uint64, txHash string, success bool) { + if r.pushSigner == nil { + r.logger.Warn().Str("event_id", event.EventID).Msg("pushSigner not configured, cannot vote fund migration") + return } - return data.TxID, data.UniversalTxId, nil -} -func parseCAIPTxHash(caipTxHash string) (chainID, txHash string, err error) { - lastColon := strings.LastIndex(caipTxHash, ":") - if lastColon <= 0 || lastColon == len(caipTxHash)-1 { - return "", "", fmt.Errorf("invalid CAIP tx hash format: %s", caipTxHash) + voteTxHash, err := r.pushSigner.VoteFundMigration(ctx, migrationID, txHash, success) + if err != nil { + r.logger.Warn().Err(err).Str("event_id", event.EventID).Uint64("migration_id", migrationID). + Msg("failed to vote fund migration") + return } - return caipTxHash[:lastColon], caipTxHash[lastColon+1:], nil + + newStatus := store.StatusCompleted + if !success { + newStatus = store.StatusReverted + } + + if err := r.eventStore.Update(event.EventID, map[string]any{"status": newStatus, "vote_tx_hash": voteTxHash}); err != nil { + r.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to update fund migration event status") + return + } + + r.logger.Info(). + Str("event_id", event.EventID).Uint64("migration_id", migrationID). + Str("tx_hash", txHash).Bool("success", success).Str("status", newStatus). + Msg("voted fund migration and updated status") } diff --git a/universalClient/tss/txresolver/resolver_test.go b/universalClient/tss/txresolver/resolver_test.go index ae621365..90fa7c62 100644 --- a/universalClient/tss/txresolver/resolver_test.go +++ b/universalClient/tss/txresolver/resolver_test.go @@ -16,6 +16,7 @@ import ( uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/universalClient/chains" "github.com/pushchain/push-chain-node/universalClient/chains/common" @@ -30,12 +31,12 @@ import ( type mockTxBuilder struct{ mock.Mock } -func (m *mockTxBuilder) GetOutboundSigningRequest(ctx context.Context, data *uexecutortypes.OutboundCreatedEvent, nonce uint64) (*common.UnSignedOutboundTxReq, error) { +func (m *mockTxBuilder) GetOutboundSigningRequest(ctx context.Context, data *uexecutortypes.OutboundCreatedEvent, nonce uint64) (*common.UnsignedSigningReq, error) { args := m.Called(ctx, data, nonce) if args.Get(0) == nil { return nil, args.Error(1) } - return args.Get(0).(*common.UnSignedOutboundTxReq), args.Error(1) + return args.Get(0).(*common.UnsignedSigningReq), args.Error(1) } func (m *mockTxBuilder) GetNextNonce(ctx context.Context, addr string, useFinalized bool) (uint64, error) { @@ -43,7 +44,7 @@ func (m *mockTxBuilder) GetNextNonce(ctx context.Context, addr string, useFinali return args.Get(0).(uint64), args.Error(1) } -func (m *mockTxBuilder) BroadcastOutboundSigningRequest(ctx context.Context, req *common.UnSignedOutboundTxReq, data *uexecutortypes.OutboundCreatedEvent, sig []byte) (string, error) { +func (m *mockTxBuilder) BroadcastOutboundSigningRequest(ctx context.Context, req *common.UnsignedSigningReq, data *uexecutortypes.OutboundCreatedEvent, sig []byte) (string, error) { args := m.Called(ctx, req, data, sig) return args.String(0), args.Error(1) } @@ -63,12 +64,25 @@ func (m *mockTxBuilder) GetGasFeeUsed(ctx context.Context, txHash string) (strin return args.String(0), args.Error(1) } +func (m *mockTxBuilder) GetFundMigrationSigningRequest(ctx context.Context, data *common.FundMigrationData, nonce uint64) (*common.UnsignedSigningReq, error) { + args := m.Called(ctx, data, nonce) + if args.Get(0) == nil { + return nil, args.Error(1) + } + return args.Get(0).(*common.UnsignedSigningReq), args.Error(1) +} + +func (m *mockTxBuilder) BroadcastFundMigrationTx(ctx context.Context, req *common.UnsignedSigningReq, data *common.FundMigrationData, sig []byte) (string, error) { + args := m.Called(ctx, req, data, sig) + return args.String(0), args.Error(1) +} + type mockChainClient struct{ builder *mockTxBuilder } func (m *mockChainClient) Start(context.Context) error { return nil } func (m *mockChainClient) Stop() error { return nil } func (m *mockChainClient) IsHealthy() bool { return true } -func (m *mockChainClient) GetTxBuilder() (common.OutboundTxBuilder, error) { return m.builder, nil } +func (m *mockChainClient) GetTxBuilder() (common.TxBuilder, error) { return m.builder, nil } // --------------------------------------------------------------------------- // Helpers @@ -122,7 +136,7 @@ func insertBroadcastedEvent(t *testing.T, db *gorm.DB, eventID, destChain, broad EventID: eventID, BlockHeight: 100, ExpiryBlockHeight: 99999, - Type: "SIGN", + Type: "SIGN_OUTBOUND", ConfirmationType: "STANDARD", Status: store.StatusBroadcasted, EventData: eventData, @@ -268,7 +282,7 @@ func TestSVM_PDANotFound_VotesFailureAndReverts(t *testing.T) { ev := getEvent(t, db, "ev-1") resolver.resolveSVM(context.Background(), &ev, "solana:mainnet") - // With no push signer, voteFailureAndMarkReverted returns nil early (logs warning). + // With no push signer, voteOutboundFailureAndMarkReverted returns nil early (logs warning). // The event stays BROADCASTED because the vote+revert is skipped. updated := getEvent(t, db, "ev-1") require.Equal(t, store.StatusBroadcasted, updated.Status) @@ -409,7 +423,7 @@ func TestNotFoundCountTracking(t *testing.T) { } // --------------------------------------------------------------------------- -// voteFailureAndMarkReverted tests +// voteOutboundFailureAndMarkReverted tests // --------------------------------------------------------------------------- func TestVoteFailureAndMarkReverted(t *testing.T) { @@ -422,11 +436,127 @@ func TestVoteFailureAndMarkReverted(t *testing.T) { }) event := &store.Event{EventID: "ev-1"} - err := resolver.voteFailureAndMarkReverted(context.Background(), event, "tx-1", "utx-1", "0xhash", 12345, "0", "some error") + err := resolver.voteOutboundFailureAndMarkReverted(context.Background(), event, "tx-1", "utx-1", "0xhash", 12345, "0", "some error") assert.NoError(t, err) }) } +// --------------------------------------------------------------------------- +// Fund migration EVM resolution tests +// --------------------------------------------------------------------------- + +func makeFundMigrationEventData(migrationID uint64, chain string) []byte { + data := utsstypes.FundMigrationInitiatedEventData{ + MigrationID: migrationID, + Chain: chain, + } + b, _ := json.Marshal(data) + return b +} + +func insertBroadcastedFundMigrationEvent(t *testing.T, db *gorm.DB, eventID, chain, broadcastedTxHash string, migrationID uint64) { + t.Helper() + event := store.Event{ + EventID: eventID, + BlockHeight: 100, + ExpiryBlockHeight: 99999, + Type: store.EventTypeSignFundMigrate, + ConfirmationType: "INSTANT", + Status: store.StatusBroadcasted, + EventData: makeFundMigrationEventData(migrationID, chain), + BroadcastedTxHash: broadcastedTxHash, + } + require.NoError(t, db.Create(&event).Error) +} + +func TestFundMigrationEVM_TxSuccess_VotesSuccessAndCompletes(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertBroadcastedFundMigrationEvent(t, db, "fm-1", "eip155:1", "eip155:1:0xmigrate123", 42) + + // Tx found, confirmed, status=1 (success) + builder.On("VerifyBroadcastedTx", mock.Anything, "0xmigrate123"). + Return(true, uint64(500), uint64(20), uint8(1), nil) + + // No pushSigner — voteFundMigrationAndMark logs warning but doesn't panic + resolver := newResolver(evtStore, ch) + resolver.processBroadcasted(context.Background()) + + // Without pushSigner, vote is skipped so status stays BROADCASTED + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) +} + +func TestFundMigrationEVM_TxReverted_VotesFailure(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertBroadcastedFundMigrationEvent(t, db, "fm-1", "eip155:1", "eip155:1:0xfailed", 42) + + // Tx found, confirmed, status=0 (reverted) + builder.On("VerifyBroadcastedTx", mock.Anything, "0xfailed"). + Return(true, uint64(500), uint64(20), uint8(0), nil) + + resolver := newResolver(evtStore, ch) + resolver.processBroadcasted(context.Background()) + + // Without pushSigner, vote is skipped so status stays BROADCASTED + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) +} + +func TestFundMigrationEVM_TxNotFound_RetriesAndReverts(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertBroadcastedFundMigrationEvent(t, db, "fm-1", "eip155:1", "eip155:1:0xnotfound", 42) + + // Tx not found + builder.On("VerifyBroadcastedTx", mock.Anything, "0xnotfound"). + Return(false, uint64(0), uint64(0), uint8(0), nil) + + resolver := newResolver(evtStore, ch) + + // Should increment not found count each time, stay BROADCASTED + for i := 0; i < maxNotFoundRetries-1; i++ { + resolver.processBroadcasted(context.Background()) + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) + } + + // On max retries, without pushSigner vote is skipped + resolver.processBroadcasted(context.Background()) + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) // no signer = no revert +} + +func TestFundMigrationEVM_InsufficientConfirmations_Retries(t *testing.T) { + evtStore, db := setupTestDB(t) + builder := &mockTxBuilder{} + client := &mockChainClient{builder: builder} + ch := newTestChains(t, "eip155:1", uregistrytypes.VmType_EVM, client) + + insertBroadcastedFundMigrationEvent(t, db, "fm-1", "eip155:1", "eip155:1:0xpending", 42) + + // Tx found but only 2 confirmations (needs more) + builder.On("VerifyBroadcastedTx", mock.Anything, "0xpending"). + Return(true, uint64(500), uint64(2), uint8(1), nil) + + resolver := newResolver(evtStore, ch) + resolver.processBroadcasted(context.Background()) + + // Not enough confirmations, stays BROADCASTED + ev := getEvent(t, db, "fm-1") + require.Equal(t, store.StatusBroadcasted, ev.Status) +} + // --------------------------------------------------------------------------- // constants tests // --------------------------------------------------------------------------- diff --git a/universalClient/tss/txresolver/svm.go b/universalClient/tss/txresolver/svm.go index f0e9c0de..6243afa5 100644 --- a/universalClient/tss/txresolver/svm.go +++ b/universalClient/tss/txresolver/svm.go @@ -54,5 +54,5 @@ func (r *Resolver) resolveSVM(ctx context.Context, event *store.Event, chainID s } // PDA not found — tx was not executed on destination chain, no gas consumed - _ = r.voteFailureAndMarkReverted(ctx, event, txID, utxID, "", 0, "0", "tx not executed on destination chain") + _ = r.voteOutboundFailureAndMarkReverted(ctx, event, txID, utxID, "", 0, "0", "tx not executed on destination chain") } diff --git a/x/uexecutor/keeper/evm.go b/x/uexecutor/keeper/evm.go index 0c43939b..4ab68c40 100644 --- a/x/uexecutor/keeper/evm.go +++ b/x/uexecutor/keeper/evm.go @@ -386,6 +386,30 @@ func (k Keeper) CallUniversalCoreSetChainMeta( ) } +// GetGasPriceByChain reads the gas price for a chain from the UniversalCore contract. +func (k Keeper) GetGasPriceByChain(ctx sdk.Context, chainNamespace string) (*big.Int, error) { + handlerAddr := common.HexToAddress(uregistrytypes.SYSTEM_CONTRACTS["UNIVERSAL_CORE"].Address) + + abi, err := types.ParseUniversalCoreABI() + if err != nil { + return nil, errors.Wrap(err, "failed to parse UniversalCore ABI") + } + + ueModuleAccAddress, _ := k.GetUeModuleAddress(ctx) + + receipt, err := k.evmKeeper.CallEVM(ctx, abi, ueModuleAccAddress, handlerAddr, false, "gasPriceByChainNamespace", chainNamespace) + if err != nil { + return nil, errors.Wrap(err, "failed to call gasPriceByChainNamespace") + } + + results, err := abi.Methods["gasPriceByChainNamespace"].Outputs.Unpack(receipt.Ret) + if err != nil { + return nil, errors.Wrap(err, "failed to unpack gasPriceByChainNamespace result") + } + + return results[0].(*big.Int), nil +} + // GetUniversalCoreQuoterAddress reads the uniswapV3Quoter address stored in UniversalCore. func (k Keeper) GetUniversalCoreQuoterAddress(ctx sdk.Context) (common.Address, error) { handlerAddr := common.HexToAddress(uregistrytypes.SYSTEM_CONTRACTS["UNIVERSAL_CORE"].Address) diff --git a/x/uexecutor/keeper/pending_outbound_query.go b/x/uexecutor/keeper/pending_outbound_query.go new file mode 100644 index 00000000..39688a3d --- /dev/null +++ b/x/uexecutor/keeper/pending_outbound_query.go @@ -0,0 +1,34 @@ +package keeper + +import ( + "context" + + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +// HasPendingOutboundsForChain checks if there are any pending outbounds for a given chain. +// It walks PendingOutbounds and joins against UniversalTx to check destination_chain. +// Returns true on first match. This is O(n) but only called during admin-initiated migration. +func (k Keeper) HasPendingOutboundsForChain(ctx context.Context, chain string) (bool, error) { + var found bool + err := k.PendingOutbounds.Walk(ctx, nil, func(outboundId string, entry types.PendingOutboundEntry) (bool, error) { + utx, exists, err := k.GetUniversalTx(ctx, entry.UniversalTxId) + if err != nil { + return true, err + } + if !exists { + return false, nil + } + for _, ob := range utx.OutboundTx { + if ob.DestinationChain == chain && ob.Id == outboundId { + found = true + return true, nil // stop walking + } + } + return false, nil + }) + if err != nil { + return false, err + } + return found, nil +} diff --git a/x/utss/depinject.go b/x/utss/depinject.go index 542c9db5..d153c8c8 100755 --- a/x/utss/depinject.go +++ b/x/utss/depinject.go @@ -46,6 +46,8 @@ type ModuleInputs struct { StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper UValidatorKeeper types.UValidatorKeeper + URegistryKeeper types.URegistryKeeper + UExecutorKeeper types.UExecutorKeeper } type ModuleOutputs struct { @@ -58,7 +60,7 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.UValidatorKeeper) + k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.UValidatorKeeper, in.URegistryKeeper, in.UExecutorKeeper) m := NewAppModule(in.Cdc, k, in.UValidatorKeeper) return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} diff --git a/x/utss/keeper/keeper.go b/x/utss/keeper/keeper.go index 03c13335..3630512d 100755 --- a/x/utss/keeper/keeper.go +++ b/x/utss/keeper/keeper.go @@ -36,8 +36,15 @@ type Keeper struct { NextTssEventId collections.Sequence // auto-increment counter for event IDs PendingTssEvents collections.Map[uint64, uint64] // Key: process_id -> Value: event_id (ACTIVE only) + // Fund Migration Storage + FundMigrations collections.Map[uint64, types.FundMigration] // migration_id -> FundMigration + NextMigrationId collections.Sequence // auto-increment counter for migration IDs + PendingMigrations collections.Map[uint64, uint64] // migration_id -> migration_id (pending index) + // keepers uvalidatorKeeper types.UValidatorKeeper + uregistryKeeper types.URegistryKeeper + uexecutorKeeper types.UExecutorKeeper authority string } @@ -49,6 +56,8 @@ func NewKeeper( logger log.Logger, authority string, uvalidatorKeeper types.UValidatorKeeper, + uregistryKeeper types.URegistryKeeper, + uexecutorKeeper types.UExecutorKeeper, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) @@ -77,8 +86,15 @@ func NewKeeper( NextTssEventId: collections.NewSequence(sb, types.NextTssEventIdKey, types.NextTssEventIdName), PendingTssEvents: collections.NewMap(sb, types.PendingTssEventsKey, types.PendingTssEventsName, collections.Uint64Key, collections.Uint64Value), + // Fund migration storage + FundMigrations: collections.NewMap(sb, types.FundMigrationsKey, types.FundMigrationsName, collections.Uint64Key, codec.CollValue[types.FundMigration](cdc)), + NextMigrationId: collections.NewSequence(sb, types.NextMigrationIdKey, types.NextMigrationIdName), + PendingMigrations: collections.NewMap(sb, types.PendingMigrationsKey, types.PendingMigrationsName, collections.Uint64Key, collections.Uint64Value), + authority: authority, uvalidatorKeeper: uvalidatorKeeper, + uregistryKeeper: uregistryKeeper, + uexecutorKeeper: uexecutorKeeper, } return k @@ -148,6 +164,25 @@ func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) erro } } + // Restore FundMigrations + for _, entry := range data.FundMigrations { + if err := k.FundMigrations.Set(ctx, entry.Key, entry.Value); err != nil { + return err + } + if entry.Value.Status == types.FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING { + if err := k.PendingMigrations.Set(ctx, entry.Key, entry.Key); err != nil { + return err + } + } + } + + // Restore NextMigrationId + if data.NextMigrationId > 0 { + if err := k.NextMigrationId.Set(ctx, data.NextMigrationId); err != nil { + return err + } + } + return nil } @@ -218,6 +253,22 @@ func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { panic(err) } + // Export FundMigrations + var fundMigrations []types.FundMigrationEntry + err = k.FundMigrations.Walk(ctx, nil, func(key uint64, value types.FundMigration) (bool, error) { + fundMigrations = append(fundMigrations, types.FundMigrationEntry{Key: key, Value: value}) + return false, nil + }) + if err != nil { + panic(err) + } + + // Export NextMigrationId + nextMigrationId, err := k.NextMigrationId.Peek(ctx) + if err != nil { + panic(err) + } + return &types.GenesisState{ Params: params, CurrentTssProcess: currentTssProcess, @@ -227,6 +278,8 @@ func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { NextProcessId: nextProcessId, TssEvents: tssEvents, NextTssEventId: nextTssEventId, + FundMigrations: fundMigrations, + NextMigrationId: nextMigrationId, } } @@ -237,3 +290,4 @@ func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { func (k Keeper) GetUValidatorKeeper() types.UValidatorKeeper { return k.uvalidatorKeeper } + diff --git a/x/utss/keeper/keeper_test.go b/x/utss/keeper/keeper_test.go index 8ab7d736..da1d661b 100755 --- a/x/utss/keeper/keeper_test.go +++ b/x/utss/keeper/keeper_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "context" + "math/big" "testing" "github.com/stretchr/testify/suite" @@ -34,6 +36,24 @@ import ( uvalidatorKeeper "github.com/pushchain/push-chain-node/x/uvalidator/keeper" ) +// mockURegistryKeeper implements types.URegistryKeeper for unit tests. +type mockURegistryKeeper struct{} + +func (m mockURegistryKeeper) IsChainOutboundEnabled(_ context.Context, _ string) (bool, error) { + return false, nil +} + +// mockUExecutorKeeper implements types.UExecutorKeeper for unit tests. +type mockUExecutorKeeper struct{} + +func (m mockUExecutorKeeper) HasPendingOutboundsForChain(_ context.Context, _ string) (bool, error) { + return false, nil +} + +func (m mockUExecutorKeeper) GetGasPriceByChain(_ sdk.Context, _ string) (*big.Int, error) { + return big.NewInt(1000000000), nil // 1 gwei +} + var maccPerms = map[string][]string{ authtypes.FeeCollectorName: nil, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -88,7 +108,7 @@ func SetupTest(t *testing.T) *testFixture { registerBaseSDKModules(logger, f, encCfg, keys, accountAddressCodec, validatorAddressCodec, consensusAddressCodec) // Setup Keeper. - f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, &uvalidatorKeeper.Keeper{}) + f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, &uvalidatorKeeper.Keeper{}, mockURegistryKeeper{}, mockUExecutorKeeper{}) f.msgServer = keeper.NewMsgServerImpl(f.k) f.queryServer = keeper.NewQuerier(f.k) f.appModule = module.NewAppModule(encCfg.Codec, f.k, &uvalidatorKeeper.Keeper{}) diff --git a/x/utss/keeper/msg_initiate_fund_migration.go b/x/utss/keeper/msg_initiate_fund_migration.go new file mode 100644 index 00000000..e3c5b18c --- /dev/null +++ b/x/utss/keeper/msg_initiate_fund_migration.go @@ -0,0 +1,134 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +const nativeTransferGasLimit = 21000 + +// InitiateFundMigration validates and creates a fund migration from an old TSS key vault +// to the current TSS key vault for a specific chain. +func (k Keeper) InitiateFundMigration(ctx context.Context, oldKeyId, chain string) (uint64, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // 1. Validate old key exists in history + oldKey, err := k.TssKeyHistory.Get(ctx, oldKeyId) + if err != nil { + return 0, fmt.Errorf("old key %s not found in TssKeyHistory: %w", oldKeyId, err) + } + + // 2. Verify old key was produced by keygen (not refresh or quorum change) + process, err := k.ProcessHistory.Get(ctx, oldKey.ProcessId) + if err != nil { + return 0, fmt.Errorf("process %d for key %s not found: %w", oldKey.ProcessId, oldKeyId, err) + } + if process.ProcessType != types.TssProcessType_TSS_PROCESS_KEYGEN { + return 0, fmt.Errorf("key %s was produced by %s, not keygen; migration only needed after keygen", + oldKeyId, process.ProcessType.String()) + } + + // 3. Verify old key != current key + currentKey, err := k.CurrentTssKey.Get(ctx) + if err != nil { + return 0, fmt.Errorf("no current TSS key set: %w", err) + } + if oldKeyId == currentKey.KeyId { + return 0, fmt.Errorf("old_key_id %s is the current active key; cannot migrate from current key", oldKeyId) + } + + // 4. Verify outbound is disabled for this chain + outboundEnabled, err := k.uregistryKeeper.IsChainOutboundEnabled(ctx, chain) + if err != nil { + return 0, fmt.Errorf("failed to check outbound status for chain %s: %w", chain, err) + } + if outboundEnabled { + return 0, fmt.Errorf("outbound is still enabled for chain %s; disable outbound before initiating migration", chain) + } + + // 5. Verify no pending outbounds for this chain + hasPending, err := k.uexecutorKeeper.HasPendingOutboundsForChain(ctx, chain) + if err != nil { + return 0, fmt.Errorf("failed to check pending outbounds for chain %s: %w", chain, err) + } + if hasPending { + return 0, fmt.Errorf("chain %s still has pending outbounds; wait for them to drain before migration", chain) + } + + // 6. Check no existing PENDING migration for this chain + err = k.PendingMigrations.Walk(ctx, nil, func(migrationId uint64, _ uint64) (bool, error) { + m, err := k.FundMigrations.Get(ctx, migrationId) + if err != nil { + return true, err + } + if m.Chain == chain { + return true, fmt.Errorf("pending migration already exists for chain %s (migration_id: %d, old_key: %s)", + chain, migrationId, m.OldKeyId) + } + return false, nil + }) + if err != nil { + return 0, err + } + + // 7. Fetch gas price from EVM oracle + gasPrice, err := k.uexecutorKeeper.GetGasPriceByChain(sdkCtx, chain) + if err != nil { + return 0, fmt.Errorf("failed to get gas price for chain %s: %w", chain, err) + } + + // 8. Create migration record + migrationId, err := k.NextMigrationId.Next(ctx) + if err != nil { + return 0, fmt.Errorf("failed to get next migration id: %w", err) + } + + migration := types.FundMigration{ + Id: migrationId, + OldKeyId: oldKeyId, + OldTssPubkey: oldKey.TssPubkey, + CurrentKeyId: currentKey.KeyId, + CurrentTssPubkey: currentKey.TssPubkey, + Chain: chain, + Status: types.FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING, + InitiatedBlock: sdkCtx.BlockHeight(), + GasPrice: gasPrice.String(), + GasLimit: nativeTransferGasLimit, + } + + if err := k.FundMigrations.Set(ctx, migrationId, migration); err != nil { + return 0, fmt.Errorf("failed to store fund migration: %w", err) + } + if err := k.PendingMigrations.Set(ctx, migrationId, migrationId); err != nil { + return 0, fmt.Errorf("failed to store pending migration index: %w", err) + } + + // 8. Emit event + event, err := types.NewFundMigrationInitiatedEvent(types.FundMigrationInitiatedEventData{ + MigrationID: migrationId, + OldKeyID: oldKeyId, + OldTssPubkey: oldKey.TssPubkey, + CurrentKeyID: currentKey.KeyId, + CurrentTssPubkey: currentKey.TssPubkey, + Chain: chain, + BlockHeight: sdkCtx.BlockHeight(), + GasPrice: gasPrice.String(), + GasLimit: nativeTransferGasLimit, + }) + if err != nil { + return 0, fmt.Errorf("failed to create migration event: %w", err) + } + sdkCtx.EventManager().EmitEvent(event) + + k.Logger().Info("fund migration initiated", + "migration_id", migrationId, + "old_key_id", oldKeyId, + "current_key_id", currentKey.KeyId, + "chain", chain, + ) + + return migrationId, nil +} diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go index f89ed16d..ff5ff890 100755 --- a/x/utss/keeper/msg_server.go +++ b/x/utss/keeper/msg_server.go @@ -91,3 +91,55 @@ func (ms msgServer) VoteTssKeyProcess(ctx context.Context, msg *types.MsgVoteTss return &types.MsgVoteTssKeyProcessResponse{}, nil } + +// InitiateFundMigration implements types.MsgServer. +func (ms msgServer) InitiateFundMigration(ctx context.Context, msg *types.MsgInitiateFundMigration) (*types.MsgInitiateFundMigrationResponse, error) { + // Verify admin authority + params, err := ms.k.Params.Get(ctx) + if err != nil { + return nil, errors.Wrapf(err, "failed to get params") + } + if params.Admin != msg.Signer { + return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + } + + migrationId, err := ms.k.InitiateFundMigration(ctx, msg.OldKeyId, msg.Chain) + if err != nil { + return nil, err + } + + return &types.MsgInitiateFundMigrationResponse{MigrationId: migrationId}, nil +} + +// VoteFundMigration implements types.MsgServer. +func (ms msgServer) VoteFundMigration(ctx context.Context, msg *types.MsgVoteFundMigration) (*types.MsgVoteFundMigrationResponse, error) { + signerAccAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, fmt.Errorf("invalid signer address: %w", err) + } + + signerValAddr := sdk.ValAddress(signerAccAddr) + + isBonded, err := ms.k.uvalidatorKeeper.IsBondedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check bonded status for signer %s", msg.Signer) + } + if !isBonded { + return nil, fmt.Errorf("universal validator for signer %s is not bonded", msg.Signer) + } + + isTombstoned, err := ms.k.uvalidatorKeeper.IsTombstonedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check tombstoned status for signer %s", msg.Signer) + } + if isTombstoned { + return nil, fmt.Errorf("universal validator for signer %s is tombstoned", msg.Signer) + } + + err = ms.k.VoteFundMigration(ctx, signerValAddr, msg.MigrationId, msg.TxHash, msg.Success) + if err != nil { + return nil, err + } + + return &types.MsgVoteFundMigrationResponse{}, nil +} diff --git a/x/utss/keeper/msg_vote_fund_migration.go b/x/utss/keeper/msg_vote_fund_migration.go new file mode 100644 index 00000000..00292c2d --- /dev/null +++ b/x/utss/keeper/msg_vote_fund_migration.go @@ -0,0 +1,98 @@ +package keeper + +import ( + "context" + "fmt" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// VoteFundMigration handles a validator's vote on an observed fund migration tx. +func (k Keeper) VoteFundMigration( + ctx context.Context, + universalValidator sdk.ValAddress, + migrationId uint64, + txHash string, + success bool, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Step 1: Fetch migration and verify it's pending + migration, err := k.FundMigrations.Get(ctx, migrationId) + if err != nil { + return fmt.Errorf("fund migration %d not found: %w", migrationId, err) + } + if migration.Status != types.FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING { + return fmt.Errorf("fund migration %d is already finalized (status: %s)", migrationId, migration.Status.String()) + } + + k.Logger().Info("fund migration vote received", + "migration_id", migrationId, + "validator", universalValidator.String(), + "tx_hash", txHash, + "success", success, + ) + + // Step 2: Vote on ballot using CacheContext for atomicity + tmpCtx, commit := sdkCtx.CacheContext() + + isFinalized, _, err := k.VoteOnFundMigrationBallot(tmpCtx, universalValidator, migrationId, txHash, success) + if err != nil { + return errors.Wrap(err, "failed to vote on fund migration ballot") + } + + // Step 3: If not finalized yet, commit only the vote and return + if !isFinalized { + k.Logger().Debug("fund migration vote recorded, awaiting quorum", + "migration_id", migrationId, + "validator", universalValidator.String(), + ) + commit() + return nil + } + + // Step 4: Ballot finalized — update migration state + if success { + migration.Status = types.FundMigrationStatus_FUND_MIGRATION_STATUS_COMPLETED + } else { + migration.Status = types.FundMigrationStatus_FUND_MIGRATION_STATUS_FAILED + } + migration.CompletedBlock = sdkCtx.BlockHeight() + migration.TxHash = txHash + + if err := k.FundMigrations.Set(tmpCtx, migrationId, migration); err != nil { + return errors.Wrap(err, "failed to update fund migration") + } + + // Remove from pending index + if err := k.PendingMigrations.Remove(tmpCtx, migrationId); err != nil { + return errors.Wrap(err, "failed to remove pending migration index") + } + + // Commit all changes atomically + commit() + + // Step 5: Emit completion event + event, err := types.NewFundMigrationCompletedEvent(types.FundMigrationCompletedEventData{ + MigrationID: migrationId, + Chain: migration.Chain, + TxHash: txHash, + Success: success, + BlockHeight: sdkCtx.BlockHeight(), + }) + if err != nil { + return errors.Wrap(err, "failed to create migration completed event") + } + sdkCtx.EventManager().EmitEvent(event) + + k.Logger().Info("fund migration finalized", + "migration_id", migrationId, + "chain", migration.Chain, + "success", success, + "tx_hash", txHash, + ) + + return nil +} diff --git a/x/utss/keeper/query_server.go b/x/utss/keeper/query_server.go index 92c362a6..3d43b97d 100755 --- a/x/utss/keeper/query_server.go +++ b/x/utss/keeper/query_server.go @@ -215,3 +215,58 @@ func (k Querier) AllPendingTssEvents(goCtx context.Context, req *types.QueryAllP Pagination: pageRes, }, nil } + +// GetFundMigration implements types.QueryServer. +func (k Querier) GetFundMigration(goCtx context.Context, req *types.QueryGetFundMigrationRequest) (*types.QueryGetFundMigrationResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + migration, err := k.Keeper.FundMigrations.Get(ctx, req.Id) + if err != nil { + return nil, err + } + + return &types.QueryGetFundMigrationResponse{Migration: &migration}, nil +} + +// PendingFundMigrations implements types.QueryServer. +func (k Querier) PendingFundMigrations(goCtx context.Context, req *types.QueryPendingFundMigrationsRequest) (*types.QueryPendingFundMigrationsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + var migrations []*types.FundMigration + err := k.Keeper.PendingMigrations.Walk(ctx, nil, func(migrationId uint64, _ uint64) (bool, error) { + m, err := k.Keeper.FundMigrations.Get(ctx, migrationId) + if err != nil { + return true, err + } + migrations = append(migrations, &m) + return false, nil + }) + if err != nil { + return nil, err + } + + return &types.QueryPendingFundMigrationsResponse{Migrations: migrations}, nil +} + +// AllFundMigrations implements types.QueryServer. +func (k Querier) AllFundMigrations(goCtx context.Context, req *types.QueryAllFundMigrationsRequest) (*types.QueryAllFundMigrationsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + results, pageRes, err := query.CollectionPaginate( + ctx, + k.Keeper.FundMigrations, + req.Pagination, + func(id uint64, migration types.FundMigration) (*types.FundMigration, error) { + m := migration + return &m, nil + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryAllFundMigrationsResponse{ + Migrations: results, + Pagination: pageRes, + }, nil +} diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go index 7f4b6100..a705128d 100644 --- a/x/utss/keeper/voting.go +++ b/x/utss/keeper/voting.go @@ -92,3 +92,70 @@ func (k Keeper) VoteOnTssBallot( return isFinalized, isNew, nil } + +const ( + // FundMigration uses 2/3 quorum like outbound observations + fundMigrationVotesNumerator = 2 + fundMigrationVotesDenominator = 3 + fundMigrationExpiryBlocks = 100_000_000 +) + +func (k Keeper) VoteOnFundMigrationBallot( + ctx context.Context, + universalValidator sdk.ValAddress, + migrationId uint64, + txHash string, + success bool, +) (isFinalized bool, isNew bool, err error) { + + ballotKey := types.GetFundMigrationBallotKey(migrationId, txHash, success) + + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return false, false, err + } + + totalValidators := len(universalValidatorSet) + votesNeeded := (fundMigrationVotesNumerator*totalValidators)/fundMigrationVotesDenominator + 1 + + validatorStrs := make([]string, len(universalValidatorSet)) + for i, v := range universalValidatorSet { + validatorStrs[i] = v.IdentifyInfo.CoreValidatorAddress + } + + voteResult := uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS + if !success { + voteResult = uvalidatortypes.VoteResult_VOTE_RESULT_FAILURE + } + + k.Logger().Debug("voting on fund migration ballot", + "ballot_key", ballotKey, + "validator", universalValidator.String(), + "migration_id", migrationId, + "total_validators", totalValidators, + "votes_needed", votesNeeded, + ) + + _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( + ctx, + ballotKey, + uvalidatortypes.BallotObservationType_BALLOT_OBSERVATION_TYPE_FUND_MIGRATION, + universalValidator.String(), + voteResult, + validatorStrs, + int64(votesNeeded), + int64(fundMigrationExpiryBlocks), + ) + if err != nil { + return false, false, err + } + + if isNew { + k.Logger().Debug("fund migration ballot created", "ballot_key", ballotKey, "migration_id", migrationId) + } + if isFinalized { + k.Logger().Info("fund migration ballot finalized", "ballot_key", ballotKey, "migration_id", migrationId) + } + + return isFinalized, isNew, nil +} diff --git a/x/utss/module.go b/x/utss/module.go index 501cb557..c6420aeb 100755 --- a/x/utss/module.go +++ b/x/utss/module.go @@ -25,8 +25,8 @@ import ( const ( // ConsensusVersion defines the current x/utss module consensus version. - // Bumped to 2: added TssEvents and NextTssEventId collections. - ConsensusVersion = 2 + // Bumped to 3: added FundMigrations, NextMigrationId, PendingMigrations collections. + ConsensusVersion = 3 ) var ( @@ -146,11 +146,17 @@ func (a AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) // Register migration from v1 → v2 (added TssEvents + NextTssEventId collections). - // The new collections start empty; the upgrade handler (tss-events-store) backfills them. if err := cfg.RegisterMigration(types.ModuleName, 1, func(ctx sdk.Context) error { return nil // no-op: new collections are initialized empty by the schema builder }); err != nil { - panic(fmt.Sprintf("failed to register utss migration: %v", err)) + panic(fmt.Sprintf("failed to register utss v1->v2 migration: %v", err)) + } + + // Register migration from v2 → v3 (added FundMigrations, NextMigrationId, PendingMigrations). + if err := cfg.RegisterMigration(types.ModuleName, 2, func(ctx sdk.Context) error { + return nil // no-op: new collections are initialized empty by the schema builder + }); err != nil { + panic(fmt.Sprintf("failed to register utss v2->v3 migration: %v", err)) } } diff --git a/x/utss/types/events.go b/x/utss/types/events.go index c59b515f..f56ae04c 100644 --- a/x/utss/types/events.go +++ b/x/utss/types/events.go @@ -88,3 +88,76 @@ func (e TssKeyFinalizedEvent) String() string { e.ProcessID, e.KeyID, e.TssPubKey, ) } + +// ----------------------------------------------------------------------------- +// Fund Migration Events +// ----------------------------------------------------------------------------- + +const ( + EventTypeFundMigrationInitiated = "fund_migration_initiated" + EventTypeFundMigrationCompleted = "fund_migration_completed" +) + +// FundMigrationInitiatedEventData represents the emitted event when fund migration is initiated. +type FundMigrationInitiatedEventData struct { + MigrationID uint64 `json:"migration_id"` + OldKeyID string `json:"old_key_id"` + OldTssPubkey string `json:"old_tss_pubkey"` + CurrentKeyID string `json:"current_key_id"` + CurrentTssPubkey string `json:"current_tss_pubkey"` + Chain string `json:"chain"` + BlockHeight int64 `json:"block_height"` + GasPrice string `json:"gas_price"` + GasLimit uint64 `json:"gas_limit"` +} + +// NewFundMigrationInitiatedEvent creates and returns a Cosmos SDK event. +func NewFundMigrationInitiatedEvent(e FundMigrationInitiatedEventData) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) + } + + event := sdk.NewEvent( + EventTypeFundMigrationInitiated, + sdk.NewAttribute("migration_id", fmt.Sprintf("%d", e.MigrationID)), + sdk.NewAttribute("old_key_id", e.OldKeyID), + sdk.NewAttribute("old_tss_pubkey", e.OldTssPubkey), + sdk.NewAttribute("current_key_id", e.CurrentKeyID), + sdk.NewAttribute("current_tss_pubkey", e.CurrentTssPubkey), + sdk.NewAttribute("chain", e.Chain), + sdk.NewAttribute("gas_price", e.GasPrice), + sdk.NewAttribute("gas_limit", fmt.Sprintf("%d", e.GasLimit)), + sdk.NewAttribute("data", string(bz)), + ) + + return event, nil +} + +// FundMigrationCompletedEventData represents the emitted event when fund migration completes. +type FundMigrationCompletedEventData struct { + MigrationID uint64 `json:"migration_id"` + Chain string `json:"chain"` + TxHash string `json:"tx_hash"` + Success bool `json:"success"` + BlockHeight int64 `json:"block_height"` +} + +// NewFundMigrationCompletedEvent creates and returns a Cosmos SDK event. +func NewFundMigrationCompletedEvent(e FundMigrationCompletedEventData) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) + } + + event := sdk.NewEvent( + EventTypeFundMigrationCompleted, + sdk.NewAttribute("migration_id", fmt.Sprintf("%d", e.MigrationID)), + sdk.NewAttribute("chain", e.Chain), + sdk.NewAttribute("tx_hash", e.TxHash), + sdk.NewAttribute("success", fmt.Sprintf("%t", e.Success)), + sdk.NewAttribute("data", string(bz)), + ) + + return event, nil +} diff --git a/x/utss/types/expected_keepers.go b/x/utss/types/expected_keepers.go index 8aa4599b..27436867 100644 --- a/x/utss/types/expected_keepers.go +++ b/x/utss/types/expected_keepers.go @@ -2,6 +2,7 @@ package types import ( "context" + "math/big" sdk "github.com/cosmos/cosmos-sdk/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" @@ -29,3 +30,14 @@ type UValidatorKeeper interface { GetAllUniversalValidators(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) UpdateValidatorStatus(ctx context.Context, addr sdk.ValAddress, newStatus uvalidatortypes.UVStatus) error } + +// URegistryKeeper defines the expected interface for the uregistry keeper. +type URegistryKeeper interface { + IsChainOutboundEnabled(ctx context.Context, chain string) (bool, error) +} + +// UExecutorKeeper defines the expected interface for the uexecutor keeper. +type UExecutorKeeper interface { + HasPendingOutboundsForChain(ctx context.Context, chain string) (bool, error) + GetGasPriceByChain(ctx sdk.Context, chainNamespace string) (*big.Int, error) +} diff --git a/x/utss/types/genesis.pb.go b/x/utss/types/genesis.pb.go index b2b87d04..559eb680 100644 --- a/x/utss/types/genesis.pb.go +++ b/x/utss/types/genesis.pb.go @@ -130,6 +130,59 @@ func (m *TssKeyEntry) GetValue() TssKey { return TssKey{} } +// FundMigrationEntry is a key-value pair for exporting FundMigrations map state. +type FundMigrationEntry struct { + Key uint64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + Value FundMigration `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` +} + +func (m *FundMigrationEntry) Reset() { *m = FundMigrationEntry{} } +func (m *FundMigrationEntry) String() string { return proto.CompactTextString(m) } +func (*FundMigrationEntry) ProtoMessage() {} +func (*FundMigrationEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_340c354866cd9772, []int{2} +} +func (m *FundMigrationEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FundMigrationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FundMigrationEntry.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 *FundMigrationEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FundMigrationEntry.Merge(m, src) +} +func (m *FundMigrationEntry) XXX_Size() int { + return m.Size() +} +func (m *FundMigrationEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FundMigrationEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FundMigrationEntry proto.InternalMessageInfo + +func (m *FundMigrationEntry) GetKey() uint64 { + if m != nil { + return m.Key + } + return 0 +} + +func (m *FundMigrationEntry) GetValue() FundMigration { + if m != nil { + return m.Value + } + return FundMigration{} +} + // GenesisState defines the module genesis state type GenesisState struct { // Params defines all the parameters of the module. @@ -148,13 +201,17 @@ type GenesisState struct { TssEvents []TssEvent `protobuf:"bytes,7,rep,name=tss_events,json=tssEvents,proto3" json:"tss_events"` // next_tss_event_id is the next auto-increment ID for TssEvents. NextTssEventId uint64 `protobuf:"varint,8,opt,name=next_tss_event_id,json=nextTssEventId,proto3" json:"next_tss_event_id,omitempty"` + // fund_migrations are entries from the FundMigrations store. + FundMigrations []FundMigrationEntry `protobuf:"bytes,9,rep,name=fund_migrations,json=fundMigrations,proto3" json:"fund_migrations"` + // next_migration_id is the next auto-increment ID for FundMigrations. + NextMigrationId uint64 `protobuf:"varint,10,opt,name=next_migration_id,json=nextMigrationId,proto3" json:"next_migration_id,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_340c354866cd9772, []int{2} + return fileDescriptor_340c354866cd9772, []int{3} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -239,44 +296,63 @@ func (m *GenesisState) GetNextTssEventId() uint64 { return 0 } +func (m *GenesisState) GetFundMigrations() []FundMigrationEntry { + if m != nil { + return m.FundMigrations + } + return nil +} + +func (m *GenesisState) GetNextMigrationId() uint64 { + if m != nil { + return m.NextMigrationId + } + return 0 +} + func init() { proto.RegisterType((*TssKeyProcessEntry)(nil), "utss.v1.TssKeyProcessEntry") proto.RegisterType((*TssKeyEntry)(nil), "utss.v1.TssKeyEntry") + proto.RegisterType((*FundMigrationEntry)(nil), "utss.v1.FundMigrationEntry") proto.RegisterType((*GenesisState)(nil), "utss.v1.GenesisState") } func init() { proto.RegisterFile("utss/v1/genesis.proto", fileDescriptor_340c354866cd9772) } var fileDescriptor_340c354866cd9772 = []byte{ - // 446 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0x8e, 0x49, 0x9a, 0xd2, 0x0d, 0xa9, 0xc9, 0xb6, 0x20, 0xab, 0x48, 0x26, 0xea, 0x01, 0x05, - 0xa1, 0xd8, 0x4a, 0x90, 0xe0, 0x1e, 0xa9, 0x40, 0x09, 0x87, 0xca, 0xf4, 0xd4, 0x8b, 0xe5, 0xda, - 0x2b, 0xdb, 0x82, 0xec, 0x5a, 0x9e, 0xb5, 0x55, 0xbf, 0x05, 0x8f, 0xd5, 0x63, 0x8f, 0x70, 0x41, - 0x28, 0x79, 0x11, 0xb4, 0xe3, 0x75, 0x71, 0x4a, 0xd5, 0x8b, 0x35, 0xfe, 0x66, 0xbf, 0x9f, 0x9d, - 0x1d, 0xf2, 0xac, 0x90, 0x00, 0x6e, 0x39, 0x73, 0x63, 0xc6, 0x19, 0xa4, 0xe0, 0x64, 0xb9, 0x90, - 0x82, 0xee, 0x2a, 0xd8, 0x29, 0x67, 0x47, 0x87, 0xb1, 0x88, 0x05, 0x62, 0xae, 0xaa, 0xea, 0xf6, - 0xd1, 0x28, 0x58, 0xa5, 0x5c, 0xb8, 0xf8, 0xd5, 0xd0, 0x41, 0x23, 0x24, 0xab, 0x8c, 0x69, 0x99, - 0xe3, 0x0b, 0x42, 0xcf, 0x01, 0x96, 0xac, 0x3a, 0xcb, 0x45, 0xc8, 0x00, 0x4e, 0xb8, 0xcc, 0x2b, - 0xfa, 0x94, 0x74, 0xbf, 0xb1, 0xca, 0x32, 0xc6, 0xc6, 0xa4, 0xe7, 0xa9, 0x92, 0xce, 0xc9, 0x4e, - 0x19, 0x7c, 0x2f, 0x98, 0xf5, 0x68, 0x6c, 0x4c, 0x06, 0xf3, 0xe7, 0x8e, 0xb6, 0x77, 0xb6, 0xd8, - 0x8b, 0xde, 0xf5, 0xef, 0x97, 0x1d, 0xaf, 0x3e, 0x7a, 0xfc, 0x85, 0x0c, 0xea, 0xee, 0x7f, 0xa2, - 0x7b, 0xb5, 0xe8, 0x9b, 0x6d, 0x51, 0xf3, 0x8e, 0xe8, 0xb6, 0xda, 0xaf, 0x2e, 0x79, 0xf2, 0xb1, - 0x1e, 0xc1, 0x57, 0x19, 0x48, 0x46, 0xa7, 0xa4, 0x9f, 0x05, 0x79, 0xb0, 0x02, 0x94, 0x6c, 0xd3, - 0xcf, 0x10, 0xd6, 0x74, 0x7d, 0x88, 0x7e, 0x20, 0x07, 0x61, 0x91, 0xe7, 0x8c, 0x4b, 0x5f, 0x02, - 0xf8, 0x59, 0x9d, 0xf8, 0xe1, 0xfb, 0x78, 0x23, 0x4d, 0x39, 0x07, 0xd0, 0x10, 0xfd, 0x4c, 0x4c, - 0xcd, 0xf5, 0x93, 0x14, 0xa4, 0xc8, 0x2b, 0xab, 0x3b, 0xee, 0x4e, 0x06, 0xf3, 0x17, 0xf7, 0x6b, - 0xe0, 0xe5, 0x75, 0x96, 0x7d, 0xcd, 0xfc, 0x54, 0x13, 0xe9, 0x7b, 0x62, 0xb6, 0x33, 0xa9, 0xf1, - 0xf4, 0xee, 0x1d, 0x85, 0x37, 0xfc, 0x17, 0x64, 0xc9, 0x2a, 0xba, 0x20, 0xa6, 0x26, 0xdc, 0x86, - 0xd8, 0xc1, 0x10, 0x87, 0x77, 0x88, 0x6d, 0xf7, 0xa1, 0x44, 0xa8, 0x31, 0x7f, 0x45, 0x4c, 0xce, - 0xae, 0x64, 0x33, 0x09, 0x3f, 0x8d, 0xac, 0x3e, 0x3e, 0xf8, 0x50, 0xc1, 0x3a, 0xfd, 0x69, 0x44, - 0xdf, 0x11, 0xa2, 0xbc, 0x58, 0xc9, 0xb8, 0x04, 0x6b, 0x17, 0x6d, 0x46, 0x6d, 0x9b, 0x13, 0xd5, - 0xd1, 0x1e, 0x7b, 0x52, 0xff, 0x03, 0x7d, 0x4d, 0x46, 0xa8, 0x7f, 0x4b, 0x56, 0x0e, 0x8f, 0xd1, - 0x61, 0x5f, 0x35, 0x1a, 0xe6, 0x69, 0xb4, 0x58, 0x5e, 0xaf, 0x6d, 0xe3, 0x66, 0x6d, 0x1b, 0x7f, - 0xd6, 0xb6, 0xf1, 0x63, 0x63, 0x77, 0x6e, 0x36, 0x76, 0xe7, 0xe7, 0xc6, 0xee, 0x5c, 0xcc, 0xe2, - 0x54, 0x26, 0xc5, 0xa5, 0x13, 0x8a, 0x95, 0x9b, 0x15, 0x90, 0x84, 0x49, 0x90, 0x72, 0xac, 0xa6, - 0x58, 0x4e, 0xb9, 0x88, 0x98, 0x7b, 0xe5, 0xe2, 0x6e, 0xe3, 0x62, 0x5f, 0xf6, 0x71, 0xb3, 0xdf, - 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x83, 0x87, 0x0f, 0xaf, 0x39, 0x03, 0x00, 0x00, + // 503 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4f, 0x6f, 0x12, 0x41, + 0x14, 0x67, 0x85, 0x52, 0x19, 0xa4, 0xc8, 0xb4, 0x9a, 0x4d, 0x4d, 0x56, 0xd2, 0x83, 0x41, 0x0d, + 0xbb, 0x01, 0x13, 0xbd, 0x93, 0xb4, 0x8a, 0x68, 0xd2, 0x60, 0x4f, 0x5c, 0x36, 0x5b, 0x76, 0xba, + 0x6c, 0x94, 0x99, 0xcd, 0xbe, 0x59, 0xd2, 0xfd, 0x16, 0x7e, 0xac, 0x1e, 0xeb, 0xcd, 0x93, 0x31, + 0xf0, 0x45, 0xcc, 0xbc, 0x9d, 0xc5, 0x5d, 0xda, 0x98, 0x78, 0x21, 0x8f, 0xdf, 0x9b, 0xdf, 0x1f, + 0x7e, 0xc3, 0x90, 0x27, 0x89, 0x04, 0x70, 0x56, 0x03, 0x27, 0x60, 0x9c, 0x41, 0x08, 0x76, 0x14, + 0x0b, 0x29, 0xe8, 0xbe, 0x82, 0xed, 0xd5, 0xe0, 0xf8, 0x28, 0x10, 0x81, 0x40, 0xcc, 0x51, 0x53, + 0xb6, 0x3e, 0xee, 0x78, 0xcb, 0x90, 0x0b, 0x07, 0x3f, 0x35, 0x74, 0x98, 0x0b, 0xc9, 0x34, 0x62, + 0x5a, 0xe6, 0x64, 0x46, 0xe8, 0x05, 0xc0, 0x84, 0xa5, 0xe7, 0xb1, 0x98, 0x33, 0x80, 0x53, 0x2e, + 0xe3, 0x94, 0x3e, 0x26, 0xd5, 0xaf, 0x2c, 0x35, 0x8d, 0xae, 0xd1, 0xab, 0x4d, 0xd5, 0x48, 0x87, + 0x64, 0x6f, 0xe5, 0x7d, 0x4b, 0x98, 0xf9, 0xa0, 0x6b, 0xf4, 0x9a, 0xc3, 0xa7, 0xb6, 0xb6, 0xb7, + 0x4b, 0xec, 0x51, 0xed, 0xe6, 0xd7, 0xf3, 0xca, 0x34, 0x3b, 0x7a, 0xf2, 0x89, 0x34, 0xb3, 0xed, + 0x1d, 0xd1, 0x46, 0x26, 0xfa, 0xba, 0x2c, 0xda, 0xde, 0x11, 0x2d, 0xab, 0xcd, 0x08, 0x3d, 0x4b, + 0xb8, 0xff, 0x39, 0x0c, 0x62, 0x4f, 0x86, 0x82, 0xff, 0x77, 0xd2, 0x12, 0xbb, 0xac, 0xfd, 0xa3, + 0x46, 0x1e, 0xbd, 0xcf, 0xea, 0xfd, 0x22, 0x3d, 0xc9, 0x68, 0x9f, 0xd4, 0x23, 0x2f, 0xf6, 0x96, + 0x80, 0xca, 0xc5, 0x68, 0xe7, 0x08, 0x6b, 0xba, 0x3e, 0x44, 0xcf, 0xc8, 0xe1, 0x3c, 0x89, 0x63, + 0xc6, 0xa5, 0x2b, 0x01, 0xdc, 0x28, 0x6b, 0xe3, 0xdf, 0x5d, 0x4d, 0x3b, 0x9a, 0x72, 0x01, 0xa0, + 0x21, 0xfa, 0x91, 0xb4, 0x35, 0xd7, 0x5d, 0x84, 0x20, 0x45, 0x9c, 0x9a, 0xd5, 0x6e, 0xb5, 0xd7, + 0x1c, 0x3e, 0xbb, 0x5f, 0x03, 0x3b, 0xd0, 0x59, 0x0e, 0x34, 0xf3, 0x43, 0x46, 0xa4, 0xef, 0x48, + 0xbb, 0x98, 0x49, 0xb5, 0x54, 0xbb, 0xb7, 0xe6, 0x69, 0xeb, 0x6f, 0x90, 0x09, 0x4b, 0xe9, 0x88, + 0xb4, 0x35, 0x61, 0x1b, 0x62, 0x0f, 0x43, 0x1c, 0xed, 0x10, 0x8b, 0xee, 0x2d, 0x89, 0x50, 0x6e, + 0xfe, 0x82, 0xb4, 0x39, 0xbb, 0x96, 0x79, 0x13, 0x6e, 0xe8, 0x9b, 0x75, 0xbc, 0xa2, 0x96, 0x82, + 0x75, 0xfa, 0xb1, 0x4f, 0xdf, 0x12, 0xa2, 0xbc, 0xd8, 0x8a, 0x71, 0x09, 0xe6, 0x3e, 0xda, 0x74, + 0x8a, 0x36, 0xa7, 0x6a, 0xa3, 0x3d, 0x1a, 0x52, 0x7f, 0x07, 0xfa, 0x92, 0x74, 0x50, 0x7f, 0x4b, + 0x56, 0x0e, 0x0f, 0xd1, 0xe1, 0x40, 0x2d, 0x72, 0xe6, 0xd8, 0x57, 0x9d, 0x5e, 0x25, 0xdc, 0x77, + 0x97, 0xf9, 0xd5, 0x83, 0xd9, 0xd8, 0xe9, 0xf4, 0xee, 0xff, 0x2a, 0xef, 0xf4, 0xaa, 0xb8, 0x01, + 0xfa, 0x4a, 0xdb, 0x6e, 0xb5, 0x94, 0x2d, 0x41, 0x5b, 0xfc, 0xbd, 0xdb, 0xa3, 0x63, 0x7f, 0x34, + 0xb9, 0x59, 0x5b, 0xc6, 0xed, 0xda, 0x32, 0x7e, 0xaf, 0x2d, 0xe3, 0xfb, 0xc6, 0xaa, 0xdc, 0x6e, + 0xac, 0xca, 0xcf, 0x8d, 0x55, 0x99, 0x0d, 0x82, 0x50, 0x2e, 0x92, 0x4b, 0x7b, 0x2e, 0x96, 0x4e, + 0x94, 0xc0, 0x62, 0xbe, 0xf0, 0x42, 0x8e, 0x53, 0x1f, 0xc7, 0x3e, 0x17, 0x3e, 0x73, 0xae, 0x1d, + 0x7c, 0xaf, 0xf8, 0x58, 0x2f, 0xeb, 0xf8, 0x5a, 0xdf, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x0b, + 0xa7, 0x20, 0xa2, 0x0d, 0x04, 0x00, 0x00, } func (m *TssKeyProcessEntry) Marshal() (dAtA []byte, err error) { @@ -357,6 +433,44 @@ func (m *TssKeyEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *FundMigrationEntry) 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 *FundMigrationEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FundMigrationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Key != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Key)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -377,6 +491,25 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.NextMigrationId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextMigrationId)) + i-- + dAtA[i] = 0x50 + } + if len(m.FundMigrations) > 0 { + for iNdEx := len(m.FundMigrations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FundMigrations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if m.NextTssEventId != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.NextTssEventId)) i-- @@ -506,6 +639,20 @@ func (m *TssKeyEntry) Size() (n int) { return n } +func (m *FundMigrationEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != 0 { + n += 1 + sovGenesis(uint64(m.Key)) + } + l = m.Value.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -546,6 +693,15 @@ func (m *GenesisState) Size() (n int) { if m.NextTssEventId != 0 { n += 1 + sovGenesis(uint64(m.NextTssEventId)) } + if len(m.FundMigrations) > 0 { + for _, e := range m.FundMigrations { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.NextMigrationId != 0 { + n += 1 + sovGenesis(uint64(m.NextMigrationId)) + } return n } @@ -772,6 +928,108 @@ func (m *TssKeyEntry) Unmarshal(dAtA []byte) error { } return nil } +func (m *FundMigrationEntry) 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 ErrIntOverflowGenesis + } + 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: FundMigrationEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FundMigrationEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + m.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Key |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1046,6 +1304,59 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundMigrations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FundMigrations = append(m.FundMigrations, FundMigrationEntry{}) + if err := m.FundMigrations[len(m.FundMigrations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextMigrationId", wireType) + } + m.NextMigrationId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextMigrationId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/utss/types/keys.go b/x/utss/types/keys.go index 5adfe3f8..264c42de 100755 --- a/x/utss/types/keys.go +++ b/x/utss/types/keys.go @@ -63,6 +63,24 @@ var ( // PendingTssEventsName is the name of the PendingTssEvents collection. PendingTssEventsName = "pending_tss_events" + + // FundMigrationsKey stores fund migration records. + FundMigrationsKey = collections.NewPrefix(9) + + // FundMigrationsName is the name of the FundMigrations collection. + FundMigrationsName = "fund_migrations" + + // NextMigrationIdKey saves the auto-increment counter for migration IDs. + NextMigrationIdKey = collections.NewPrefix(10) + + // NextMigrationIdName is the name of the NextMigrationId collection. + NextMigrationIdName = "next_migration_id" + + // PendingMigrationsKey is a secondary index of fund migrations with PENDING status. + PendingMigrationsKey = collections.NewPrefix(11) + + // PendingMigrationsName is the name of the PendingMigrations collection. + PendingMigrationsName = "pending_migrations" ) const ( @@ -78,3 +96,9 @@ func GetTssBallotKey(processId uint64, tssPubKey, keyId string) string { h := sha256.Sum256([]byte(canonical)) return hex.EncodeToString(h[:]) } + +func GetFundMigrationBallotKey(migrationId uint64, txHash string, success bool) string { + canonical := fmt.Sprintf("fm:%d:%s:%t", migrationId, txHash, success) + h := sha256.Sum256([]byte(canonical)) + return hex.EncodeToString(h[:]) +} diff --git a/x/utss/types/query.pb.go b/x/utss/types/query.pb.go index 99dfb670..39a1108b 100644 --- a/x/utss/types/query.pb.go +++ b/x/utss/types/query.pb.go @@ -1007,6 +1007,271 @@ func (m *QueryAllTssEventsResponse) GetPagination() *query.PageResponse { return nil } +// Fund Migration queries +type QueryGetFundMigrationRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryGetFundMigrationRequest) Reset() { *m = QueryGetFundMigrationRequest{} } +func (m *QueryGetFundMigrationRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetFundMigrationRequest) ProtoMessage() {} +func (*QueryGetFundMigrationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{22} +} +func (m *QueryGetFundMigrationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetFundMigrationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetFundMigrationRequest.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 *QueryGetFundMigrationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetFundMigrationRequest.Merge(m, src) +} +func (m *QueryGetFundMigrationRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetFundMigrationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetFundMigrationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetFundMigrationRequest proto.InternalMessageInfo + +func (m *QueryGetFundMigrationRequest) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +type QueryGetFundMigrationResponse struct { + Migration *FundMigration `protobuf:"bytes,1,opt,name=migration,proto3" json:"migration,omitempty"` +} + +func (m *QueryGetFundMigrationResponse) Reset() { *m = QueryGetFundMigrationResponse{} } +func (m *QueryGetFundMigrationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetFundMigrationResponse) ProtoMessage() {} +func (*QueryGetFundMigrationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{23} +} +func (m *QueryGetFundMigrationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetFundMigrationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetFundMigrationResponse.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 *QueryGetFundMigrationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetFundMigrationResponse.Merge(m, src) +} +func (m *QueryGetFundMigrationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetFundMigrationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetFundMigrationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetFundMigrationResponse proto.InternalMessageInfo + +func (m *QueryGetFundMigrationResponse) GetMigration() *FundMigration { + if m != nil { + return m.Migration + } + return nil +} + +type QueryPendingFundMigrationsRequest struct { +} + +func (m *QueryPendingFundMigrationsRequest) Reset() { *m = QueryPendingFundMigrationsRequest{} } +func (m *QueryPendingFundMigrationsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPendingFundMigrationsRequest) ProtoMessage() {} +func (*QueryPendingFundMigrationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{24} +} +func (m *QueryPendingFundMigrationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingFundMigrationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingFundMigrationsRequest.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 *QueryPendingFundMigrationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingFundMigrationsRequest.Merge(m, src) +} +func (m *QueryPendingFundMigrationsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingFundMigrationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingFundMigrationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingFundMigrationsRequest proto.InternalMessageInfo + +type QueryPendingFundMigrationsResponse struct { + Migrations []*FundMigration `protobuf:"bytes,1,rep,name=migrations,proto3" json:"migrations,omitempty"` +} + +func (m *QueryPendingFundMigrationsResponse) Reset() { *m = QueryPendingFundMigrationsResponse{} } +func (m *QueryPendingFundMigrationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPendingFundMigrationsResponse) ProtoMessage() {} +func (*QueryPendingFundMigrationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{25} +} +func (m *QueryPendingFundMigrationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingFundMigrationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingFundMigrationsResponse.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 *QueryPendingFundMigrationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingFundMigrationsResponse.Merge(m, src) +} +func (m *QueryPendingFundMigrationsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingFundMigrationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingFundMigrationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingFundMigrationsResponse proto.InternalMessageInfo + +func (m *QueryPendingFundMigrationsResponse) GetMigrations() []*FundMigration { + if m != nil { + return m.Migrations + } + return nil +} + +type QueryAllFundMigrationsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllFundMigrationsRequest) Reset() { *m = QueryAllFundMigrationsRequest{} } +func (m *QueryAllFundMigrationsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllFundMigrationsRequest) ProtoMessage() {} +func (*QueryAllFundMigrationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{26} +} +func (m *QueryAllFundMigrationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllFundMigrationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllFundMigrationsRequest.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 *QueryAllFundMigrationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllFundMigrationsRequest.Merge(m, src) +} +func (m *QueryAllFundMigrationsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllFundMigrationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllFundMigrationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllFundMigrationsRequest proto.InternalMessageInfo + +func (m *QueryAllFundMigrationsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllFundMigrationsResponse struct { + Migrations []*FundMigration `protobuf:"bytes,1,rep,name=migrations,proto3" json:"migrations,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllFundMigrationsResponse) Reset() { *m = QueryAllFundMigrationsResponse{} } +func (m *QueryAllFundMigrationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllFundMigrationsResponse) ProtoMessage() {} +func (*QueryAllFundMigrationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{27} +} +func (m *QueryAllFundMigrationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllFundMigrationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllFundMigrationsResponse.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 *QueryAllFundMigrationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllFundMigrationsResponse.Merge(m, src) +} +func (m *QueryAllFundMigrationsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllFundMigrationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllFundMigrationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllFundMigrationsResponse proto.InternalMessageInfo + +func (m *QueryAllFundMigrationsResponse) GetMigrations() []*FundMigration { + if m != nil { + return m.Migrations + } + return nil +} + +func (m *QueryAllFundMigrationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "utss.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "utss.v1.QueryParamsResponse") @@ -1030,71 +1295,88 @@ func init() { proto.RegisterType((*QueryAllPendingTssEventsResponse)(nil), "utss.v1.QueryAllPendingTssEventsResponse") proto.RegisterType((*QueryAllTssEventsRequest)(nil), "utss.v1.QueryAllTssEventsRequest") proto.RegisterType((*QueryAllTssEventsResponse)(nil), "utss.v1.QueryAllTssEventsResponse") + proto.RegisterType((*QueryGetFundMigrationRequest)(nil), "utss.v1.QueryGetFundMigrationRequest") + proto.RegisterType((*QueryGetFundMigrationResponse)(nil), "utss.v1.QueryGetFundMigrationResponse") + proto.RegisterType((*QueryPendingFundMigrationsRequest)(nil), "utss.v1.QueryPendingFundMigrationsRequest") + proto.RegisterType((*QueryPendingFundMigrationsResponse)(nil), "utss.v1.QueryPendingFundMigrationsResponse") + proto.RegisterType((*QueryAllFundMigrationsRequest)(nil), "utss.v1.QueryAllFundMigrationsRequest") + proto.RegisterType((*QueryAllFundMigrationsResponse)(nil), "utss.v1.QueryAllFundMigrationsResponse") } func init() { proto.RegisterFile("utss/v1/query.proto", fileDescriptor_2af2863e9a096df1) } var fileDescriptor_2af2863e9a096df1 = []byte{ - // 935 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x97, 0xdf, 0x6f, 0xdb, 0x54, - 0x14, 0xc7, 0xeb, 0x6e, 0x4d, 0xb5, 0xd3, 0xa9, 0xdb, 0x4e, 0xdb, 0x34, 0xb8, 0xa9, 0x97, 0xb9, - 0x40, 0x5b, 0x60, 0x36, 0x19, 0xbc, 0x20, 0x21, 0xd0, 0x36, 0xc1, 0x54, 0x82, 0x44, 0x88, 0xf6, - 0x84, 0x86, 0x26, 0x27, 0xbe, 0x4a, 0xad, 0x24, 0xb6, 0x9b, 0xeb, 0x44, 0x58, 0x55, 0x24, 0x84, - 0x78, 0xe2, 0x05, 0x24, 0x10, 0x0f, 0xfc, 0x45, 0x3c, 0x4e, 0xe2, 0x85, 0x47, 0xd4, 0xf2, 0x87, - 0xa0, 0xdc, 0x7b, 0xec, 0xf8, 0x57, 0xb2, 0x82, 0x82, 0xb4, 0xb7, 0xf6, 0xde, 0xef, 0x3d, 0x9f, - 0xaf, 0x7d, 0xce, 0xf5, 0x57, 0x81, 0xad, 0x51, 0xc0, 0xb9, 0x39, 0xae, 0x9b, 0x67, 0x23, 0x36, - 0x0c, 0x0d, 0x7f, 0xe8, 0x05, 0x1e, 0xae, 0x4f, 0x17, 0x8d, 0x71, 0x5d, 0xad, 0x76, 0x3d, 0xaf, - 0xdb, 0x67, 0xa6, 0xe5, 0x3b, 0xa6, 0xe5, 0xba, 0x5e, 0x60, 0x05, 0x8e, 0xe7, 0x72, 0x29, 0x53, - 0xdf, 0xea, 0x78, 0x7c, 0xe0, 0x71, 0xb3, 0x6d, 0x71, 0x26, 0xcf, 0x9b, 0xe3, 0x7a, 0x9b, 0x05, - 0x56, 0xdd, 0xf4, 0xad, 0xae, 0xe3, 0x0a, 0x31, 0x69, 0x77, 0x22, 0x4e, 0x97, 0xb9, 0x8c, 0x3b, - 0x51, 0x89, 0x18, 0x1f, 0x84, 0x3e, 0xa3, 0x45, 0x7d, 0x1b, 0xf0, 0xcb, 0x69, 0xb5, 0xa6, 0x35, - 0xb4, 0x06, 0xbc, 0xc5, 0xce, 0x46, 0x8c, 0x07, 0xfa, 0x47, 0xb0, 0x95, 0x5a, 0xe5, 0xbe, 0xe7, - 0x72, 0x86, 0x87, 0x50, 0xf2, 0xc5, 0x4a, 0x45, 0xa9, 0x29, 0x47, 0x1b, 0x0f, 0x6e, 0x19, 0x64, - 0xde, 0x20, 0x21, 0x6d, 0xeb, 0x55, 0x50, 0xc5, 0xf9, 0xc7, 0xa3, 0xe1, 0x90, 0xb9, 0x41, 0x73, - 0xe8, 0x75, 0x18, 0x8f, 0xab, 0x7f, 0x01, 0x7b, 0x85, 0xbb, 0x44, 0x79, 0x17, 0xd6, 0x7d, 0xb9, - 0x44, 0x98, 0x72, 0x8c, 0x79, 0xca, 0x79, 0x83, 0x85, 0xd1, 0x81, 0x48, 0xa6, 0x1f, 0xc3, 0xae, - 0xb4, 0x2b, 0xff, 0x7f, 0x14, 0x9e, 0xd8, 0xc4, 0xc2, 0x4d, 0x58, 0x75, 0x6c, 0x51, 0xe7, 0x7a, - 0x6b, 0xd5, 0xb1, 0xf5, 0xcf, 0xa1, 0x92, 0x97, 0xfe, 0x67, 0x70, 0x9b, 0xaa, 0x3d, 0xec, 0xf7, - 0x69, 0x8f, 0x45, 0x4f, 0x89, 0x9f, 0x02, 0xcc, 0x3a, 0x43, 0x05, 0xdf, 0x34, 0x64, 0x1b, 0x8d, - 0x69, 0x1b, 0x0d, 0x39, 0x06, 0xd4, 0x46, 0xa3, 0x69, 0x75, 0x19, 0x9d, 0x6d, 0x25, 0x4e, 0xea, - 0xbf, 0x29, 0xf0, 0x5a, 0x01, 0x84, 0x3c, 0xbf, 0x0f, 0x37, 0xfc, 0x68, 0xb1, 0xa2, 0xd4, 0xae, - 0x2d, 0x70, 0x3d, 0x13, 0xe2, 0x93, 0x94, 0xb7, 0x55, 0xe1, 0xed, 0xf0, 0xa5, 0xde, 0x24, 0x32, - 0x65, 0xae, 0x02, 0xe5, 0x64, 0x2b, 0x1b, 0x2c, 0x8c, 0x9a, 0xfc, 0x21, 0xf5, 0x24, 0xb9, 0x43, - 0x9e, 0xef, 0xc1, 0xb5, 0x1e, 0x0b, 0x73, 0x33, 0x24, 0xdd, 0xb6, 0xa6, 0x7b, 0xfa, 0x3b, 0x34, - 0x80, 0x0d, 0x16, 0x26, 0xbb, 0xb9, 0x03, 0xa5, 0x1e, 0x0b, 0x9f, 0x53, 0x47, 0x6f, 0xb4, 0xd6, - 0x7a, 0x2c, 0x3c, 0xb1, 0xf5, 0x0f, 0x60, 0x3b, 0xad, 0xbe, 0x3a, 0xe8, 0x6b, 0x02, 0x3d, 0xec, - 0xf7, 0x1b, 0x2c, 0x5c, 0x7a, 0xf3, 0xbe, 0x57, 0xc8, 0x5a, 0x5c, 0x9f, 0xac, 0x1d, 0xc0, 0xf5, - 0x1e, 0x0b, 0xa3, 0x96, 0xe5, 0xbc, 0x89, 0xcd, 0xe5, 0xb5, 0x29, 0xba, 0x20, 0x4f, 0x58, 0xf0, - 0x94, 0xf3, 0x4f, 0xc6, 0xcc, 0x0d, 0xe6, 0x5d, 0x90, 0xc7, 0x34, 0xd2, 0x29, 0x69, 0x7c, 0xff, - 0xd7, 0xd8, 0x74, 0x81, 0x5e, 0xc8, 0x9d, 0xa4, 0x6b, 0xa9, 0x94, 0xfb, 0xfa, 0xc7, 0xa0, 0x45, - 0x45, 0x9a, 0xcc, 0xb5, 0x1d, 0xb7, 0x9b, 0xc5, 0xee, 0x03, 0xd0, 0x38, 0x3e, 0x8f, 0xf1, 0xd1, - 0x80, 0x9e, 0xd8, 0xfa, 0x67, 0x70, 0x77, 0x6e, 0x81, 0x7f, 0x6b, 0xc6, 0xa1, 0x5a, 0xd3, 0xfb, - 0x93, 0xae, 0xb5, 0xf4, 0x76, 0xff, 0xaa, 0x40, 0x6d, 0x3e, 0x8b, 0x8c, 0x1f, 0x43, 0x49, 0x18, - 0x8b, 0x9a, 0x5f, 0xe0, 0x9c, 0x04, 0xcb, 0x1b, 0x80, 0xc4, 0x87, 0xea, 0x7f, 0x7b, 0xf8, 0x1f, - 0x13, 0x1f, 0xaa, 0x57, 0xe2, 0xa9, 0x1f, 0x7c, 0x0b, 0xb0, 0x26, 0x1c, 0xe1, 0x33, 0x28, 0xc9, - 0x88, 0xc2, 0xbd, 0x98, 0x9b, 0xcf, 0x3d, 0xb5, 0x5a, 0xbc, 0x29, 0x4b, 0xeb, 0xbb, 0xdf, 0xfd, - 0xf1, 0xf7, 0xcf, 0xab, 0x77, 0xf0, 0x96, 0x19, 0x25, 0xa9, 0x8c, 0x3b, 0x9c, 0xc0, 0x66, 0x3a, - 0xcb, 0xf0, 0x20, 0x5d, 0xa8, 0x30, 0x07, 0xd5, 0xd7, 0x17, 0x8b, 0x88, 0x5a, 0x13, 0x54, 0x15, - 0x2b, 0x33, 0xaa, 0x54, 0x98, 0x1d, 0x79, 0x00, 0xcf, 0x60, 0x23, 0x11, 0x67, 0x58, 0xcb, 0x3c, - 0x44, 0x2e, 0x14, 0xd5, 0x7b, 0x0b, 0x14, 0x44, 0xdd, 0x17, 0xd4, 0x5d, 0xdc, 0xc9, 0x51, 0xcf, - 0x1d, 0x7b, 0x82, 0x1e, 0xdc, 0x4c, 0xc6, 0x11, 0x66, 0x2a, 0x16, 0xe4, 0xa1, 0xaa, 0x2f, 0x92, - 0x10, 0xb5, 0x22, 0xa8, 0x88, 0xb7, 0xb3, 0x54, 0x1c, 0x00, 0xcc, 0x92, 0x04, 0xef, 0x16, 0xbe, - 0xb9, 0x59, 0xfa, 0xa8, 0xb5, 0xf9, 0x02, 0x42, 0x55, 0x05, 0xaa, 0x8c, 0xdb, 0x31, 0xaa, 0xc7, - 0xc2, 0xf8, 0x95, 0x32, 0x58, 0xa7, 0x30, 0xc1, 0xcc, 0x4c, 0xa4, 0x13, 0x49, 0xdd, 0x9f, 0xb3, - 0x3b, 0xf7, 0x35, 0x4e, 0x29, 0xe7, 0x32, 0xc4, 0x26, 0xf8, 0x0c, 0xd6, 0x29, 0x18, 0xb2, 0x98, - 0x74, 0x1e, 0x65, 0x31, 0x99, 0x34, 0xd1, 0xb7, 0x05, 0x66, 0x13, 0x6f, 0x26, 0x31, 0xe8, 0xc1, - 0x46, 0xe2, 0x2b, 0x9e, 0x9d, 0x8b, 0x7c, 0x16, 0x64, 0xe7, 0xa2, 0x20, 0x02, 0xf4, 0x3d, 0x41, - 0xda, 0xc1, 0xad, 0x98, 0x24, 0x2e, 0xad, 0x9c, 0x8a, 0x5f, 0x14, 0xc0, 0xfc, 0x17, 0x1b, 0x0f, - 0x73, 0x65, 0x8b, 0x43, 0x41, 0x3d, 0x7a, 0xb9, 0x90, 0x6c, 0xbc, 0x2d, 0x6c, 0xbc, 0x81, 0x07, - 0x19, 0x1b, 0xbe, 0xd4, 0x9b, 0xe7, 0xb3, 0x70, 0x99, 0xe0, 0x0f, 0x0a, 0x6c, 0x15, 0x7c, 0x90, - 0xf1, 0x28, 0x3f, 0x91, 0xc5, 0xf9, 0xa0, 0x1e, 0x5f, 0x41, 0x49, 0xce, 0x34, 0xe1, 0xac, 0x82, - 0xe5, 0x62, 0x67, 0x38, 0x10, 0x37, 0x67, 0x66, 0x22, 0x7f, 0x73, 0x72, 0x74, 0x7d, 0x91, 0x84, - 0xb0, 0x65, 0x81, 0xbd, 0x8d, 0x9b, 0x69, 0xec, 0xa3, 0xc6, 0xef, 0x17, 0x9a, 0xf2, 0xe2, 0x42, - 0x53, 0xfe, 0xba, 0xd0, 0x94, 0x9f, 0x2e, 0xb5, 0x95, 0x17, 0x97, 0xda, 0xca, 0x9f, 0x97, 0xda, - 0xca, 0x57, 0xf5, 0xae, 0x13, 0x9c, 0x8e, 0xda, 0x46, 0xc7, 0x1b, 0x98, 0xfe, 0x88, 0x9f, 0x76, - 0x4e, 0x2d, 0xc7, 0x15, 0x7f, 0xdd, 0x17, 0x7f, 0xde, 0x77, 0x3d, 0x9b, 0x99, 0xdf, 0xc8, 0x7a, - 0xe2, 0x27, 0x43, 0xbb, 0x24, 0x7e, 0x33, 0xbc, 0xf7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, - 0x56, 0x90, 0x10, 0xc9, 0x0c, 0x00, 0x00, + // 1107 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x5f, 0x6f, 0x1b, 0xc5, + 0x17, 0xcd, 0xa6, 0x4d, 0xa2, 0xde, 0xf4, 0x97, 0x26, 0x37, 0xb1, 0xe3, 0x6e, 0x1c, 0xc7, 0x99, + 0xfc, 0x9a, 0x3f, 0x2d, 0xdd, 0xc5, 0x05, 0x21, 0x21, 0x21, 0x50, 0x5a, 0xd1, 0x2a, 0x18, 0x44, + 0xb0, 0xca, 0x0b, 0x0a, 0xaa, 0xd6, 0xf6, 0xc8, 0x59, 0xd9, 0xde, 0xdd, 0x78, 0xd7, 0x11, 0xab, + 0x28, 0x12, 0xaa, 0x78, 0xe2, 0x05, 0x24, 0x10, 0x0f, 0xbc, 0x20, 0xbe, 0x0d, 0x8f, 0x95, 0x78, + 0xe1, 0x11, 0x25, 0x7c, 0x10, 0xe4, 0x99, 0xbb, 0xeb, 0xfd, 0x67, 0x27, 0x80, 0x91, 0x78, 0xb3, + 0x67, 0xce, 0xdc, 0x73, 0x66, 0xee, 0x9d, 0xb9, 0x67, 0x61, 0xb9, 0xef, 0xb9, 0xae, 0x7e, 0x5a, + 0xd1, 0x4f, 0xfa, 0xbc, 0xe7, 0x6b, 0x4e, 0xcf, 0xf6, 0x6c, 0x9c, 0x1b, 0x0c, 0x6a, 0xa7, 0x15, + 0xb5, 0xd8, 0xb2, 0xed, 0x56, 0x87, 0xeb, 0x86, 0x63, 0xea, 0x86, 0x65, 0xd9, 0x9e, 0xe1, 0x99, + 0xb6, 0xe5, 0x4a, 0x98, 0x7a, 0xbf, 0x61, 0xbb, 0x5d, 0xdb, 0xd5, 0xeb, 0x86, 0xcb, 0xe5, 0x7a, + 0xfd, 0xb4, 0x52, 0xe7, 0x9e, 0x51, 0xd1, 0x1d, 0xa3, 0x65, 0x5a, 0x02, 0x4c, 0xd8, 0x5c, 0xc0, + 0xd3, 0xe2, 0x16, 0x77, 0xcd, 0x20, 0x44, 0x48, 0xef, 0xf9, 0x0e, 0xa7, 0x41, 0xb6, 0x02, 0xf8, + 0xc9, 0x20, 0xda, 0xa1, 0xd1, 0x33, 0xba, 0x6e, 0x8d, 0x9f, 0xf4, 0xb9, 0xeb, 0xb1, 0x77, 0x61, + 0x39, 0x36, 0xea, 0x3a, 0xb6, 0xe5, 0x72, 0xdc, 0x81, 0x59, 0x47, 0x8c, 0x14, 0x94, 0xb2, 0xb2, + 0x3b, 0xff, 0xe8, 0x8e, 0x46, 0xe2, 0x35, 0x02, 0xd2, 0x34, 0x2b, 0x82, 0x2a, 0xd6, 0x3f, 0xe9, + 0xf7, 0x7a, 0xdc, 0xf2, 0x0e, 0x7b, 0x76, 0x83, 0xbb, 0x61, 0xf4, 0x8f, 0x61, 0x2d, 0x73, 0x96, + 0x58, 0x5e, 0x87, 0x39, 0x47, 0x0e, 0x11, 0x4d, 0x3e, 0xa4, 0x79, 0xee, 0xba, 0x55, 0xee, 0x07, + 0x0b, 0x02, 0x18, 0xdb, 0x83, 0x55, 0x29, 0x57, 0xfe, 0x7f, 0xec, 0x1f, 0x34, 0x89, 0x0b, 0x17, + 0x60, 0xda, 0x6c, 0x8a, 0x38, 0x37, 0x6b, 0xd3, 0x66, 0x93, 0x7d, 0x08, 0x85, 0x34, 0xf4, 0x6f, + 0x13, 0xd7, 0x29, 0xda, 0x7e, 0xa7, 0x43, 0x73, 0x3c, 0xd8, 0x25, 0x3e, 0x05, 0x18, 0x66, 0x86, + 0x02, 0x6e, 0x6b, 0x32, 0x8d, 0xda, 0x20, 0x8d, 0x9a, 0x2c, 0x03, 0x4a, 0xa3, 0x76, 0x68, 0xb4, + 0x38, 0xad, 0xad, 0x45, 0x56, 0xb2, 0x1f, 0x15, 0xb8, 0x9b, 0x41, 0x42, 0x9a, 0xdf, 0x84, 0x5b, + 0x4e, 0x30, 0x58, 0x50, 0xca, 0x37, 0xc6, 0xa8, 0x1e, 0x02, 0xf1, 0x59, 0x4c, 0xdb, 0xb4, 0xd0, + 0xb6, 0x73, 0xa5, 0x36, 0x49, 0x19, 0x13, 0x57, 0x80, 0x7c, 0x34, 0x95, 0x55, 0xee, 0x07, 0x49, + 0x7e, 0x87, 0x72, 0x12, 0x9d, 0x21, 0xcd, 0x9b, 0x70, 0xa3, 0xcd, 0xfd, 0x54, 0x0d, 0x49, 0xb5, + 0xb5, 0xc1, 0x1c, 0x7b, 0x8d, 0x0a, 0xb0, 0xca, 0xfd, 0x68, 0x36, 0x73, 0x30, 0xdb, 0xe6, 0xfe, + 0x0b, 0xca, 0xe8, 0xad, 0xda, 0x4c, 0x9b, 0xfb, 0x07, 0x4d, 0xf6, 0x36, 0xac, 0xc4, 0xd1, 0xd7, + 0x27, 0xfa, 0x9c, 0x88, 0xf6, 0x3b, 0x9d, 0x2a, 0xf7, 0x27, 0x9e, 0xbc, 0xaf, 0x14, 0x92, 0x16, + 0xc6, 0x27, 0x69, 0x5b, 0x70, 0xb3, 0xcd, 0xfd, 0x20, 0x65, 0x29, 0x6d, 0x62, 0x72, 0x72, 0x69, + 0x0a, 0x2e, 0xc8, 0x33, 0xee, 0x3d, 0x77, 0xdd, 0xf7, 0x4f, 0xb9, 0xe5, 0x8d, 0xba, 0x20, 0x4f, + 0xa8, 0xa4, 0x63, 0xd0, 0xf0, 0xfe, 0xcf, 0xf0, 0xc1, 0x00, 0x1d, 0xc8, 0x52, 0x54, 0xb5, 0x44, + 0xca, 0x79, 0xf6, 0x1e, 0x94, 0x82, 0x20, 0x87, 0xdc, 0x6a, 0x9a, 0x56, 0x2b, 0x49, 0xbb, 0x0e, + 0x40, 0xe5, 0xf8, 0x22, 0xa4, 0x0f, 0x0a, 0xf4, 0xa0, 0xc9, 0x3e, 0x80, 0x8d, 0x91, 0x01, 0xfe, + 0xaa, 0x18, 0x93, 0x62, 0x0d, 0xee, 0x4f, 0x3c, 0xd6, 0xc4, 0xd3, 0xfd, 0x83, 0x02, 0xe5, 0xd1, + 0x5c, 0x24, 0x7c, 0x0f, 0x66, 0x85, 0xb0, 0x20, 0xf9, 0x19, 0xca, 0x09, 0x30, 0xb9, 0x02, 0x88, + 0x3c, 0x54, 0xff, 0xda, 0xe6, 0xbf, 0x89, 0x3c, 0x54, 0xff, 0x8d, 0x5d, 0x6b, 0x50, 0x0c, 0xaa, + 0xe8, 0x69, 0xdf, 0x6a, 0x7e, 0x64, 0xb6, 0x7a, 0x62, 0x62, 0x54, 0xed, 0x7f, 0x0a, 0xeb, 0x23, + 0xf0, 0xc3, 0xd7, 0xb6, 0x1b, 0x0c, 0xa6, 0x7a, 0x44, 0x7c, 0xc9, 0x10, 0xc8, 0xb6, 0x60, 0x53, + 0xf6, 0x1c, 0x59, 0x11, 0x31, 0x5c, 0xd8, 0x14, 0x8f, 0x80, 0x8d, 0x03, 0x91, 0x80, 0xb7, 0x00, + 0xc2, 0xb8, 0xe9, 0xf7, 0x3e, 0xae, 0x20, 0x82, 0x64, 0x2d, 0xda, 0xd9, 0x7e, 0xa7, 0x93, 0x49, + 0x3f, 0xb1, 0x22, 0xf8, 0x59, 0xa1, 0xab, 0x9f, 0xc1, 0xf4, 0xcf, 0xf6, 0x30, 0xb1, 0xb2, 0x78, + 0xf4, 0xd3, 0xff, 0x60, 0x46, 0x68, 0xc4, 0x23, 0x98, 0x95, 0xce, 0x05, 0xd7, 0x42, 0x01, 0x69, + 0x3b, 0xa4, 0x16, 0xb3, 0x27, 0x65, 0x68, 0xb6, 0xfa, 0xf2, 0xd7, 0x3f, 0xbe, 0x9b, 0x5e, 0xc2, + 0x3b, 0x7a, 0x60, 0xb0, 0xa4, 0x0b, 0xc2, 0x73, 0x58, 0x88, 0x5b, 0x1c, 0xdc, 0x8a, 0x07, 0xca, + 0xb4, 0x47, 0xea, 0xff, 0xc7, 0x83, 0x88, 0xb5, 0x2c, 0x58, 0x55, 0x2c, 0x0c, 0x59, 0x25, 0x42, + 0x6f, 0xc8, 0x05, 0x78, 0x02, 0xf3, 0x11, 0x97, 0x83, 0xe5, 0xc4, 0x26, 0x52, 0x5e, 0x49, 0xdd, + 0x1c, 0x83, 0x20, 0xd6, 0x75, 0xc1, 0xba, 0x8a, 0xb9, 0x14, 0xeb, 0x99, 0xd9, 0x3c, 0x47, 0x1b, + 0x6e, 0x47, 0x5d, 0x0a, 0x26, 0x22, 0x66, 0xd8, 0x24, 0x95, 0x8d, 0x83, 0x10, 0x6b, 0x41, 0xb0, + 0x22, 0x2e, 0x26, 0x59, 0xb1, 0x0b, 0x30, 0x34, 0x18, 0xb8, 0x91, 0x79, 0x72, 0x43, 0x53, 0xa2, + 0x96, 0x47, 0x03, 0x88, 0xaa, 0x28, 0xa8, 0xf2, 0xb8, 0x12, 0x52, 0xb5, 0xb9, 0x1f, 0x1e, 0x29, + 0x87, 0x39, 0xf2, 0x18, 0x98, 0xa8, 0x89, 0xb8, 0x51, 0x51, 0xd7, 0x47, 0xcc, 0x8e, 0x3c, 0xc6, + 0x01, 0xcb, 0x99, 0xf4, 0x36, 0xe7, 0x78, 0x04, 0x73, 0xe4, 0x17, 0x92, 0x34, 0x71, 0x9b, 0x92, + 0xa4, 0x49, 0x98, 0x0c, 0xb6, 0x22, 0x68, 0x16, 0xf0, 0x76, 0x94, 0x06, 0x6d, 0x98, 0x8f, 0x34, + 0xf7, 0x64, 0x5d, 0xa4, 0x2d, 0x42, 0xb2, 0x2e, 0x32, 0x9c, 0x01, 0x5b, 0x13, 0x4c, 0x39, 0x5c, + 0x0e, 0x99, 0xc4, 0x5b, 0x2e, 0xab, 0xe2, 0x7b, 0x05, 0x30, 0xdd, 0xc8, 0x71, 0x27, 0x15, 0x36, + 0xdb, 0x2b, 0xa8, 0xbb, 0x57, 0x03, 0x49, 0xc6, 0x03, 0x21, 0xe3, 0x1e, 0x6e, 0x25, 0x64, 0x38, + 0x12, 0xaf, 0x9f, 0x0d, 0x3d, 0xc7, 0x39, 0x7e, 0xad, 0xc0, 0x72, 0x46, 0x9f, 0xc6, 0xdd, 0x74, + 0x45, 0x66, 0xdb, 0x06, 0x75, 0xef, 0x1a, 0x48, 0x52, 0x56, 0x12, 0xca, 0x0a, 0x98, 0xcf, 0x56, + 0x86, 0x5d, 0x71, 0x73, 0x86, 0x22, 0xd2, 0x37, 0x27, 0xc5, 0xce, 0xc6, 0x41, 0x88, 0x36, 0x2f, + 0x68, 0x17, 0x71, 0x21, 0x4e, 0x8b, 0x2f, 0x15, 0x58, 0x4c, 0x76, 0x39, 0xbc, 0x97, 0x3a, 0xe7, + 0xac, 0xae, 0xa9, 0x6e, 0x5f, 0x05, 0x23, 0xee, 0x0d, 0xc1, 0x7d, 0x17, 0x57, 0x43, 0xee, 0xf0, + 0x31, 0x0f, 0xeb, 0x22, 0x97, 0xd9, 0xee, 0xf0, 0x7e, 0xe2, 0x25, 0x1a, 0xd3, 0x38, 0xd5, 0x07, + 0xd7, 0xc2, 0x92, 0x26, 0x26, 0x34, 0x15, 0x51, 0xcd, 0xd0, 0x14, 0xa4, 0xe2, 0x4b, 0x05, 0x96, + 0x52, 0xdd, 0x0b, 0xb7, 0x53, 0xa7, 0x9d, 0x2d, 0x67, 0xe7, 0x4a, 0x1c, 0x49, 0x51, 0x85, 0x94, + 0x15, 0xc4, 0xb4, 0x94, 0xc7, 0xd5, 0x5f, 0x2e, 0x4a, 0xca, 0xab, 0x8b, 0x92, 0xf2, 0xfb, 0x45, + 0x49, 0xf9, 0xf6, 0xb2, 0x34, 0xf5, 0xea, 0xb2, 0x34, 0xf5, 0xdb, 0x65, 0x69, 0xea, 0xb3, 0x4a, + 0xcb, 0xf4, 0x8e, 0xfb, 0x75, 0xad, 0x61, 0x77, 0x75, 0xa7, 0xef, 0x1e, 0x37, 0x8e, 0x0d, 0xd3, + 0x12, 0xbf, 0x1e, 0x8a, 0x9f, 0x0f, 0x2d, 0xbb, 0xc9, 0xf5, 0x2f, 0x64, 0x4c, 0xf1, 0xa1, 0x5f, + 0x9f, 0x15, 0x5f, 0xfa, 0x6f, 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0x8c, 0xbc, 0x59, 0x67, 0x7f, + 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1131,6 +1413,12 @@ type QueryClient interface { AllPendingTssEvents(ctx context.Context, in *QueryAllPendingTssEventsRequest, opts ...grpc.CallOption) (*QueryAllPendingTssEventsResponse, error) // List all TSS events (paginated) AllTssEvents(ctx context.Context, in *QueryAllTssEventsRequest, opts ...grpc.CallOption) (*QueryAllTssEventsResponse, error) + // Get a fund migration by ID + GetFundMigration(ctx context.Context, in *QueryGetFundMigrationRequest, opts ...grpc.CallOption) (*QueryGetFundMigrationResponse, error) + // List pending fund migrations + PendingFundMigrations(ctx context.Context, in *QueryPendingFundMigrationsRequest, opts ...grpc.CallOption) (*QueryPendingFundMigrationsResponse, error) + // List all fund migrations (paginated) + AllFundMigrations(ctx context.Context, in *QueryAllFundMigrationsRequest, opts ...grpc.CallOption) (*QueryAllFundMigrationsResponse, error) } type queryClient struct { @@ -1240,6 +1528,33 @@ func (c *queryClient) AllTssEvents(ctx context.Context, in *QueryAllTssEventsReq return out, nil } +func (c *queryClient) GetFundMigration(ctx context.Context, in *QueryGetFundMigrationRequest, opts ...grpc.CallOption) (*QueryGetFundMigrationResponse, error) { + out := new(QueryGetFundMigrationResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/GetFundMigration", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PendingFundMigrations(ctx context.Context, in *QueryPendingFundMigrationsRequest, opts ...grpc.CallOption) (*QueryPendingFundMigrationsResponse, error) { + out := new(QueryPendingFundMigrationsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/PendingFundMigrations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllFundMigrations(ctx context.Context, in *QueryAllFundMigrationsRequest, opts ...grpc.CallOption) (*QueryAllFundMigrationsResponse, error) { + out := new(QueryAllFundMigrationsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/AllFundMigrations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries module parameters. @@ -1264,6 +1579,12 @@ type QueryServer interface { AllPendingTssEvents(context.Context, *QueryAllPendingTssEventsRequest) (*QueryAllPendingTssEventsResponse, error) // List all TSS events (paginated) AllTssEvents(context.Context, *QueryAllTssEventsRequest) (*QueryAllTssEventsResponse, error) + // Get a fund migration by ID + GetFundMigration(context.Context, *QueryGetFundMigrationRequest) (*QueryGetFundMigrationResponse, error) + // List pending fund migrations + PendingFundMigrations(context.Context, *QueryPendingFundMigrationsRequest) (*QueryPendingFundMigrationsResponse, error) + // List all fund migrations (paginated) + AllFundMigrations(context.Context, *QueryAllFundMigrationsRequest) (*QueryAllFundMigrationsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1303,6 +1624,15 @@ func (*UnimplementedQueryServer) AllPendingTssEvents(ctx context.Context, req *Q func (*UnimplementedQueryServer) AllTssEvents(ctx context.Context, req *QueryAllTssEventsRequest) (*QueryAllTssEventsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllTssEvents not implemented") } +func (*UnimplementedQueryServer) GetFundMigration(ctx context.Context, req *QueryGetFundMigrationRequest) (*QueryGetFundMigrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFundMigration not implemented") +} +func (*UnimplementedQueryServer) PendingFundMigrations(ctx context.Context, req *QueryPendingFundMigrationsRequest) (*QueryPendingFundMigrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PendingFundMigrations not implemented") +} +func (*UnimplementedQueryServer) AllFundMigrations(ctx context.Context, req *QueryAllFundMigrationsRequest) (*QueryAllFundMigrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllFundMigrations not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1506,6 +1836,60 @@ func _Query_AllTssEvents_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Query_GetFundMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetFundMigrationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetFundMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/GetFundMigration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetFundMigration(ctx, req.(*QueryGetFundMigrationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PendingFundMigrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPendingFundMigrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PendingFundMigrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/PendingFundMigrations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PendingFundMigrations(ctx, req.(*QueryPendingFundMigrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllFundMigrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllFundMigrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllFundMigrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/AllFundMigrations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllFundMigrations(ctx, req.(*QueryAllFundMigrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "utss.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1554,6 +1938,18 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AllTssEvents", Handler: _Query_AllTssEvents_Handler, }, + { + MethodName: "GetFundMigration", + Handler: _Query_GetFundMigration_Handler, + }, + { + MethodName: "PendingFundMigrations", + Handler: _Query_PendingFundMigrations_Handler, + }, + { + MethodName: "AllFundMigrations", + Handler: _Query_AllFundMigrations_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/query.proto", @@ -2323,29 +2719,236 @@ func (m *QueryAllTssEventsResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryGetFundMigrationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n + +func (m *QueryGetFundMigrationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetFundMigrationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGetFundMigrationResponse) 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 *QueryGetFundMigrationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetFundMigrationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Migration != nil { + { + size, err := m.Migration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPendingFundMigrationsRequest) 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 *QueryPendingFundMigrationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingFundMigrationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryPendingFundMigrationsResponse) 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 *QueryPendingFundMigrationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingFundMigrationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Migrations) > 0 { + for iNdEx := len(m.Migrations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Migrations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAllFundMigrationsRequest) 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 *QueryAllFundMigrationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllFundMigrationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllFundMigrationsResponse) 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 *QueryAllFundMigrationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllFundMigrationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Migrations) > 0 { + for iNdEx := len(m.Migrations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Migrations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -2590,52 +3193,560 @@ func (m *QueryAllPendingTssEventsResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllTssEventsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllTssEventsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllTssEventsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetFundMigrationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryGetFundMigrationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Migration != nil { + l = m.Migration.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPendingFundMigrationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryPendingFundMigrationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Migrations) > 0 { + for _, e := range m.Migrations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAllFundMigrationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllFundMigrationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Migrations) > 0 { + for _, e := range m.Migrations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentProcessRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentProcessRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentProcessResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &TssKeyProcess{} + } + if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProcessByIdRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProcessByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProcessByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProcessByIdResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProcessByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProcessByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &TssKeyProcess{} + } + if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func (m *QueryAllTssEventsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllProcessesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2658,12 +3769,48 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllProcessesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2685,7 +3832,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllProcessesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2708,15 +3855,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllProcessesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllProcessesResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2743,10 +3890,44 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} + m.Processes = append(m.Processes, &TssKeyProcess{}) + if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2771,7 +3952,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentProcessRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCurrentKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2794,10 +3975,10 @@ func (m *QueryCurrentProcessRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentProcessRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCurrentKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCurrentKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2821,7 +4002,7 @@ func (m *QueryCurrentProcessRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentProcessResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCurrentKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2844,15 +4025,15 @@ func (m *QueryCurrentProcessResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentProcessResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCurrentKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCurrentKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2879,10 +4060,10 @@ func (m *QueryCurrentProcessResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Process == nil { - m.Process = &TssKeyProcess{} + if m.Key == nil { + m.Key = &TssKey{} } - if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2907,7 +4088,7 @@ func (m *QueryCurrentProcessResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryProcessByIdRequest) Unmarshal(dAtA []byte) error { +func (m *QueryKeyByIdRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2930,17 +4111,17 @@ func (m *QueryProcessByIdRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryProcessByIdRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryKeyByIdRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProcessByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryKeyByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) } - m.Id = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2950,11 +4131,24 @@ func (m *QueryProcessByIdRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2976,7 +4170,7 @@ func (m *QueryProcessByIdRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryProcessByIdResponse) Unmarshal(dAtA []byte) error { +func (m *QueryKeyByIdResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2999,15 +4193,15 @@ func (m *QueryProcessByIdResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryProcessByIdResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryKeyByIdResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProcessByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryKeyByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3034,10 +4228,10 @@ func (m *QueryProcessByIdResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Process == nil { - m.Process = &TssKeyProcess{} + if m.Key == nil { + m.Key = &TssKey{} } - if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3062,7 +4256,7 @@ func (m *QueryProcessByIdResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllProcessesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllKeysRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3085,10 +4279,10 @@ func (m *QueryAllProcessesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllProcessesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllKeysRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3148,7 +4342,7 @@ func (m *QueryAllProcessesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllProcessesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3171,15 +4365,15 @@ func (m *QueryAllProcessesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllProcessesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllKeysResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3206,8 +4400,8 @@ func (m *QueryAllProcessesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Processes = append(m.Processes, &TssKeyProcess{}) - if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Keys = append(m.Keys, &TssKey{}) + if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3268,7 +4462,7 @@ func (m *QueryAllProcessesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentKeyRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetTssEventRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3291,12 +4485,31 @@ func (m *QueryCurrentKeyRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentKeyRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetTssEventRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetTssEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3318,7 +4531,7 @@ func (m *QueryCurrentKeyRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentKeyResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetTssEventResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3341,15 +4554,15 @@ func (m *QueryCurrentKeyResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentKeyResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetTssEventResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetTssEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3376,10 +4589,10 @@ func (m *QueryCurrentKeyResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Key == nil { - m.Key = &TssKey{} + if m.Event == nil { + m.Event = &TssEvent{} } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3404,7 +4617,7 @@ func (m *QueryCurrentKeyResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryKeyByIdRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetPendingTssEventRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3427,17 +4640,17 @@ func (m *QueryKeyByIdRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryKeyByIdRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetPendingTssEventRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryKeyByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetPendingTssEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) } - var stringLen uint64 + m.ProcessId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3447,24 +4660,11 @@ func (m *QueryKeyByIdRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ProcessId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3486,7 +4686,7 @@ func (m *QueryKeyByIdRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryKeyByIdResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetPendingTssEventResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3509,15 +4709,15 @@ func (m *QueryKeyByIdResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryKeyByIdResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetPendingTssEventResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryKeyByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetPendingTssEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3544,10 +4744,10 @@ func (m *QueryKeyByIdResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Key == nil { - m.Key = &TssKey{} + if m.Event == nil { + m.Event = &TssEvent{} } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3572,7 +4772,7 @@ func (m *QueryKeyByIdResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllKeysRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllPendingTssEventsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3595,10 +4795,10 @@ func (m *QueryAllKeysRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllKeysRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllPendingTssEventsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllPendingTssEventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3658,7 +4858,7 @@ func (m *QueryAllKeysRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllPendingTssEventsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3681,15 +4881,15 @@ func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllKeysResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllPendingTssEventsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllPendingTssEventsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3716,8 +4916,8 @@ func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Keys = append(m.Keys, &TssKey{}) - if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Events = append(m.Events, &TssEvent{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3778,7 +4978,7 @@ func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetTssEventRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllTssEventsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3801,17 +5001,17 @@ func (m *QueryGetTssEventRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetTssEventRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllTssEventsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetTssEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllTssEventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - m.Id = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3821,11 +5021,28 @@ func (m *QueryGetTssEventRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3847,7 +5064,7 @@ func (m *QueryGetTssEventRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetTssEventResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllTssEventsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3870,15 +5087,15 @@ func (m *QueryGetTssEventResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetTssEventResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllTssEventsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetTssEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllTssEventsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3905,10 +5122,44 @@ func (m *QueryGetTssEventResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Event == nil { - m.Event = &TssEvent{} + m.Events = append(m.Events, &TssEvent{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3933,7 +5184,7 @@ func (m *QueryGetTssEventResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetPendingTssEventRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetFundMigrationRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3956,17 +5207,17 @@ func (m *QueryGetPendingTssEventRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetPendingTssEventRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetFundMigrationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetPendingTssEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetFundMigrationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - m.ProcessId = 0 + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3976,7 +5227,7 @@ func (m *QueryGetPendingTssEventRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProcessId |= uint64(b&0x7F) << shift + m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4002,7 +5253,7 @@ func (m *QueryGetPendingTssEventRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetPendingTssEventResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetFundMigrationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4025,15 +5276,15 @@ func (m *QueryGetPendingTssEventResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetPendingTssEventResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetFundMigrationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetPendingTssEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetFundMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Migration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4060,10 +5311,10 @@ func (m *QueryGetPendingTssEventResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Event == nil { - m.Event = &TssEvent{} + if m.Migration == nil { + m.Migration = &FundMigration{} } - if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Migration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4088,7 +5339,7 @@ func (m *QueryGetPendingTssEventResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllPendingTssEventsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryPendingFundMigrationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4111,48 +5362,12 @@ func (m *QueryAllPendingTssEventsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllPendingTssEventsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPendingFundMigrationsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllPendingTssEventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPendingFundMigrationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4174,7 +5389,7 @@ func (m *QueryAllPendingTssEventsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllPendingTssEventsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPendingFundMigrationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4197,49 +5412,15 @@ func (m *QueryAllPendingTssEventsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllPendingTssEventsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPendingFundMigrationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllPendingTssEventsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPendingFundMigrationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &TssEvent{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Migrations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4266,10 +5447,8 @@ func (m *QueryAllPendingTssEventsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Migrations = append(m.Migrations, &FundMigration{}) + if err := m.Migrations[len(m.Migrations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4294,7 +5473,7 @@ func (m *QueryAllPendingTssEventsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllTssEventsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllFundMigrationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4317,10 +5496,10 @@ func (m *QueryAllTssEventsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllTssEventsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllFundMigrationsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllTssEventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllFundMigrationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4380,7 +5559,7 @@ func (m *QueryAllTssEventsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllTssEventsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllFundMigrationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4403,15 +5582,15 @@ func (m *QueryAllTssEventsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllTssEventsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllFundMigrationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllTssEventsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllFundMigrationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Migrations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4438,8 +5617,8 @@ func (m *QueryAllTssEventsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Events = append(m.Events, &TssEvent{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Migrations = append(m.Migrations, &FundMigration{}) + if err := m.Migrations[len(m.Migrations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/utss/types/query.pb.gw.go b/x/utss/types/query.pb.gw.go index 0054ac36..a924b4b8 100644 --- a/x/utss/types/query.pb.gw.go +++ b/x/utss/types/query.pb.gw.go @@ -447,6 +447,114 @@ func local_request_Query_AllTssEvents_0(ctx context.Context, marshaler runtime.M } +func request_Query_GetFundMigration_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetFundMigrationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetFundMigration(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetFundMigration_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetFundMigrationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetFundMigration(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PendingFundMigrations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPendingFundMigrationsRequest + var metadata runtime.ServerMetadata + + msg, err := client.PendingFundMigrations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PendingFundMigrations_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPendingFundMigrationsRequest + var metadata runtime.ServerMetadata + + msg, err := server.PendingFundMigrations(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllFundMigrations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllFundMigrations_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllFundMigrationsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllFundMigrations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllFundMigrations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllFundMigrations_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllFundMigrationsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllFundMigrations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllFundMigrations(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -706,6 +814,75 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetFundMigration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetFundMigration_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetFundMigration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PendingFundMigrations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_PendingFundMigrations_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PendingFundMigrations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllFundMigrations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllFundMigrations_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllFundMigrations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -967,6 +1144,66 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetFundMigration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetFundMigration_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetFundMigration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PendingFundMigrations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_PendingFundMigrations_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PendingFundMigrations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllFundMigrations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllFundMigrations_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllFundMigrations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -992,6 +1229,12 @@ var ( pattern_Query_AllPendingTssEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"utss", "v1", "event", "pending"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllTssEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "event"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetFundMigration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"utss", "v1", "migration", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PendingFundMigrations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"utss", "v1", "migration", "pending"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllFundMigrations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "migration"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1016,4 +1259,10 @@ var ( forward_Query_AllPendingTssEvents_0 = runtime.ForwardResponseMessage forward_Query_AllTssEvents_0 = runtime.ForwardResponseMessage + + forward_Query_GetFundMigration_0 = runtime.ForwardResponseMessage + + forward_Query_PendingFundMigrations_0 = runtime.ForwardResponseMessage + + forward_Query_AllFundMigrations_0 = runtime.ForwardResponseMessage ) diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go index e739d5a4..b93c81a3 100644 --- a/x/utss/types/tx.pb.go +++ b/x/utss/types/tx.pb.go @@ -324,6 +324,217 @@ func (m *MsgVoteTssKeyProcessResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVoteTssKeyProcessResponse proto.InternalMessageInfo +// MsgInitiateFundMigration initiates fund migration from old vault to current vault for a chain. +// Admin-only. One message per chain. +type MsgInitiateFundMigration struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + OldKeyId string `protobuf:"bytes,2,opt,name=old_key_id,json=oldKeyId,proto3" json:"old_key_id,omitempty"` + Chain string `protobuf:"bytes,3,opt,name=chain,proto3" json:"chain,omitempty"` +} + +func (m *MsgInitiateFundMigration) Reset() { *m = MsgInitiateFundMigration{} } +func (m *MsgInitiateFundMigration) String() string { return proto.CompactTextString(m) } +func (*MsgInitiateFundMigration) ProtoMessage() {} +func (*MsgInitiateFundMigration) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{6} +} +func (m *MsgInitiateFundMigration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitiateFundMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitiateFundMigration.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 *MsgInitiateFundMigration) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitiateFundMigration.Merge(m, src) +} +func (m *MsgInitiateFundMigration) XXX_Size() int { + return m.Size() +} +func (m *MsgInitiateFundMigration) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitiateFundMigration.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitiateFundMigration proto.InternalMessageInfo + +func (m *MsgInitiateFundMigration) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgInitiateFundMigration) GetOldKeyId() string { + if m != nil { + return m.OldKeyId + } + return "" +} + +func (m *MsgInitiateFundMigration) GetChain() string { + if m != nil { + return m.Chain + } + return "" +} + +type MsgInitiateFundMigrationResponse struct { + MigrationId uint64 `protobuf:"varint,1,opt,name=migration_id,json=migrationId,proto3" json:"migration_id,omitempty"` +} + +func (m *MsgInitiateFundMigrationResponse) Reset() { *m = MsgInitiateFundMigrationResponse{} } +func (m *MsgInitiateFundMigrationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitiateFundMigrationResponse) ProtoMessage() {} +func (*MsgInitiateFundMigrationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{7} +} +func (m *MsgInitiateFundMigrationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitiateFundMigrationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitiateFundMigrationResponse.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 *MsgInitiateFundMigrationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitiateFundMigrationResponse.Merge(m, src) +} +func (m *MsgInitiateFundMigrationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitiateFundMigrationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitiateFundMigrationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitiateFundMigrationResponse proto.InternalMessageInfo + +func (m *MsgInitiateFundMigrationResponse) GetMigrationId() uint64 { + if m != nil { + return m.MigrationId + } + return 0 +} + +// MsgVoteFundMigration allows validators to vote on observed fund migration tx on external chain. +type MsgVoteFundMigration struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + MigrationId uint64 `protobuf:"varint,2,opt,name=migration_id,json=migrationId,proto3" json:"migration_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgVoteFundMigration) Reset() { *m = MsgVoteFundMigration{} } +func (m *MsgVoteFundMigration) String() string { return proto.CompactTextString(m) } +func (*MsgVoteFundMigration) ProtoMessage() {} +func (*MsgVoteFundMigration) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{8} +} +func (m *MsgVoteFundMigration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteFundMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteFundMigration.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 *MsgVoteFundMigration) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteFundMigration.Merge(m, src) +} +func (m *MsgVoteFundMigration) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteFundMigration) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteFundMigration.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteFundMigration proto.InternalMessageInfo + +func (m *MsgVoteFundMigration) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgVoteFundMigration) GetMigrationId() uint64 { + if m != nil { + return m.MigrationId + } + return 0 +} + +func (m *MsgVoteFundMigration) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *MsgVoteFundMigration) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +type MsgVoteFundMigrationResponse struct { +} + +func (m *MsgVoteFundMigrationResponse) Reset() { *m = MsgVoteFundMigrationResponse{} } +func (m *MsgVoteFundMigrationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteFundMigrationResponse) ProtoMessage() {} +func (*MsgVoteFundMigrationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{9} +} +func (m *MsgVoteFundMigrationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteFundMigrationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteFundMigrationResponse.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 *MsgVoteFundMigrationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteFundMigrationResponse.Merge(m, src) +} +func (m *MsgVoteFundMigrationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteFundMigrationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteFundMigrationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteFundMigrationResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "utss.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "utss.v1.MsgUpdateParamsResponse") @@ -331,47 +542,61 @@ func init() { proto.RegisterType((*MsgInitiateTssKeyProcessResponse)(nil), "utss.v1.MsgInitiateTssKeyProcessResponse") proto.RegisterType((*MsgVoteTssKeyProcess)(nil), "utss.v1.MsgVoteTssKeyProcess") proto.RegisterType((*MsgVoteTssKeyProcessResponse)(nil), "utss.v1.MsgVoteTssKeyProcessResponse") + proto.RegisterType((*MsgInitiateFundMigration)(nil), "utss.v1.MsgInitiateFundMigration") + proto.RegisterType((*MsgInitiateFundMigrationResponse)(nil), "utss.v1.MsgInitiateFundMigrationResponse") + proto.RegisterType((*MsgVoteFundMigration)(nil), "utss.v1.MsgVoteFundMigration") + proto.RegisterType((*MsgVoteFundMigrationResponse)(nil), "utss.v1.MsgVoteFundMigrationResponse") } func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } var fileDescriptor_4dcb8cba4d8073e4 = []byte{ - // 558 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xda, 0x40, - 0x18, 0xc5, 0xf9, 0x41, 0xc5, 0x25, 0x4a, 0x1a, 0x37, 0x08, 0x63, 0x35, 0x2e, 0xb5, 0x54, 0x89, - 0x20, 0x61, 0x17, 0x2a, 0x75, 0x60, 0x2b, 0x1b, 0x8d, 0x90, 0x90, 0x4b, 0x2b, 0xb5, 0x0b, 0x32, - 0xf8, 0x74, 0x58, 0xc8, 0x3e, 0xcb, 0xdf, 0x11, 0xc5, 0x5b, 0xd5, 0xa9, 0xea, 0xd4, 0xb9, 0x7f, - 0x05, 0x43, 0x87, 0xfe, 0x09, 0x8c, 0x51, 0xa7, 0x4e, 0x55, 0x05, 0x03, 0xff, 0x46, 0xe5, 0xf3, - 0x19, 0x08, 0x21, 0xcd, 0xd0, 0xc5, 0xfa, 0xee, 0x7d, 0xef, 0x7b, 0x7e, 0xef, 0xee, 0x6c, 0xf4, - 0x70, 0xcc, 0x00, 0xcc, 0xcb, 0x9a, 0xc9, 0xae, 0x8c, 0x20, 0xa4, 0x8c, 0xca, 0x0f, 0x62, 0xc4, - 0xb8, 0xac, 0xa9, 0x85, 0x01, 0x05, 0x8f, 0x82, 0xe9, 0x01, 0x89, 0x09, 0x1e, 0x90, 0x84, 0xa1, - 0xe6, 0xd3, 0x19, 0x82, 0x7d, 0x0c, 0x2e, 0x08, 0xf8, 0xd1, 0x52, 0x2a, 0x0a, 0x70, 0x0a, 0x9e, - 0x12, 0x4a, 0x28, 0x2f, 0xcd, 0xb8, 0x12, 0x68, 0x31, 0x91, 0xee, 0x25, 0x8d, 0x64, 0x21, 0x5a, - 0x27, 0xb6, 0xe7, 0xfa, 0xd4, 0xe4, 0xcf, 0x04, 0xd2, 0x3f, 0x4b, 0xe8, 0xb8, 0x0d, 0xe4, 0x6d, - 0xe0, 0xd8, 0x0c, 0x77, 0xec, 0xd0, 0xf6, 0x40, 0x7e, 0x89, 0x72, 0xf6, 0x98, 0x0d, 0x69, 0xe8, - 0xb2, 0x48, 0x91, 0x4a, 0x52, 0x39, 0xd7, 0x54, 0x7e, 0x7e, 0xaf, 0x9e, 0x0a, 0xad, 0x57, 0x8e, - 0x13, 0x62, 0x80, 0x37, 0x2c, 0x74, 0x7d, 0x62, 0xad, 0xa8, 0x72, 0x15, 0x65, 0x03, 0xae, 0xa0, - 0xec, 0x94, 0xa4, 0xf2, 0x41, 0xfd, 0xd8, 0x10, 0x71, 0x8d, 0x44, 0xb8, 0xb9, 0x37, 0xfd, 0xfd, - 0x24, 0x63, 0x09, 0x52, 0xe3, 0xe8, 0xd3, 0x62, 0x52, 0x59, 0x8d, 0xeb, 0x45, 0x54, 0xd8, 0x70, - 0x62, 0x61, 0x08, 0xa8, 0x0f, 0x58, 0xff, 0x21, 0x21, 0xa5, 0x0d, 0xa4, 0xe5, 0xbb, 0xcc, 0xb5, - 0x19, 0xee, 0x02, 0x5c, 0xe0, 0xa8, 0x13, 0xd2, 0x01, 0x06, 0x90, 0x9f, 0xa3, 0x2c, 0xb8, 0xc4, - 0xc7, 0xe1, 0xbd, 0x5e, 0x05, 0x4f, 0x6e, 0xa0, 0xc3, 0x20, 0x19, 0xee, 0xc5, 0xfb, 0xc9, 0xed, - 0x1e, 0xd5, 0x0b, 0x4b, 0xbb, 0x5d, 0x00, 0x21, 0xde, 0x8d, 0x02, 0x6c, 0x1d, 0x04, 0xab, 0x45, - 0xc3, 0x88, 0x5d, 0x0b, 0xa1, 0x2f, 0x8b, 0x49, 0x45, 0xe3, 0x27, 0xd3, 0x06, 0xf2, 0x8e, 0x32, - 0x9c, 0x1a, 0x5c, 0xb9, 0xd3, 0x75, 0x54, 0xba, 0xcb, 0xf9, 0x32, 0xde, 0x54, 0x42, 0xa7, 0x42, - 0xe1, 0x7f, 0xa3, 0x9d, 0x21, 0xc4, 0x00, 0x7a, 0xc1, 0xb8, 0x3f, 0xc2, 0x11, 0x0f, 0x96, 0xb3, - 0x72, 0x0c, 0xa0, 0xc3, 0x01, 0x39, 0x8f, 0xb2, 0x23, 0x1c, 0xf5, 0x5c, 0x47, 0xd9, 0xe5, 0xad, - 0xfd, 0x11, 0x8e, 0x5a, 0x4e, 0x3c, 0x95, 0x6e, 0x88, 0xeb, 0x28, 0x7b, 0x25, 0xa9, 0xbc, 0x67, - 0xe5, 0x04, 0xd2, 0x72, 0x1a, 0xe7, 0x1b, 0x99, 0x8b, 0xeb, 0x99, 0x6f, 0x38, 0xd6, 0x35, 0xf4, - 0x78, 0x1b, 0x9e, 0x46, 0xad, 0x7f, 0xdb, 0x41, 0xbb, 0x6d, 0x20, 0xf2, 0x6b, 0x74, 0x78, 0xe3, - 0xce, 0x29, 0xcb, 0xcd, 0xdf, 0xb8, 0x03, 0x6a, 0xe9, 0xae, 0x4e, 0xaa, 0x29, 0x63, 0x94, 0xdf, - 0x7e, 0x33, 0x9e, 0xae, 0x8f, 0x6e, 0xa5, 0xa8, 0xe7, 0xf7, 0x52, 0x96, 0xaf, 0x79, 0x8f, 0x4e, - 0x6e, 0x9f, 0xd0, 0xd9, 0xfa, 0xfc, 0xad, 0xb6, 0xfa, 0xec, 0x9f, 0xed, 0x54, 0x5a, 0xdd, 0xff, - 0xb8, 0x98, 0x54, 0xa4, 0xe6, 0xc5, 0x74, 0xa6, 0x49, 0xd7, 0x33, 0x4d, 0xfa, 0x33, 0xd3, 0xa4, - 0xaf, 0x73, 0x2d, 0x73, 0x3d, 0xd7, 0x32, 0xbf, 0xe6, 0x5a, 0xe6, 0x43, 0x8d, 0xb8, 0x6c, 0x38, - 0xee, 0x1b, 0x03, 0xea, 0x99, 0xc1, 0x18, 0x86, 0x83, 0xa1, 0xed, 0xfa, 0xbc, 0xaa, 0xf2, 0xb2, - 0xea, 0x53, 0x07, 0x9b, 0x57, 0x26, 0x3f, 0x18, 0xfe, 0x8f, 0xe8, 0x67, 0xf9, 0x07, 0xfe, 0xe2, - 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x63, 0xd1, 0x03, 0x86, 0x04, 0x00, 0x00, + // 711 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x4e, 0xdb, 0x4a, + 0x14, 0xc7, 0x63, 0x3e, 0x02, 0x19, 0x10, 0x5c, 0x7c, 0x83, 0x62, 0x22, 0xf0, 0x0d, 0x96, 0x90, + 0x00, 0x29, 0xf1, 0x85, 0x4a, 0x5d, 0x64, 0x57, 0xa4, 0x56, 0x4d, 0x51, 0x24, 0xe4, 0xd2, 0x4a, + 0xed, 0x26, 0x32, 0xf1, 0xc8, 0x1e, 0x81, 0x3d, 0x96, 0xcf, 0x18, 0xc5, 0xbb, 0xaa, 0xab, 0xaa, + 0xab, 0xbe, 0x49, 0x59, 0x74, 0xd1, 0x47, 0xa0, 0x3b, 0xd4, 0x55, 0x17, 0x55, 0x55, 0xc1, 0x82, + 0xd7, 0xa8, 0x3c, 0x1e, 0x3b, 0x38, 0x31, 0x20, 0x95, 0x4d, 0x34, 0x73, 0xbe, 0xe6, 0xff, 0x3b, + 0x67, 0x26, 0x46, 0xff, 0x84, 0x0c, 0x40, 0x3f, 0xdd, 0xd1, 0xd9, 0xa0, 0xe5, 0x07, 0x94, 0x51, + 0x79, 0x26, 0xb6, 0xb4, 0x4e, 0x77, 0xea, 0xb5, 0x3e, 0x05, 0x97, 0x82, 0xee, 0x82, 0x1d, 0x07, + 0xb8, 0x60, 0x27, 0x11, 0xf5, 0xe5, 0x34, 0xc7, 0xc6, 0x1e, 0x06, 0x02, 0xc2, 0xfc, 0x6f, 0x56, + 0x2a, 0xf2, 0x71, 0x6a, 0xac, 0xda, 0xd4, 0xa6, 0x7c, 0xa9, 0xc7, 0x2b, 0x61, 0x5d, 0x49, 0x4a, + 0xf7, 0x12, 0x47, 0xb2, 0x11, 0xae, 0x25, 0xd3, 0x25, 0x1e, 0xd5, 0xf9, 0x6f, 0x62, 0xd2, 0x3e, + 0x48, 0x68, 0xb1, 0x0b, 0xf6, 0x2b, 0xdf, 0x32, 0x19, 0x3e, 0x30, 0x03, 0xd3, 0x05, 0xf9, 0x31, + 0xaa, 0x98, 0x21, 0x73, 0x68, 0x40, 0x58, 0xa4, 0x48, 0x0d, 0x69, 0xb3, 0xb2, 0xa7, 0x7c, 0xff, + 0xd2, 0xac, 0x8a, 0x5a, 0x4f, 0x2c, 0x2b, 0xc0, 0x00, 0x2f, 0x59, 0x40, 0x3c, 0xdb, 0x18, 0x86, + 0xca, 0x4d, 0x54, 0xf6, 0x79, 0x05, 0x65, 0xa2, 0x21, 0x6d, 0xce, 0xed, 0x2e, 0xb6, 0x04, 0x6e, + 0x2b, 0x29, 0xbc, 0x37, 0x75, 0xfe, 0xeb, 0xbf, 0x92, 0x21, 0x82, 0xda, 0x0b, 0xef, 0xaf, 0xcf, + 0xb6, 0x87, 0xe9, 0xda, 0x0a, 0xaa, 0x8d, 0x28, 0x31, 0x30, 0xf8, 0xd4, 0x03, 0xac, 0x7d, 0x95, + 0x90, 0xd2, 0x05, 0xbb, 0xe3, 0x11, 0x46, 0x4c, 0x86, 0x0f, 0x01, 0xf6, 0x71, 0x74, 0x10, 0xd0, + 0x3e, 0x06, 0x90, 0xff, 0x47, 0x65, 0x20, 0xb6, 0x87, 0x83, 0x7b, 0xb5, 0x8a, 0x38, 0xb9, 0x8d, + 0xe6, 0xfd, 0x24, 0xb9, 0x17, 0xf7, 0x93, 0xcb, 0x5d, 0xd8, 0xad, 0x65, 0x72, 0x0f, 0x01, 0x44, + 0xf1, 0xc3, 0xc8, 0xc7, 0xc6, 0x9c, 0x3f, 0xdc, 0xb4, 0x5b, 0xb1, 0x6a, 0x51, 0xe8, 0xe3, 0xf5, + 0xd9, 0xb6, 0xca, 0x27, 0xd3, 0x05, 0xfb, 0x35, 0x65, 0x38, 0x15, 0x38, 0x54, 0xa7, 0x69, 0xa8, + 0x71, 0x9b, 0xf2, 0x0c, 0xef, 0x5c, 0x42, 0x55, 0x51, 0xe1, 0xa1, 0x68, 0x6b, 0x08, 0x31, 0x80, + 0x9e, 0x1f, 0x1e, 0x1d, 0xe3, 0x88, 0x83, 0x55, 0x8c, 0x0a, 0x03, 0x38, 0xe0, 0x06, 0x79, 0x19, + 0x95, 0x8f, 0x71, 0xd4, 0x23, 0x96, 0x32, 0xc9, 0x5d, 0xd3, 0xc7, 0x38, 0xea, 0x58, 0x71, 0x56, + 0xda, 0x10, 0x62, 0x29, 0x53, 0x0d, 0x69, 0x73, 0xca, 0xa8, 0x08, 0x4b, 0xc7, 0x6a, 0x6f, 0x8d, + 0x30, 0xaf, 0xdc, 0x64, 0xce, 0x29, 0xd6, 0x54, 0xb4, 0x5a, 0x64, 0xcf, 0x50, 0x3f, 0xe7, 0x27, + 0xf9, 0x2c, 0xf4, 0xac, 0x2e, 0xb1, 0x03, 0x93, 0x11, 0xea, 0xfd, 0x05, 0xee, 0x2a, 0x42, 0xf4, + 0xc4, 0xea, 0x09, 0xa6, 0x04, 0x77, 0x96, 0x9e, 0x58, 0xfb, 0x1c, 0xab, 0x8a, 0xa6, 0xfb, 0x8e, + 0x49, 0xbc, 0x14, 0x96, 0x6f, 0xda, 0xcd, 0x11, 0x9a, 0xb5, 0x94, 0xa6, 0x50, 0x94, 0xf6, 0x34, + 0x37, 0xc0, 0x9c, 0x2f, 0xa5, 0x92, 0xd7, 0xd1, 0xbc, 0x9b, 0x1a, 0x63, 0x21, 0x12, 0xef, 0xe0, + 0x5c, 0x66, 0xeb, 0x58, 0xda, 0xb7, 0xe1, 0x8c, 0x1f, 0x0a, 0x3d, 0x7a, 0xda, 0xc4, 0xd8, 0x69, + 0x72, 0x0d, 0xcd, 0xb0, 0x41, 0xcf, 0x31, 0xc1, 0x11, 0xec, 0x65, 0x36, 0x78, 0x6e, 0x82, 0x23, + 0x2b, 0x68, 0x06, 0xc2, 0x7e, 0x3c, 0x12, 0x3e, 0xe6, 0x59, 0x23, 0xdd, 0xde, 0x3d, 0xe4, 0x7c, + 0x4b, 0x86, 0x43, 0x2e, 0x6c, 0xc7, 0xee, 0xcf, 0x49, 0x34, 0xd9, 0x05, 0x5b, 0x7e, 0x81, 0xe6, + 0x73, 0x7f, 0x2c, 0x4a, 0xf6, 0xc2, 0x46, 0x1e, 0x7a, 0xbd, 0x71, 0x9b, 0x27, 0x6b, 0x31, 0x46, + 0xcb, 0xc5, 0xcf, 0x7f, 0xfd, 0x66, 0x6a, 0x61, 0x48, 0x7d, 0xeb, 0xde, 0x90, 0xec, 0x98, 0x37, + 0x68, 0x69, 0xfc, 0x19, 0xae, 0xdd, 0xcc, 0x1f, 0x73, 0xd7, 0x37, 0xee, 0x74, 0x17, 0x11, 0xe4, + 0x6f, 0x40, 0x21, 0x41, 0x2e, 0xa4, 0x98, 0xa0, 0xf8, 0x2e, 0x0a, 0x82, 0xfc, 0x11, 0x63, 0x04, + 0xf9, 0xf2, 0x1b, 0x77, 0xba, 0xd3, 0xd2, 0xf5, 0xe9, 0x77, 0xd7, 0x67, 0xdb, 0xd2, 0xde, 0xfe, + 0xf9, 0xa5, 0x2a, 0x5d, 0x5c, 0xaa, 0xd2, 0xef, 0x4b, 0x55, 0xfa, 0x74, 0xa5, 0x96, 0x2e, 0xae, + 0xd4, 0xd2, 0x8f, 0x2b, 0xb5, 0xf4, 0x76, 0xc7, 0x26, 0xcc, 0x09, 0x8f, 0x5a, 0x7d, 0xea, 0xea, + 0x7e, 0x08, 0x0e, 0x7f, 0x70, 0x7c, 0xd5, 0xe4, 0xcb, 0xa6, 0x47, 0x2d, 0xac, 0x0f, 0x74, 0x7e, + 0xb5, 0xf8, 0xa7, 0xec, 0xa8, 0xcc, 0xbf, 0x43, 0x8f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7f, + 0xd9, 0x50, 0x46, 0x2d, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -394,6 +619,10 @@ type MsgClient interface { InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) // VoteTssKeyProcess defines a operation for voting on an existing tss key process VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) + // InitiateFundMigration initiates fund migration from an old TSS key vault to the current one + InitiateFundMigration(ctx context.Context, in *MsgInitiateFundMigration, opts ...grpc.CallOption) (*MsgInitiateFundMigrationResponse, error) + // VoteFundMigration allows validators to vote on an observed fund migration tx + VoteFundMigration(ctx context.Context, in *MsgVoteFundMigration, opts ...grpc.CallOption) (*MsgVoteFundMigrationResponse, error) } type msgClient struct { @@ -431,6 +660,24 @@ func (c *msgClient) VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProc return out, nil } +func (c *msgClient) InitiateFundMigration(ctx context.Context, in *MsgInitiateFundMigration, opts ...grpc.CallOption) (*MsgInitiateFundMigrationResponse, error) { + out := new(MsgInitiateFundMigrationResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/InitiateFundMigration", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) VoteFundMigration(ctx context.Context, in *MsgVoteFundMigration, opts ...grpc.CallOption) (*MsgVoteFundMigrationResponse, error) { + out := new(MsgVoteFundMigrationResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/VoteFundMigration", 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. @@ -441,6 +688,10 @@ type MsgServer interface { InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) // VoteTssKeyProcess defines a operation for voting on an existing tss key process VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) + // InitiateFundMigration initiates fund migration from an old TSS key vault to the current one + InitiateFundMigration(context.Context, *MsgInitiateFundMigration) (*MsgInitiateFundMigrationResponse, error) + // VoteFundMigration allows validators to vote on an observed fund migration tx + VoteFundMigration(context.Context, *MsgVoteFundMigration) (*MsgVoteFundMigrationResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -456,6 +707,12 @@ func (*UnimplementedMsgServer) InitiateTssKeyProcess(ctx context.Context, req *M func (*UnimplementedMsgServer) VoteTssKeyProcess(ctx context.Context, req *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteTssKeyProcess not implemented") } +func (*UnimplementedMsgServer) InitiateFundMigration(ctx context.Context, req *MsgInitiateFundMigration) (*MsgInitiateFundMigrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitiateFundMigration not implemented") +} +func (*UnimplementedMsgServer) VoteFundMigration(ctx context.Context, req *MsgVoteFundMigration) (*MsgVoteFundMigrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteFundMigration not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -515,6 +772,42 @@ func _Msg_VoteTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_InitiateFundMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitiateFundMigration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitiateFundMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/InitiateFundMigration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitiateFundMigration(ctx, req.(*MsgInitiateFundMigration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_VoteFundMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteFundMigration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteFundMigration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/VoteFundMigration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteFundMigration(ctx, req.(*MsgVoteFundMigration)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "utss.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -531,6 +824,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "VoteTssKeyProcess", Handler: _Msg_VoteTssKeyProcess_Handler, }, + { + MethodName: "InitiateFundMigration", + Handler: _Msg_InitiateFundMigration_Handler, + }, + { + MethodName: "VoteFundMigration", + Handler: _Msg_VoteFundMigration_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/tx.proto", @@ -729,75 +1030,222 @@ func (m *MsgVoteTssKeyProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) +func (m *MsgInitiateFundMigration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return dAtA[:n], nil } -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *MsgInitiateFundMigration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgInitiateTssKeyProcess) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgInitiateFundMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Chain) > 0 { + i -= len(m.Chain) + copy(dAtA[i:], m.Chain) + i = encodeVarintTx(dAtA, i, uint64(len(m.Chain))) + i-- + dAtA[i] = 0x1a } - if m.ProcessType != 0 { - n += 1 + sovTx(uint64(m.ProcessType)) + if len(m.OldKeyId) > 0 { + i -= len(m.OldKeyId) + copy(dAtA[i:], m.OldKeyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.OldKeyId))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *MsgInitiateTssKeyProcessResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgInitiateFundMigrationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgVoteTssKeyProcess) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgInitiateFundMigrationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitiateFundMigrationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.MigrationId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.MigrationId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteFundMigration) 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 *MsgVoteFundMigration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteFundMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x1a + } + if m.MigrationId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.MigrationId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteFundMigrationResponse) 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 *MsgVoteFundMigrationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteFundMigrationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInitiateTssKeyProcess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ProcessType != 0 { + n += 1 + sovTx(uint64(m.ProcessType)) + } + return n +} + +func (m *MsgInitiateTssKeyProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgVoteTssKeyProcess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } l = len(m.TssPubkey) if l > 0 { @@ -810,25 +1258,406 @@ func (m *MsgVoteTssKeyProcess) Size() (n int) { if m.ProcessId != 0 { n += 1 + sovTx(uint64(m.ProcessId)) } - return n -} + return n +} + +func (m *MsgVoteTssKeyProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInitiateFundMigration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OldKeyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Chain) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgInitiateFundMigrationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MigrationId != 0 { + n += 1 + sovTx(uint64(m.MigrationId)) + } + return n +} + +func (m *MsgVoteFundMigration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.MigrationId != 0 { + n += 1 + sovTx(uint64(m.MigrationId)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Success { + n += 2 + } + return n +} + +func (m *MsgVoteFundMigrationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitiateTssKeyProcess) 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: MsgInitiateTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + m.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + } + } -func (m *MsgVoteTssKeyProcessResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n + return nil } +func (m *MsgInitiateTssKeyProcessResponse) 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: MsgInitiateTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: 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 + } + } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { +func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -851,15 +1680,15 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteTssKeyProcess: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -887,13 +1716,13 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -903,25 +1732,75 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + m.ProcessId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -943,7 +1822,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgVoteTssKeyProcessResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -966,10 +1845,10 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -993,7 +1872,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { +func (m *MsgInitiateFundMigration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1016,10 +1895,10 @@ func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgInitiateTssKeyProcess: wiretype end group for non-group") + return fmt.Errorf("proto: MsgInitiateFundMigration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInitiateTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgInitiateFundMigration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1055,10 +1934,10 @@ func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldKeyId", wireType) } - m.ProcessType = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1068,11 +1947,56 @@ func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProcessType |= TssProcessType(b&0x7F) << shift + 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.OldKeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Chain", 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.Chain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1094,7 +2018,7 @@ func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgInitiateTssKeyProcessResponse) Unmarshal(dAtA []byte) error { +func (m *MsgInitiateFundMigrationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1117,12 +2041,31 @@ func (m *MsgInitiateTssKeyProcessResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgInitiateFundMigrationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgInitiateFundMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MigrationId", wireType) + } + m.MigrationId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MigrationId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1144,7 +2087,7 @@ func (m *MsgInitiateTssKeyProcessResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { +func (m *MsgVoteFundMigration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1167,10 +2110,10 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgVoteTssKeyProcess: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteFundMigration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgVoteTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteFundMigration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1206,10 +2149,10 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MigrationId", wireType) } - var stringLen uint64 + m.MigrationId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1219,27 +2162,14 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.MigrationId |= 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.TssPubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1267,13 +2197,13 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.KeyId = string(dAtA[iNdEx:postIndex]) + m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } - m.ProcessId = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1283,11 +2213,12 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProcessId |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.Success = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1309,7 +2240,7 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgVoteTssKeyProcessResponse) Unmarshal(dAtA []byte) error { +func (m *MsgVoteFundMigrationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1332,10 +2263,10 @@ func (m *MsgVoteTssKeyProcessResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteFundMigrationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteFundMigrationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/utss/types/types.pb.go b/x/utss/types/types.pb.go index 9463de77..7d919814 100644 --- a/x/utss/types/types.pb.go +++ b/x/utss/types/types.pb.go @@ -137,6 +137,35 @@ func (TssEventStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_6ecfa9650339f6c3, []int{3} } +// Fund Migration +type FundMigrationStatus int32 + +const ( + FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING FundMigrationStatus = 0 + FundMigrationStatus_FUND_MIGRATION_STATUS_COMPLETED FundMigrationStatus = 1 + FundMigrationStatus_FUND_MIGRATION_STATUS_FAILED FundMigrationStatus = 2 +) + +var FundMigrationStatus_name = map[int32]string{ + 0: "FUND_MIGRATION_STATUS_PENDING", + 1: "FUND_MIGRATION_STATUS_COMPLETED", + 2: "FUND_MIGRATION_STATUS_FAILED", +} + +var FundMigrationStatus_value = map[string]int32{ + "FUND_MIGRATION_STATUS_PENDING": 0, + "FUND_MIGRATION_STATUS_COMPLETED": 1, + "FUND_MIGRATION_STATUS_FAILED": 2, +} + +func (x FundMigrationStatus) String() string { + return proto.EnumName(FundMigrationStatus_name, int32(x)) +} + +func (FundMigrationStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{4} +} + type Params struct { // The admin account of the utss module. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` @@ -466,71 +495,219 @@ func (m *TssEvent) GetTssPubkey() string { return "" } +type FundMigration struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + OldKeyId string `protobuf:"bytes,2,opt,name=old_key_id,json=oldKeyId,proto3" json:"old_key_id,omitempty"` + OldTssPubkey string `protobuf:"bytes,3,opt,name=old_tss_pubkey,json=oldTssPubkey,proto3" json:"old_tss_pubkey,omitempty"` + CurrentKeyId string `protobuf:"bytes,4,opt,name=current_key_id,json=currentKeyId,proto3" json:"current_key_id,omitempty"` + CurrentTssPubkey string `protobuf:"bytes,5,opt,name=current_tss_pubkey,json=currentTssPubkey,proto3" json:"current_tss_pubkey,omitempty"` + Chain string `protobuf:"bytes,6,opt,name=chain,proto3" json:"chain,omitempty"` + Status FundMigrationStatus `protobuf:"varint,7,opt,name=status,proto3,enum=utss.v1.FundMigrationStatus" json:"status,omitempty"` + InitiatedBlock int64 `protobuf:"varint,8,opt,name=initiated_block,json=initiatedBlock,proto3" json:"initiated_block,omitempty"` + CompletedBlock int64 `protobuf:"varint,9,opt,name=completed_block,json=completedBlock,proto3" json:"completed_block,omitempty"` + TxHash string `protobuf:"bytes,10,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + GasPrice string `protobuf:"bytes,11,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + GasLimit uint64 `protobuf:"varint,12,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` +} + +func (m *FundMigration) Reset() { *m = FundMigration{} } +func (m *FundMigration) String() string { return proto.CompactTextString(m) } +func (*FundMigration) ProtoMessage() {} +func (*FundMigration) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{4} +} +func (m *FundMigration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FundMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FundMigration.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 *FundMigration) XXX_Merge(src proto.Message) { + xxx_messageInfo_FundMigration.Merge(m, src) +} +func (m *FundMigration) XXX_Size() int { + return m.Size() +} +func (m *FundMigration) XXX_DiscardUnknown() { + xxx_messageInfo_FundMigration.DiscardUnknown(m) +} + +var xxx_messageInfo_FundMigration proto.InternalMessageInfo + +func (m *FundMigration) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *FundMigration) GetOldKeyId() string { + if m != nil { + return m.OldKeyId + } + return "" +} + +func (m *FundMigration) GetOldTssPubkey() string { + if m != nil { + return m.OldTssPubkey + } + return "" +} + +func (m *FundMigration) GetCurrentKeyId() string { + if m != nil { + return m.CurrentKeyId + } + return "" +} + +func (m *FundMigration) GetCurrentTssPubkey() string { + if m != nil { + return m.CurrentTssPubkey + } + return "" +} + +func (m *FundMigration) GetChain() string { + if m != nil { + return m.Chain + } + return "" +} + +func (m *FundMigration) GetStatus() FundMigrationStatus { + if m != nil { + return m.Status + } + return FundMigrationStatus_FUND_MIGRATION_STATUS_PENDING +} + +func (m *FundMigration) GetInitiatedBlock() int64 { + if m != nil { + return m.InitiatedBlock + } + return 0 +} + +func (m *FundMigration) GetCompletedBlock() int64 { + if m != nil { + return m.CompletedBlock + } + return 0 +} + +func (m *FundMigration) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *FundMigration) GetGasPrice() string { + if m != nil { + return m.GasPrice + } + return "" +} + +func (m *FundMigration) GetGasLimit() uint64 { + if m != nil { + return m.GasLimit + } + return 0 +} + func init() { proto.RegisterEnum("utss.v1.TssKeyProcessStatus", TssKeyProcessStatus_name, TssKeyProcessStatus_value) proto.RegisterEnum("utss.v1.TssProcessType", TssProcessType_name, TssProcessType_value) proto.RegisterEnum("utss.v1.TssEventType", TssEventType_name, TssEventType_value) proto.RegisterEnum("utss.v1.TssEventStatus", TssEventStatus_name, TssEventStatus_value) + proto.RegisterEnum("utss.v1.FundMigrationStatus", FundMigrationStatus_name, FundMigrationStatus_value) proto.RegisterType((*Params)(nil), "utss.v1.Params") proto.RegisterType((*TssKeyProcess)(nil), "utss.v1.TssKeyProcess") proto.RegisterType((*TssKey)(nil), "utss.v1.TssKey") proto.RegisterType((*TssEvent)(nil), "utss.v1.TssEvent") + proto.RegisterType((*FundMigration)(nil), "utss.v1.FundMigration") } func init() { proto.RegisterFile("utss/v1/types.proto", fileDescriptor_6ecfa9650339f6c3) } var fileDescriptor_6ecfa9650339f6c3 = []byte{ - // 788 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xc1, 0x6e, 0xe2, 0x56, - 0x14, 0xc5, 0x26, 0x61, 0x86, 0x1b, 0x26, 0x72, 0x1e, 0x24, 0x30, 0x99, 0x86, 0x30, 0x74, 0x83, - 0x90, 0x06, 0x8b, 0x36, 0x8b, 0x8a, 0x1d, 0x81, 0x97, 0xc4, 0x82, 0x10, 0x6a, 0x9c, 0xa8, 0xc9, - 0xc6, 0x35, 0xf8, 0x15, 0x2c, 0x82, 0x6d, 0xf1, 0x0c, 0x8a, 0xbb, 0xec, 0xb2, 0xab, 0x2e, 0xbb, - 0xcc, 0x27, 0xf4, 0x33, 0xba, 0xcc, 0xb2, 0xcb, 0x2a, 0x51, 0xd5, 0x7e, 0x46, 0xe5, 0x67, 0x03, - 0x36, 0xb0, 0x81, 0xeb, 0x73, 0xcf, 0xb5, 0xce, 0x3b, 0xf7, 0x3c, 0x43, 0x7a, 0xe6, 0x50, 0x2a, - 0xce, 0xab, 0xa2, 0xe3, 0xda, 0x84, 0x56, 0xec, 0xa9, 0xe5, 0x58, 0xe8, 0x9d, 0x07, 0x56, 0xe6, - 0xd5, 0xe3, 0xfc, 0xc0, 0xa2, 0x13, 0x8b, 0x8a, 0x7d, 0x8d, 0x12, 0x71, 0x5e, 0xed, 0x13, 0x47, - 0xab, 0x8a, 0x03, 0xcb, 0x30, 0x7d, 0xe2, 0x71, 0x36, 0xe8, 0x4f, 0xe8, 0xd0, 0x7b, 0xc7, 0x84, - 0x0e, 0x83, 0x46, 0x66, 0x68, 0x0d, 0x2d, 0x56, 0x8a, 0x5e, 0x15, 0xa0, 0x07, 0xda, 0xc4, 0x30, - 0x2d, 0x91, 0xfd, 0xfa, 0x50, 0xf1, 0x3b, 0x48, 0x74, 0xb5, 0xa9, 0x36, 0xa1, 0x28, 0x03, 0xbb, - 0x9a, 0x3e, 0x31, 0xcc, 0x1c, 0x57, 0xe0, 0x4a, 0x49, 0xd9, 0x7f, 0xa8, 0xe5, 0x7e, 0x7f, 0x3e, - 0x8d, 0xfd, 0xf7, 0x7c, 0xca, 0xfd, 0xfa, 0xef, 0x1f, 0xe5, 0x3d, 0x26, 0xd6, 0x66, 0xfc, 0xe2, - 0x33, 0x0f, 0x1f, 0x14, 0x4a, 0x5b, 0xc4, 0xed, 0x4e, 0xad, 0x01, 0xa1, 0x14, 0x9d, 0x41, 0x82, - 0x3a, 0x9a, 0x33, 0xa3, 0xec, 0x15, 0xfb, 0xdf, 0x7c, 0x55, 0x09, 0xce, 0x51, 0x89, 0xf0, 0x7a, - 0x8c, 0x23, 0x07, 0x5c, 0x54, 0x84, 0x94, 0xad, 0x4d, 0x1d, 0x63, 0x60, 0xd8, 0x9a, 0xe9, 0xd0, - 0x1c, 0x5f, 0x88, 0x97, 0x92, 0x72, 0x04, 0x43, 0x9f, 0x21, 0xd5, 0x7f, 0xb4, 0x06, 0x63, 0x75, - 0x44, 0x8c, 0xe1, 0xc8, 0xc9, 0xc5, 0x0b, 0x5c, 0x29, 0x2e, 0xef, 0x31, 0xec, 0x8a, 0x41, 0xe8, - 0x6b, 0xf8, 0x40, 0x9e, 0x6c, 0x63, 0xea, 0x2e, 0x38, 0x3b, 0x8c, 0x93, 0xf2, 0xc1, 0x80, 0x54, - 0x83, 0x94, 0xed, 0x8b, 0x50, 0x3d, 0xbf, 0x73, 0xbb, 0x4c, 0x67, 0x36, 0xac, 0x33, 0x10, 0xa9, - 0xb8, 0x36, 0x91, 0xf7, 0xec, 0xd5, 0x03, 0xda, 0x07, 0xde, 0xd0, 0x73, 0x89, 0x02, 0x57, 0xda, - 0x91, 0x79, 0x43, 0xaf, 0x7d, 0x0e, 0x3b, 0x93, 0x61, 0xce, 0x38, 0x94, 0xaa, 0x63, 0xe2, 0xaa, - 0xc1, 0x58, 0xf1, 0x17, 0x1e, 0x12, 0xfe, 0xd1, 0xd1, 0x09, 0x80, 0xd7, 0xb5, 0x67, 0xfd, 0x31, - 0x71, 0x03, 0x8b, 0x93, 0x0e, 0xa5, 0x5d, 0x06, 0xa0, 0x43, 0x48, 0x78, 0x83, 0x86, 0x9e, 0xe3, - 0x7d, 0xf7, 0xc7, 0xc4, 0x95, 0xf4, 0x0d, 0x6f, 0xe2, 0x5b, 0xbc, 0x39, 0x83, 0xa3, 0x9f, 0x0c, - 0x53, 0x7b, 0x34, 0x7e, 0x26, 0xba, 0x1a, 0x71, 0xc9, 0x77, 0x20, 0xb3, 0xec, 0x9e, 0x87, 0xec, - 0xaa, 0x40, 0x7a, 0x4c, 0xdc, 0x21, 0x31, 0xa3, 0x23, 0xbb, 0x6c, 0xe4, 0xc0, 0x6f, 0x85, 0xf9, - 0x27, 0x00, 0x0b, 0xe7, 0x96, 0x2e, 0x24, 0x03, 0x44, 0xd2, 0x6b, 0x1f, 0xc3, 0x66, 0xa4, 0xc2, - 0x66, 0x14, 0xff, 0xe1, 0xe1, 0xbd, 0x42, 0x29, 0x9e, 0x13, 0xd3, 0x09, 0x4c, 0xe4, 0x16, 0x26, - 0xa2, 0x33, 0x00, 0xe2, 0x35, 0xfc, 0x75, 0xf0, 0x6c, 0x1d, 0x87, 0xe1, 0x75, 0xb0, 0x31, 0xb6, - 0x8c, 0x24, 0x59, 0x94, 0x48, 0x5c, 0x06, 0x2d, 0xbe, 0xb9, 0x40, 0x36, 0xb1, 0x96, 0xb1, 0xa8, - 0xfa, 0x9d, 0x35, 0xf5, 0x5e, 0xbc, 0x36, 0x62, 0x91, 0x8c, 0x6e, 0x7f, 0x7d, 0x13, 0x89, 0x2d, - 0x9b, 0xd8, 0x88, 0xe0, 0xbb, 0x2d, 0x11, 0x5c, 0x8f, 0xf2, 0xfb, 0xcd, 0x28, 0xaf, 0xc2, 0x90, - 0x0c, 0x87, 0x21, 0x1a, 0x21, 0x58, 0x8b, 0x50, 0x79, 0x0c, 0xe9, 0x2d, 0xd7, 0x0c, 0x7d, 0x82, - 0xac, 0xd2, 0xeb, 0xa9, 0x2d, 0x7c, 0xaf, 0x76, 0xe5, 0x9b, 0x06, 0xee, 0xf5, 0xd4, 0x2e, 0xee, - 0x34, 0xa5, 0xce, 0xa5, 0x10, 0xdb, 0xd6, 0xec, 0xdd, 0x36, 0xbc, 0x7f, 0x81, 0x43, 0xc7, 0x70, - 0xb4, 0xde, 0xbc, 0xa8, 0x4b, 0x6d, 0xdc, 0x14, 0xf8, 0xf2, 0x8f, 0xb0, 0x1f, 0xbd, 0x2b, 0xe8, - 0x08, 0x90, 0xc7, 0x5e, 0x30, 0x5b, 0xf8, 0xfe, 0x12, 0x77, 0x84, 0x18, 0xca, 0x42, 0x3a, 0x8c, - 0xcb, 0xf8, 0x42, 0xc6, 0xbd, 0x2b, 0x81, 0x43, 0x27, 0xf0, 0x31, 0xdc, 0xf8, 0xfe, 0xf6, 0x46, - 0xbe, 0xbd, 0x56, 0x1b, 0x57, 0xf5, 0xce, 0x25, 0x16, 0xf8, 0x72, 0x1b, 0x52, 0xe1, 0xf5, 0xa3, - 0x53, 0xf8, 0xe4, 0xd1, 0xf1, 0x1d, 0xee, 0x28, 0xcb, 0x21, 0xa9, 0x23, 0x29, 0x52, 0x5d, 0xc1, - 0xcd, 0xd5, 0x59, 0x7c, 0x82, 0x27, 0xfa, 0x42, 0xea, 0xd4, 0xdb, 0xd2, 0x03, 0x6e, 0x0a, 0x5c, - 0xf9, 0x8e, 0xe9, 0x0d, 0x45, 0x03, 0x65, 0x40, 0x58, 0xd1, 0xeb, 0x0d, 0x45, 0xba, 0xc3, 0x2b, - 0xb5, 0x3e, 0xda, 0xb8, 0xb9, 0xee, 0xb6, 0xb1, 0xf7, 0x76, 0x0e, 0x1d, 0xc2, 0xc1, 0xaa, 0x81, - 0x7f, 0xe8, 0x4a, 0xb2, 0xe7, 0xc3, 0x79, 0xeb, 0xcf, 0xd7, 0x3c, 0xf7, 0xf2, 0x9a, 0xe7, 0xfe, - 0x7e, 0xcd, 0x73, 0xbf, 0xbd, 0xe5, 0x63, 0x2f, 0x6f, 0xf9, 0xd8, 0x5f, 0x6f, 0xf9, 0xd8, 0x43, - 0x75, 0x68, 0x38, 0xa3, 0x59, 0xbf, 0x32, 0xb0, 0x26, 0xa2, 0x3d, 0xa3, 0xa3, 0xc1, 0x48, 0x33, - 0x4c, 0x56, 0x7d, 0x61, 0xe5, 0x17, 0xd3, 0xd2, 0x89, 0xf8, 0x24, 0xfa, 0x77, 0xc5, 0xfb, 0xf8, - 0xf7, 0x13, 0xec, 0x93, 0xfc, 0xed, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x43, 0x82, 0x12, 0x43, - 0x14, 0x06, 0x00, 0x00, + // 1012 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x56, 0x4f, 0x4f, 0xeb, 0xc6, + 0x17, 0x8d, 0x13, 0x08, 0xe4, 0x12, 0xf2, 0x0b, 0x43, 0x80, 0x3c, 0xfe, 0x04, 0xc8, 0x7b, 0xd2, + 0x0f, 0xa1, 0xbe, 0x58, 0xb4, 0x2c, 0x2a, 0x76, 0x79, 0x60, 0xc0, 0x02, 0x42, 0xea, 0x38, 0xa8, + 0xef, 0x6d, 0x5c, 0xc7, 0x9e, 0x3a, 0xa3, 0x24, 0xb6, 0x95, 0x71, 0x10, 0xe9, 0xa6, 0x52, 0x97, + 0x5d, 0x75, 0xd9, 0x25, 0xcb, 0x2e, 0xfb, 0x31, 0xba, 0x7c, 0xcb, 0x2e, 0x2b, 0x50, 0xd5, 0x7e, + 0x8c, 0x6a, 0x66, 0x9c, 0xc4, 0x4e, 0xb2, 0x81, 0x99, 0x7b, 0xce, 0xbd, 0xbe, 0x73, 0xee, 0x99, + 0x01, 0x58, 0x1f, 0x04, 0x94, 0xca, 0x8f, 0x27, 0x72, 0x30, 0xf4, 0x31, 0xad, 0xf8, 0x7d, 0x2f, + 0xf0, 0xd0, 0x12, 0x0b, 0x56, 0x1e, 0x4f, 0xb6, 0x4b, 0x96, 0x47, 0x7b, 0x1e, 0x95, 0x5b, 0x26, + 0xc5, 0xf2, 0xe3, 0x49, 0x0b, 0x07, 0xe6, 0x89, 0x6c, 0x79, 0xc4, 0x15, 0xc4, 0xed, 0xad, 0x10, + 0xef, 0x51, 0x87, 0xd5, 0xe8, 0x51, 0x27, 0x04, 0x0a, 0x8e, 0xe7, 0x78, 0x7c, 0x29, 0xb3, 0x55, + 0x18, 0x5d, 0x33, 0x7b, 0xc4, 0xf5, 0x64, 0xfe, 0x53, 0x84, 0xca, 0x5f, 0x43, 0xba, 0x6e, 0xf6, + 0xcd, 0x1e, 0x45, 0x05, 0x58, 0x34, 0xed, 0x1e, 0x71, 0x8b, 0xd2, 0x81, 0x74, 0x94, 0xd1, 0xc4, + 0xe6, 0xac, 0xf8, 0xeb, 0xf3, 0x7e, 0xe2, 0xdf, 0xe7, 0x7d, 0xe9, 0xe7, 0x7f, 0x7e, 0x3f, 0x5e, + 0xe1, 0xcd, 0xfa, 0x9c, 0x5f, 0x7e, 0x4e, 0xc2, 0xaa, 0x4e, 0xe9, 0x0d, 0x1e, 0xd6, 0xfb, 0x9e, + 0x85, 0x29, 0x45, 0xa7, 0x90, 0xa6, 0x81, 0x19, 0x0c, 0x28, 0x2f, 0x91, 0xfb, 0x72, 0xb7, 0x12, + 0x9e, 0xa3, 0x12, 0xe3, 0x35, 0x38, 0x47, 0x0b, 0xb9, 0xa8, 0x0c, 0x59, 0xdf, 0xec, 0x07, 0xc4, + 0x22, 0xbe, 0xe9, 0x06, 0xb4, 0x98, 0x3c, 0x48, 0x1d, 0x65, 0xb4, 0x58, 0x0c, 0x1d, 0x42, 0xb6, + 0xd5, 0xf5, 0xac, 0x8e, 0xd1, 0xc6, 0xc4, 0x69, 0x07, 0xc5, 0xd4, 0x81, 0x74, 0x94, 0xd2, 0x56, + 0x78, 0xec, 0x9a, 0x87, 0xd0, 0x5b, 0x58, 0xc5, 0x4f, 0x3e, 0xe9, 0x0f, 0x47, 0x9c, 0x05, 0xce, + 0xc9, 0x8a, 0x60, 0x48, 0x3a, 0x83, 0xac, 0x2f, 0x9a, 0x30, 0x98, 0xde, 0xc5, 0x45, 0xde, 0xe7, + 0x56, 0xb4, 0xcf, 0xb0, 0x49, 0x7d, 0xe8, 0x63, 0x6d, 0xc5, 0x9f, 0x6c, 0x50, 0x0e, 0x92, 0xc4, + 0x2e, 0xa6, 0x0f, 0xa4, 0xa3, 0x05, 0x2d, 0x49, 0xec, 0xb3, 0xc3, 0xa8, 0x32, 0x05, 0xae, 0x4c, + 0x40, 0xa9, 0xd1, 0xc1, 0x43, 0x23, 0x4c, 0x2b, 0xff, 0x94, 0x84, 0xb4, 0x38, 0x3a, 0xda, 0x03, + 0x60, 0xa8, 0x3f, 0x68, 0x75, 0xf0, 0x30, 0x94, 0x38, 0x13, 0x50, 0x5a, 0xe7, 0x01, 0xb4, 0x01, + 0x69, 0x96, 0x48, 0xec, 0x62, 0x52, 0xa8, 0xdf, 0xc1, 0x43, 0xd5, 0x9e, 0xd1, 0x26, 0x35, 0x47, + 0x9b, 0x53, 0xd8, 0xfc, 0x9e, 0xb8, 0x66, 0x97, 0xfc, 0x80, 0x6d, 0x23, 0xa6, 0x92, 0x50, 0xa0, + 0x30, 0x46, 0x3f, 0x44, 0xe4, 0xaa, 0xc0, 0x7a, 0x07, 0x0f, 0x1d, 0xec, 0xc6, 0x53, 0x16, 0x79, + 0xca, 0x9a, 0x80, 0xa2, 0xfc, 0x3d, 0x80, 0x91, 0x72, 0x63, 0x15, 0x32, 0x61, 0x44, 0xb5, 0xcf, + 0xde, 0x44, 0xc5, 0xc8, 0x46, 0xc5, 0x28, 0xff, 0x9d, 0x84, 0x65, 0x9d, 0x52, 0xe5, 0x11, 0xbb, + 0x41, 0x28, 0xa2, 0x34, 0x12, 0x11, 0x9d, 0x02, 0x60, 0x06, 0x88, 0x71, 0x24, 0xf9, 0x38, 0x36, + 0xa2, 0xe3, 0xe0, 0x69, 0x7c, 0x18, 0x19, 0x3c, 0x5a, 0x22, 0x79, 0x6c, 0xb4, 0xd4, 0xec, 0x00, + 0x79, 0xc6, 0x94, 0xc7, 0xe2, 0xdd, 0x2f, 0x4c, 0x75, 0xcf, 0xec, 0x35, 0x63, 0x8b, 0x4c, 0x7c, + 0xfa, 0xd3, 0x93, 0x48, 0xcf, 0x99, 0xc4, 0x8c, 0x05, 0x97, 0xe6, 0x58, 0x70, 0xda, 0xca, 0xcb, + 0xb3, 0x56, 0x9e, 0x98, 0x21, 0x13, 0x35, 0x43, 0xdc, 0x42, 0x30, 0x65, 0xa1, 0xf2, 0x6f, 0x29, + 0x58, 0xbd, 0x1c, 0xb8, 0xf6, 0x1d, 0x71, 0xfa, 0x66, 0x40, 0x3c, 0x77, 0x46, 0xec, 0x5d, 0x00, + 0xaf, 0x6b, 0x1b, 0x31, 0xa3, 0x2d, 0x7b, 0x5d, 0xfb, 0x86, 0x97, 0x7f, 0x07, 0x39, 0x86, 0x46, + 0x3e, 0x91, 0xe2, 0x8c, 0xac, 0xd7, 0xb5, 0xf5, 0xb1, 0x51, 0xdf, 0x41, 0xce, 0x1a, 0xf4, 0xfb, + 0x6c, 0x64, 0x61, 0x9d, 0x05, 0xc1, 0x0a, 0xa3, 0xa2, 0xd6, 0x17, 0x80, 0x46, 0xac, 0x48, 0x3d, + 0x21, 0x6b, 0x3e, 0x44, 0x26, 0x35, 0x0b, 0xb0, 0x68, 0xb5, 0x4d, 0xe2, 0x72, 0x5b, 0x65, 0x34, + 0xb1, 0x89, 0xbc, 0x26, 0x4b, 0x53, 0xaf, 0x49, 0xec, 0x94, 0x53, 0x93, 0xfe, 0x3f, 0xfc, 0x8f, + 0xb8, 0x24, 0x20, 0x66, 0x30, 0xba, 0x0d, 0xa1, 0xc2, 0xb9, 0x71, 0x98, 0xdb, 0x9a, 0x11, 0x2d, + 0xaf, 0xe7, 0x77, 0xf1, 0x84, 0x98, 0x11, 0xc4, 0x71, 0x58, 0x10, 0xb7, 0x60, 0x29, 0x78, 0x32, + 0xda, 0x26, 0x6d, 0x87, 0x9a, 0xa7, 0x83, 0xa7, 0x6b, 0x93, 0xb6, 0xd1, 0x0e, 0x64, 0x1c, 0x93, + 0x1a, 0x7e, 0x9f, 0x58, 0xb8, 0xb8, 0x22, 0xd4, 0x74, 0x4c, 0x5a, 0x67, 0xfb, 0x11, 0xd8, 0x25, + 0x3d, 0x12, 0x14, 0xb3, 0x7c, 0x04, 0x0c, 0xbc, 0x65, 0xfb, 0xe3, 0x0e, 0xac, 0xcf, 0x79, 0x11, + 0xd1, 0x0e, 0x6c, 0xe9, 0x8d, 0x86, 0x71, 0xa3, 0x7c, 0x34, 0xea, 0xda, 0xfd, 0xb9, 0xd2, 0x68, + 0x18, 0x75, 0xa5, 0x76, 0xa1, 0xd6, 0xae, 0xf2, 0x89, 0x79, 0x60, 0xa3, 0x79, 0xce, 0x7e, 0xe7, + 0x25, 0xb4, 0x0d, 0x9b, 0xd3, 0xe0, 0x65, 0x55, 0xbd, 0x55, 0x2e, 0xf2, 0xc9, 0xe3, 0xef, 0x20, + 0x17, 0x7f, 0xd6, 0xd0, 0x26, 0x20, 0xc6, 0x1e, 0x31, 0x6f, 0x94, 0x8f, 0x57, 0x4a, 0x2d, 0x9f, + 0x40, 0x5b, 0xb0, 0x1e, 0x8d, 0x6b, 0xca, 0xa5, 0xa6, 0x34, 0xae, 0xf3, 0x12, 0xda, 0x83, 0x37, + 0x51, 0xe0, 0x9b, 0xe6, 0xbd, 0xd6, 0xbc, 0x33, 0xce, 0xaf, 0xab, 0xb5, 0x2b, 0x25, 0x9f, 0x3c, + 0xbe, 0x85, 0x6c, 0xf4, 0xa6, 0xa2, 0x7d, 0xd8, 0x61, 0x74, 0xe5, 0x41, 0xa9, 0xe9, 0xe3, 0x24, + 0xb5, 0xa6, 0xea, 0x6a, 0x55, 0x57, 0x2e, 0x26, 0x67, 0x11, 0x04, 0xd6, 0xf4, 0xa5, 0x5a, 0xab, + 0xde, 0xaa, 0x9f, 0x94, 0x8b, 0xbc, 0x74, 0xfc, 0xc0, 0xfb, 0x8d, 0xdc, 0x62, 0x54, 0x80, 0xfc, + 0x84, 0x5e, 0x3d, 0xd7, 0xd5, 0x07, 0x65, 0xd2, 0xad, 0x88, 0x9e, 0xdf, 0xdf, 0xd5, 0x6f, 0x15, + 0x56, 0x5d, 0x42, 0x1b, 0xb0, 0x36, 0x01, 0x94, 0x6f, 0xeb, 0xaa, 0xc6, 0x75, 0xf8, 0x11, 0xd6, + 0xe7, 0x18, 0x07, 0x1d, 0xc2, 0xde, 0x65, 0xb3, 0x76, 0x61, 0xdc, 0xa9, 0x57, 0x5a, 0x55, 0x57, + 0xef, 0x6b, 0x46, 0x43, 0xaf, 0xea, 0xcd, 0xa8, 0xf4, 0x6f, 0x61, 0x7f, 0x3e, 0x25, 0xfa, 0xd5, + 0x03, 0xd8, 0x9d, 0x4f, 0x1a, 0x0d, 0xe2, 0xc3, 0xcd, 0x1f, 0x2f, 0x25, 0xe9, 0xf3, 0x4b, 0x49, + 0xfa, 0xeb, 0xa5, 0x24, 0xfd, 0xf2, 0x5a, 0x4a, 0x7c, 0x7e, 0x2d, 0x25, 0xfe, 0x7c, 0x2d, 0x25, + 0x3e, 0x9d, 0x38, 0x24, 0x68, 0x0f, 0x5a, 0x15, 0xcb, 0xeb, 0xc9, 0xfe, 0x80, 0xb6, 0xf9, 0x05, + 0xe0, 0xab, 0xf7, 0x7c, 0xf9, 0xde, 0xf5, 0x6c, 0x2c, 0x3f, 0xc9, 0xe2, 0x5d, 0x65, 0xff, 0x28, + 0xb4, 0xd2, 0xfc, 0xcf, 0xf7, 0x57, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xbc, 0xc0, 0x06, + 0x40, 0x08, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -876,6 +1053,103 @@ func (m *TssEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *FundMigration) 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 *FundMigration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FundMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasLimit != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x60 + } + if len(m.GasPrice) > 0 { + i -= len(m.GasPrice) + copy(dAtA[i:], m.GasPrice) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GasPrice))) + i-- + dAtA[i] = 0x5a + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x52 + } + if m.CompletedBlock != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.CompletedBlock)) + i-- + dAtA[i] = 0x48 + } + if m.InitiatedBlock != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.InitiatedBlock)) + i-- + dAtA[i] = 0x40 + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x38 + } + if len(m.Chain) > 0 { + i -= len(m.Chain) + copy(dAtA[i:], m.Chain) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Chain))) + i-- + dAtA[i] = 0x32 + } + if len(m.CurrentTssPubkey) > 0 { + i -= len(m.CurrentTssPubkey) + copy(dAtA[i:], m.CurrentTssPubkey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CurrentTssPubkey))) + i-- + dAtA[i] = 0x2a + } + if len(m.CurrentKeyId) > 0 { + i -= len(m.CurrentKeyId) + copy(dAtA[i:], m.CurrentKeyId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CurrentKeyId))) + i-- + dAtA[i] = 0x22 + } + if len(m.OldTssPubkey) > 0 { + i -= len(m.OldTssPubkey) + copy(dAtA[i:], m.OldTssPubkey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OldTssPubkey))) + i-- + dAtA[i] = 0x1a + } + if len(m.OldKeyId) > 0 { + i -= len(m.OldKeyId) + copy(dAtA[i:], m.OldKeyId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OldKeyId))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -1007,6 +1281,58 @@ func (m *TssEvent) Size() (n int) { return n } +func (m *FundMigration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovTypes(uint64(m.Id)) + } + l = len(m.OldKeyId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.OldTssPubkey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CurrentKeyId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CurrentTssPubkey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Chain) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + if m.InitiatedBlock != 0 { + n += 1 + sovTypes(uint64(m.InitiatedBlock)) + } + if m.CompletedBlock != 0 { + n += 1 + sovTypes(uint64(m.CompletedBlock)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.GasPrice) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTypes(uint64(m.GasLimit)) + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1767,6 +2093,375 @@ func (m *TssEvent) Unmarshal(dAtA []byte) error { } return nil } +func (m *FundMigration) 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 ErrIntOverflowTypes + } + 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: FundMigration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FundMigration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldKeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldKeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldTssPubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldTssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentKeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentKeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentTssPubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentTssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Chain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Chain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= FundMigrationStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InitiatedBlock", wireType) + } + m.InitiatedBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InitiatedBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedBlock", wireType) + } + m.CompletedBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CompletedBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GasPrice = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/uvalidator/types/ballot.pb.go b/x/uvalidator/types/ballot.pb.go index 68d10d68..111e99fc 100644 --- a/x/uvalidator/types/ballot.pb.go +++ b/x/uvalidator/types/ballot.pb.go @@ -67,10 +67,11 @@ func (BallotStatus) EnumDescriptor() ([]byte, []int) { type BallotObservationType int32 const ( - BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 - BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 - BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 - BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 + BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 + BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 + BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 + BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 + BallotObservationType_BALLOT_OBSERVATION_TYPE_FUND_MIGRATION BallotObservationType = 4 ) var BallotObservationType_name = map[int32]string{ @@ -78,13 +79,15 @@ var BallotObservationType_name = map[int32]string{ 1: "BALLOT_OBSERVATION_TYPE_INBOUND_TX", 2: "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX", 3: "BALLOT_OBSERVATION_TYPE_TSS_KEY", + 4: "BALLOT_OBSERVATION_TYPE_FUND_MIGRATION", } var BallotObservationType_value = map[string]int32{ - "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, - "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, - "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, - "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, + "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, + "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, + "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, + "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, + "BALLOT_OBSERVATION_TYPE_FUND_MIGRATION": 4, } func (x BallotObservationType) String() string { @@ -239,45 +242,46 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/ballot.proto", fileDescriptor_b9f9c8e0d3c818f3) } var fileDescriptor_b9f9c8e0d3c818f3 = []byte{ - // 601 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x53, 0xd3, 0x4e, - 0x1c, 0xc6, 0x9b, 0x14, 0xfa, 0xfb, 0xb1, 0x6a, 0x09, 0x0b, 0x68, 0xa8, 0x63, 0xec, 0x80, 0x23, - 0x95, 0x19, 0x1a, 0x81, 0x83, 0xe7, 0xfe, 0x59, 0x34, 0xda, 0x49, 0x6a, 0x76, 0xc3, 0x80, 0x97, - 0x9d, 0xb4, 0xdd, 0x69, 0x32, 0x86, 0x6e, 0x27, 0xd9, 0x76, 0xe0, 0x5d, 0xf8, 0x0e, 0xbc, 0x78, - 0xf0, 0x45, 0xf8, 0x02, 0x3c, 0x72, 0xf4, 0xe8, 0xc0, 0xcb, 0xf0, 0xe2, 0x64, 0x53, 0xa4, 0xad, - 0xe0, 0x25, 0xf3, 0x9d, 0xe7, 0xf3, 0x3c, 0xfb, 0xec, 0x26, 0x59, 0x50, 0x1a, 0x8d, 0xfd, 0x28, - 0xec, 0xf9, 0x82, 0xc7, 0xe6, 0x78, 0xcf, 0xec, 0xf8, 0x51, 0xc4, 0x45, 0x75, 0x18, 0x73, 0xc1, - 0xe1, 0x83, 0x1b, 0x56, 0x1d, 0xef, 0x95, 0xd6, 0xfa, 0xbc, 0xcf, 0x25, 0x31, 0xd3, 0x29, 0x33, - 0x95, 0x56, 0xfc, 0xd3, 0x70, 0xc0, 0x4d, 0xf9, 0xcc, 0xa4, 0xcd, 0x5f, 0x2a, 0x28, 0xd4, 0xe5, - 0x42, 0xb0, 0x08, 0xd4, 0xb0, 0xa7, 0x2b, 0x65, 0xa5, 0xb2, 0xe4, 0xaa, 0x61, 0x0f, 0x22, 0x70, - 0x2f, 0xab, 0xa0, 0xe2, 0x7c, 0xc8, 0x74, 0xb5, 0xac, 0x54, 0x8a, 0xfb, 0xcf, 0xaa, 0x33, 0x45, - 0xd5, 0x2c, 0xeb, 0x74, 0x12, 0x16, 0x8f, 0x7d, 0x11, 0xf2, 0x01, 0x39, 0x1f, 0x32, 0x17, 0x64, - 0xc1, 0x74, 0x86, 0xdb, 0x60, 0x99, 0x45, 0x61, 0x3f, 0xec, 0x44, 0x8c, 0x8e, 0xb9, 0x60, 0x71, - 0xa2, 0xe7, 0xcb, 0xf9, 0xca, 0x92, 0x5b, 0xbc, 0x96, 0x8f, 0xa4, 0x0a, 0x4d, 0xb0, 0x98, 0xf2, - 0x44, 0x5f, 0x28, 0xe7, 0x2b, 0xc5, 0xfd, 0x8d, 0xb9, 0xa6, 0xd4, 0xe5, 0xb2, 0x64, 0x14, 0x09, - 0x37, 0xf3, 0xc1, 0x17, 0x40, 0x1b, 0x73, 0x11, 0x0e, 0xfa, 0x54, 0x04, 0x31, 0x4b, 0x02, 0x1e, - 0xf5, 0xf4, 0xc5, 0xb2, 0x52, 0xc9, 0xbb, 0xcb, 0x99, 0x4e, 0xae, 0x65, 0x78, 0x00, 0x0a, 0x89, - 0xf0, 0xc5, 0x28, 0xd1, 0x0b, 0xf2, 0x18, 0x8f, 0x6f, 0x3d, 0x06, 0x96, 0x16, 0x77, 0x62, 0x85, - 0x2f, 0xc1, 0x5a, 0x27, 0xe2, 0xdd, 0x8f, 0x34, 0x60, 0x61, 0x3f, 0x10, 0xb4, 0x1b, 0x33, 0x5f, - 0xb0, 0x9e, 0xfe, 0x9f, 0xec, 0x80, 0x92, 0xbd, 0x91, 0xa8, 0x91, 0x11, 0x58, 0x05, 0xab, 0x33, - 0x09, 0x76, 0x36, 0x0c, 0xe3, 0x73, 0xfd, 0x7f, 0x19, 0x58, 0x99, 0x0a, 0x20, 0x09, 0x76, 0x3e, - 0x2b, 0xe0, 0xfe, 0x74, 0x35, 0x7c, 0x02, 0x36, 0xea, 0xb5, 0x56, 0xcb, 0x21, 0x14, 0x93, 0x1a, - 0xf1, 0x30, 0xf5, 0x6c, 0xdc, 0x46, 0x0d, 0xeb, 0xd0, 0x42, 0x4d, 0x2d, 0x07, 0x37, 0xc0, 0xfa, - 0x2c, 0x6e, 0x23, 0xbb, 0x69, 0xd9, 0xaf, 0x35, 0x05, 0xea, 0x60, 0x6d, 0x0e, 0xd5, 0x30, 0x46, - 0x4d, 0x4d, 0x85, 0x25, 0xf0, 0x70, 0x96, 0xb8, 0xe8, 0x2d, 0x6a, 0x10, 0xd4, 0xd4, 0xf2, 0x7f, - 0x2f, 0x88, 0x8e, 0xdb, 0x96, 0x8b, 0x9a, 0xda, 0x42, 0x69, 0xe1, 0xeb, 0x17, 0x43, 0xd9, 0xf9, - 0xa6, 0x80, 0xf5, 0x5b, 0xbf, 0x31, 0xdc, 0x06, 0x5b, 0x93, 0xa8, 0x53, 0xc7, 0xc8, 0x3d, 0xaa, - 0x11, 0xcb, 0xb1, 0x29, 0x39, 0x69, 0xa3, 0xb9, 0x4d, 0x3f, 0x07, 0x9b, 0x77, 0x19, 0x2d, 0xbb, - 0xee, 0x78, 0x76, 0x93, 0x92, 0x63, 0x4d, 0xf9, 0xd7, 0x82, 0x8e, 0x47, 0xfe, 0x18, 0x55, 0xb8, - 0x05, 0x9e, 0xde, 0x65, 0x24, 0x18, 0xd3, 0x77, 0xe8, 0x44, 0xcb, 0x4f, 0xb6, 0xdf, 0x05, 0xe0, - 0xe6, 0xbf, 0x49, 0xdf, 0xee, 0x91, 0x43, 0x10, 0x75, 0x11, 0xf6, 0x5a, 0x84, 0xda, 0x0e, 0xa1, - 0x27, 0x88, 0xd0, 0x54, 0x4b, 0x37, 0xfa, 0x08, 0xac, 0x4e, 0x63, 0xec, 0x35, 0x1a, 0x08, 0x63, - 0x4d, 0x99, 0x07, 0x87, 0x35, 0xab, 0xe5, 0xb9, 0x48, 0x53, 0xb3, 0x92, 0xfa, 0xfb, 0xef, 0x97, - 0x86, 0x72, 0x71, 0x69, 0x28, 0x3f, 0x2f, 0x0d, 0xe5, 0xd3, 0x95, 0x91, 0xbb, 0xb8, 0x32, 0x72, - 0x3f, 0xae, 0x8c, 0xdc, 0x87, 0x57, 0xfd, 0x50, 0x04, 0xa3, 0x4e, 0xb5, 0xcb, 0x4f, 0xcd, 0xe1, - 0x28, 0x09, 0xba, 0x81, 0x1f, 0x0e, 0xe4, 0xb4, 0x2b, 0xc7, 0xdd, 0x01, 0xef, 0x31, 0xf3, 0xcc, - 0x9c, 0xba, 0xd8, 0xe9, 0x5d, 0x4b, 0x3a, 0x05, 0x79, 0x3b, 0x0f, 0x7e, 0x07, 0x00, 0x00, 0xff, - 0xff, 0xa1, 0xfd, 0xe6, 0x6e, 0xf3, 0x03, 0x00, 0x00, + // 616 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xcf, 0x4e, 0xdb, 0x4a, + 0x14, 0xc6, 0x63, 0x07, 0x72, 0x2f, 0x73, 0xef, 0x0d, 0x66, 0x80, 0x5b, 0x93, 0xaa, 0x6e, 0x04, + 0x15, 0xa4, 0x48, 0xc4, 0x05, 0x16, 0x5d, 0xe7, 0xcf, 0x40, 0xdd, 0xa6, 0x76, 0xea, 0x19, 0x23, + 0xe8, 0x66, 0xe4, 0x24, 0xa3, 0xd8, 0xaa, 0xc9, 0x44, 0xf6, 0x24, 0x82, 0xb7, 0xe8, 0x1b, 0x74, + 0xd3, 0x45, 0x1f, 0xa5, 0x4b, 0x96, 0x5d, 0x56, 0xb0, 0xe9, 0x3b, 0x74, 0x53, 0x79, 0xcc, 0x9f, + 0x24, 0x85, 0x6e, 0xac, 0xa3, 0xef, 0xf7, 0x9d, 0xf3, 0xf9, 0x68, 0x3c, 0x06, 0xa5, 0xd1, 0xd8, + 0x8f, 0xc2, 0x9e, 0x2f, 0x78, 0x6c, 0x8e, 0x77, 0xcd, 0x8e, 0x1f, 0x45, 0x5c, 0x54, 0x87, 0x31, + 0x17, 0x1c, 0xfe, 0x77, 0xc7, 0xaa, 0xe3, 0xdd, 0xd2, 0x4a, 0x9f, 0xf7, 0xb9, 0x24, 0x66, 0x5a, + 0x65, 0xa6, 0xd2, 0x92, 0x7f, 0x1a, 0x0e, 0xb8, 0x29, 0x9f, 0x99, 0xb4, 0xfe, 0x53, 0x05, 0x85, + 0xba, 0x1c, 0x04, 0x8b, 0x40, 0x0d, 0x7b, 0xba, 0x52, 0x56, 0x2a, 0x0b, 0xae, 0x1a, 0xf6, 0x20, + 0x02, 0xff, 0x64, 0x11, 0x54, 0x9c, 0x0f, 0x99, 0xae, 0x96, 0x95, 0x4a, 0x71, 0xef, 0x59, 0x75, + 0x2a, 0xa8, 0x9a, 0xf5, 0x3a, 0x9d, 0x84, 0xc5, 0x63, 0x5f, 0x84, 0x7c, 0x40, 0xce, 0x87, 0xcc, + 0x05, 0x59, 0x63, 0x5a, 0xc3, 0x2d, 0xb0, 0xc8, 0xa2, 0xb0, 0x1f, 0x76, 0x22, 0x46, 0xc7, 0x5c, + 0xb0, 0x38, 0xd1, 0xf3, 0xe5, 0x7c, 0x65, 0xc1, 0x2d, 0xde, 0xc8, 0x47, 0x52, 0x85, 0x26, 0x98, + 0x4f, 0x79, 0xa2, 0xcf, 0x95, 0xf3, 0x95, 0xe2, 0xde, 0xda, 0x4c, 0x52, 0xea, 0x72, 0x59, 0x32, + 0x8a, 0x84, 0x9b, 0xf9, 0xe0, 0x73, 0xa0, 0x8d, 0xb9, 0x08, 0x07, 0x7d, 0x2a, 0x82, 0x98, 0x25, + 0x01, 0x8f, 0x7a, 0xfa, 0x7c, 0x59, 0xa9, 0xe4, 0xdd, 0xc5, 0x4c, 0x27, 0x37, 0x32, 0xdc, 0x07, + 0x85, 0x44, 0xf8, 0x62, 0x94, 0xe8, 0x05, 0xb9, 0xc6, 0xe3, 0x7b, 0xd7, 0xc0, 0xd2, 0xe2, 0x5e, + 0x5b, 0xe1, 0x0b, 0xb0, 0xd2, 0x89, 0x78, 0xf7, 0x03, 0x0d, 0x58, 0xd8, 0x0f, 0x04, 0xed, 0xc6, + 0xcc, 0x17, 0xac, 0xa7, 0xff, 0x25, 0x33, 0xa0, 0x64, 0xaf, 0x24, 0x6a, 0x64, 0x04, 0x56, 0xc1, + 0xf2, 0x54, 0x07, 0x3b, 0x1b, 0x86, 0xf1, 0xb9, 0xfe, 0xb7, 0x6c, 0x58, 0x9a, 0x68, 0x40, 0x12, + 0x6c, 0x7f, 0x52, 0xc0, 0xbf, 0x93, 0xd1, 0xf0, 0x09, 0x58, 0xab, 0xd7, 0x5a, 0x2d, 0x87, 0x50, + 0x4c, 0x6a, 0xc4, 0xc3, 0xd4, 0xb3, 0x71, 0x1b, 0x35, 0xac, 0x03, 0x0b, 0x35, 0xb5, 0x1c, 0x5c, + 0x03, 0xab, 0xd3, 0xb8, 0x8d, 0xec, 0xa6, 0x65, 0x1f, 0x6a, 0x0a, 0xd4, 0xc1, 0xca, 0x0c, 0xaa, + 0x61, 0x8c, 0x9a, 0x9a, 0x0a, 0x4b, 0xe0, 0xff, 0x69, 0xe2, 0xa2, 0xd7, 0xa8, 0x41, 0x50, 0x53, + 0xcb, 0xff, 0x3e, 0x10, 0x1d, 0xb7, 0x2d, 0x17, 0x35, 0xb5, 0xb9, 0xd2, 0xdc, 0x97, 0xcf, 0x86, + 0xb2, 0xfd, 0x43, 0x01, 0xab, 0xf7, 0x9e, 0x31, 0xdc, 0x02, 0x1b, 0xd7, 0xad, 0x4e, 0x1d, 0x23, + 0xf7, 0xa8, 0x46, 0x2c, 0xc7, 0xa6, 0xe4, 0xa4, 0x8d, 0x66, 0x5e, 0x7a, 0x13, 0xac, 0x3f, 0x64, + 0xb4, 0xec, 0xba, 0xe3, 0xd9, 0x4d, 0x4a, 0x8e, 0x35, 0xe5, 0x4f, 0x03, 0x1d, 0x8f, 0xdc, 0x1a, + 0x55, 0xb8, 0x01, 0x9e, 0x3e, 0x64, 0x24, 0x18, 0xd3, 0x37, 0xe8, 0x44, 0xcb, 0xc3, 0x6d, 0xb0, + 0xf9, 0x90, 0xe9, 0x20, 0x9d, 0xf4, 0xd6, 0x3a, 0x74, 0xa5, 0x76, 0xbb, 0x6a, 0x17, 0x80, 0xbb, + 0x6f, 0x2c, 0x3d, 0x89, 0x23, 0x87, 0x20, 0xea, 0x22, 0xec, 0xb5, 0x08, 0xb5, 0x1d, 0x42, 0x4f, + 0x10, 0xa1, 0xa9, 0x96, 0x2e, 0xf5, 0x08, 0x2c, 0x4f, 0x62, 0xec, 0x35, 0x1a, 0x08, 0x63, 0x4d, + 0x99, 0x05, 0x07, 0x35, 0xab, 0xe5, 0xb9, 0x48, 0x53, 0xb3, 0x90, 0xfa, 0xbb, 0xaf, 0x97, 0x86, + 0x72, 0x71, 0x69, 0x28, 0xdf, 0x2f, 0x0d, 0xe5, 0xe3, 0x95, 0x91, 0xbb, 0xb8, 0x32, 0x72, 0xdf, + 0xae, 0x8c, 0xdc, 0xfb, 0x97, 0xfd, 0x50, 0x04, 0xa3, 0x4e, 0xb5, 0xcb, 0x4f, 0xcd, 0xe1, 0x28, + 0x09, 0xba, 0x81, 0x1f, 0x0e, 0x64, 0xb5, 0x23, 0xcb, 0x9d, 0x01, 0xef, 0x31, 0xf3, 0xcc, 0x9c, + 0xf8, 0x09, 0xa4, 0xf7, 0x32, 0xe9, 0x14, 0xe4, 0x4d, 0xde, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, + 0x4e, 0x9b, 0x9c, 0x99, 0x1f, 0x04, 0x00, 0x00, } func (m *Ballot) Marshal() (dAtA []byte, err error) {