diff --git a/api/uexecutor/v1/tx.pulsar.go b/api/uexecutor/v1/tx.pulsar.go index 0c0ce2f7..6c426720 100644 --- a/api/uexecutor/v1/tx.pulsar.go +++ b/api/uexecutor/v1/tx.pulsar.go @@ -871,1910 +871,6 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } -var ( - md_MsgDeployUEA protoreflect.MessageDescriptor - fd_MsgDeployUEA_signer protoreflect.FieldDescriptor - fd_MsgDeployUEA_universal_account_id protoreflect.FieldDescriptor - fd_MsgDeployUEA_tx_hash protoreflect.FieldDescriptor -) - -func init() { - file_uexecutor_v1_tx_proto_init() - md_MsgDeployUEA = File_uexecutor_v1_tx_proto.Messages().ByName("MsgDeployUEA") - fd_MsgDeployUEA_signer = md_MsgDeployUEA.Fields().ByName("signer") - fd_MsgDeployUEA_universal_account_id = md_MsgDeployUEA.Fields().ByName("universal_account_id") - fd_MsgDeployUEA_tx_hash = md_MsgDeployUEA.Fields().ByName("tx_hash") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeployUEA)(nil) - -type fastReflection_MsgDeployUEA MsgDeployUEA - -func (x *MsgDeployUEA) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeployUEA)(x) -} - -func (x *MsgDeployUEA) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_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_MsgDeployUEA_messageType fastReflection_MsgDeployUEA_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeployUEA_messageType{} - -type fastReflection_MsgDeployUEA_messageType struct{} - -func (x fastReflection_MsgDeployUEA_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeployUEA)(nil) -} -func (x fastReflection_MsgDeployUEA_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeployUEA) -} -func (x fastReflection_MsgDeployUEA_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeployUEA -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeployUEA) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeployUEA -} - -// 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_MsgDeployUEA) Type() protoreflect.MessageType { - return _fastReflection_MsgDeployUEA_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeployUEA) New() protoreflect.Message { - return new(fastReflection_MsgDeployUEA) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeployUEA) Interface() protoreflect.ProtoMessage { - return (*MsgDeployUEA)(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_MsgDeployUEA) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Signer != "" { - value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgDeployUEA_signer, value) { - return - } - } - if x.UniversalAccountId != nil { - value := protoreflect.ValueOfMessage(x.UniversalAccountId.ProtoReflect()) - if !f(fd_MsgDeployUEA_universal_account_id, value) { - return - } - } - if x.TxHash != "" { - value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_MsgDeployUEA_tx_hash, 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_MsgDeployUEA) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEA.signer": - return x.Signer != "" - case "uexecutor.v1.MsgDeployUEA.universal_account_id": - return x.UniversalAccountId != nil - case "uexecutor.v1.MsgDeployUEA.tx_hash": - return x.TxHash != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEA")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEA 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_MsgDeployUEA) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEA.signer": - x.Signer = "" - case "uexecutor.v1.MsgDeployUEA.universal_account_id": - x.UniversalAccountId = nil - case "uexecutor.v1.MsgDeployUEA.tx_hash": - x.TxHash = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEA")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEA 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_MsgDeployUEA) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "uexecutor.v1.MsgDeployUEA.signer": - value := x.Signer - return protoreflect.ValueOfString(value) - case "uexecutor.v1.MsgDeployUEA.universal_account_id": - value := x.UniversalAccountId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "uexecutor.v1.MsgDeployUEA.tx_hash": - value := x.TxHash - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEA")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEA 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_MsgDeployUEA) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEA.signer": - x.Signer = value.Interface().(string) - case "uexecutor.v1.MsgDeployUEA.universal_account_id": - x.UniversalAccountId = value.Message().Interface().(*UniversalAccountId) - case "uexecutor.v1.MsgDeployUEA.tx_hash": - x.TxHash = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEA")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEA 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_MsgDeployUEA) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEA.universal_account_id": - if x.UniversalAccountId == nil { - x.UniversalAccountId = new(UniversalAccountId) - } - return protoreflect.ValueOfMessage(x.UniversalAccountId.ProtoReflect()) - case "uexecutor.v1.MsgDeployUEA.signer": - panic(fmt.Errorf("field signer of message uexecutor.v1.MsgDeployUEA is not mutable")) - case "uexecutor.v1.MsgDeployUEA.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.MsgDeployUEA is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEA")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEA 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_MsgDeployUEA) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEA.signer": - return protoreflect.ValueOfString("") - case "uexecutor.v1.MsgDeployUEA.universal_account_id": - m := new(UniversalAccountId) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "uexecutor.v1.MsgDeployUEA.tx_hash": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEA")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEA 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_MsgDeployUEA) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgDeployUEA", 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_MsgDeployUEA) 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_MsgDeployUEA) 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_MsgDeployUEA) 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_MsgDeployUEA) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeployUEA) - 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.UniversalAccountId != nil { - l = options.Size(x.UniversalAccountId) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TxHash) - 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().(*MsgDeployUEA) - 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.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.UniversalAccountId != nil { - encoded, err := options.Marshal(x.UniversalAccountId) - 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.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().(*MsgDeployUEA) - 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: MsgDeployUEA: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeployUEA: 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 UniversalAccountId", 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.UniversalAccountId == nil { - x.UniversalAccountId = &UniversalAccountId{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalAccountId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - 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_MsgDeployUEAResponse protoreflect.MessageDescriptor - fd_MsgDeployUEAResponse_UEA protoreflect.FieldDescriptor -) - -func init() { - file_uexecutor_v1_tx_proto_init() - md_MsgDeployUEAResponse = File_uexecutor_v1_tx_proto.Messages().ByName("MsgDeployUEAResponse") - fd_MsgDeployUEAResponse_UEA = md_MsgDeployUEAResponse.Fields().ByName("UEA") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeployUEAResponse)(nil) - -type fastReflection_MsgDeployUEAResponse MsgDeployUEAResponse - -func (x *MsgDeployUEAResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeployUEAResponse)(x) -} - -func (x *MsgDeployUEAResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeployUEAResponse_messageType fastReflection_MsgDeployUEAResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeployUEAResponse_messageType{} - -type fastReflection_MsgDeployUEAResponse_messageType struct{} - -func (x fastReflection_MsgDeployUEAResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeployUEAResponse)(nil) -} -func (x fastReflection_MsgDeployUEAResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeployUEAResponse) -} -func (x fastReflection_MsgDeployUEAResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeployUEAResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeployUEAResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeployUEAResponse -} - -// 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_MsgDeployUEAResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDeployUEAResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeployUEAResponse) New() protoreflect.Message { - return new(fastReflection_MsgDeployUEAResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeployUEAResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDeployUEAResponse)(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_MsgDeployUEAResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.UEA) != 0 { - value := protoreflect.ValueOfBytes(x.UEA) - if !f(fd_MsgDeployUEAResponse_UEA, 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_MsgDeployUEAResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEAResponse.UEA": - return len(x.UEA) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEAResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEAResponse 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_MsgDeployUEAResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEAResponse.UEA": - x.UEA = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEAResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEAResponse 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_MsgDeployUEAResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "uexecutor.v1.MsgDeployUEAResponse.UEA": - value := x.UEA - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEAResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEAResponse 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_MsgDeployUEAResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEAResponse.UEA": - x.UEA = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEAResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEAResponse 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_MsgDeployUEAResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEAResponse.UEA": - panic(fmt.Errorf("field UEA of message uexecutor.v1.MsgDeployUEAResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEAResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEAResponse 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_MsgDeployUEAResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.MsgDeployUEAResponse.UEA": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgDeployUEAResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgDeployUEAResponse 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_MsgDeployUEAResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgDeployUEAResponse", 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_MsgDeployUEAResponse) 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_MsgDeployUEAResponse) 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_MsgDeployUEAResponse) 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_MsgDeployUEAResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeployUEAResponse) - 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.UEA) - 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().(*MsgDeployUEAResponse) - 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.UEA) > 0 { - i -= len(x.UEA) - copy(dAtA[i:], x.UEA) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UEA))) - 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().(*MsgDeployUEAResponse) - 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: MsgDeployUEAResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeployUEAResponse: 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 UEA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UEA = append(x.UEA[:0], dAtA[iNdEx:postIndex]...) - if x.UEA == nil { - x.UEA = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgMintPC protoreflect.MessageDescriptor - fd_MsgMintPC_signer protoreflect.FieldDescriptor - fd_MsgMintPC_universal_account_id protoreflect.FieldDescriptor - fd_MsgMintPC_tx_hash protoreflect.FieldDescriptor -) - -func init() { - file_uexecutor_v1_tx_proto_init() - md_MsgMintPC = File_uexecutor_v1_tx_proto.Messages().ByName("MsgMintPC") - fd_MsgMintPC_signer = md_MsgMintPC.Fields().ByName("signer") - fd_MsgMintPC_universal_account_id = md_MsgMintPC.Fields().ByName("universal_account_id") - fd_MsgMintPC_tx_hash = md_MsgMintPC.Fields().ByName("tx_hash") -} - -var _ protoreflect.Message = (*fastReflection_MsgMintPC)(nil) - -type fastReflection_MsgMintPC MsgMintPC - -func (x *MsgMintPC) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgMintPC)(x) -} - -func (x *MsgMintPC) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgMintPC_messageType fastReflection_MsgMintPC_messageType -var _ protoreflect.MessageType = fastReflection_MsgMintPC_messageType{} - -type fastReflection_MsgMintPC_messageType struct{} - -func (x fastReflection_MsgMintPC_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgMintPC)(nil) -} -func (x fastReflection_MsgMintPC_messageType) New() protoreflect.Message { - return new(fastReflection_MsgMintPC) -} -func (x fastReflection_MsgMintPC_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMintPC -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgMintPC) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMintPC -} - -// 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_MsgMintPC) Type() protoreflect.MessageType { - return _fastReflection_MsgMintPC_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgMintPC) New() protoreflect.Message { - return new(fastReflection_MsgMintPC) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgMintPC) Interface() protoreflect.ProtoMessage { - return (*MsgMintPC)(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_MsgMintPC) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Signer != "" { - value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgMintPC_signer, value) { - return - } - } - if x.UniversalAccountId != nil { - value := protoreflect.ValueOfMessage(x.UniversalAccountId.ProtoReflect()) - if !f(fd_MsgMintPC_universal_account_id, value) { - return - } - } - if x.TxHash != "" { - value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_MsgMintPC_tx_hash, 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_MsgMintPC) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "uexecutor.v1.MsgMintPC.signer": - return x.Signer != "" - case "uexecutor.v1.MsgMintPC.universal_account_id": - return x.UniversalAccountId != nil - case "uexecutor.v1.MsgMintPC.tx_hash": - return x.TxHash != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPC")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPC 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_MsgMintPC) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "uexecutor.v1.MsgMintPC.signer": - x.Signer = "" - case "uexecutor.v1.MsgMintPC.universal_account_id": - x.UniversalAccountId = nil - case "uexecutor.v1.MsgMintPC.tx_hash": - x.TxHash = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPC")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPC 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_MsgMintPC) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "uexecutor.v1.MsgMintPC.signer": - value := x.Signer - return protoreflect.ValueOfString(value) - case "uexecutor.v1.MsgMintPC.universal_account_id": - value := x.UniversalAccountId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "uexecutor.v1.MsgMintPC.tx_hash": - value := x.TxHash - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPC")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPC 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_MsgMintPC) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "uexecutor.v1.MsgMintPC.signer": - x.Signer = value.Interface().(string) - case "uexecutor.v1.MsgMintPC.universal_account_id": - x.UniversalAccountId = value.Message().Interface().(*UniversalAccountId) - case "uexecutor.v1.MsgMintPC.tx_hash": - x.TxHash = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPC")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPC 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_MsgMintPC) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.MsgMintPC.universal_account_id": - if x.UniversalAccountId == nil { - x.UniversalAccountId = new(UniversalAccountId) - } - return protoreflect.ValueOfMessage(x.UniversalAccountId.ProtoReflect()) - case "uexecutor.v1.MsgMintPC.signer": - panic(fmt.Errorf("field signer of message uexecutor.v1.MsgMintPC is not mutable")) - case "uexecutor.v1.MsgMintPC.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.MsgMintPC is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPC")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPC 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_MsgMintPC) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.MsgMintPC.signer": - return protoreflect.ValueOfString("") - case "uexecutor.v1.MsgMintPC.universal_account_id": - m := new(UniversalAccountId) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "uexecutor.v1.MsgMintPC.tx_hash": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPC")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPC 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_MsgMintPC) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgMintPC", 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_MsgMintPC) 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_MsgMintPC) 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_MsgMintPC) 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_MsgMintPC) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgMintPC) - 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.UniversalAccountId != nil { - l = options.Size(x.UniversalAccountId) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TxHash) - 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().(*MsgMintPC) - 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.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.UniversalAccountId != nil { - encoded, err := options.Marshal(x.UniversalAccountId) - 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.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().(*MsgMintPC) - 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: MsgMintPC: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgMintPC: 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 UniversalAccountId", 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.UniversalAccountId == nil { - x.UniversalAccountId = &UniversalAccountId{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalAccountId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 - 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_MsgMintPCResponse protoreflect.MessageDescriptor -) - -func init() { - file_uexecutor_v1_tx_proto_init() - md_MsgMintPCResponse = File_uexecutor_v1_tx_proto.Messages().ByName("MsgMintPCResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgMintPCResponse)(nil) - -type fastReflection_MsgMintPCResponse MsgMintPCResponse - -func (x *MsgMintPCResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgMintPCResponse)(x) -} - -func (x *MsgMintPCResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgMintPCResponse_messageType fastReflection_MsgMintPCResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgMintPCResponse_messageType{} - -type fastReflection_MsgMintPCResponse_messageType struct{} - -func (x fastReflection_MsgMintPCResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgMintPCResponse)(nil) -} -func (x fastReflection_MsgMintPCResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgMintPCResponse) -} -func (x fastReflection_MsgMintPCResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMintPCResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgMintPCResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgMintPCResponse -} - -// 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_MsgMintPCResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgMintPCResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgMintPCResponse) New() protoreflect.Message { - return new(fastReflection_MsgMintPCResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgMintPCResponse) Interface() protoreflect.ProtoMessage { - return (*MsgMintPCResponse)(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_MsgMintPCResponse) 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_MsgMintPCResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPCResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPCResponse 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_MsgMintPCResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPCResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPCResponse 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_MsgMintPCResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPCResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPCResponse 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_MsgMintPCResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPCResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPCResponse 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_MsgMintPCResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPCResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPCResponse 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_MsgMintPCResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgMintPCResponse")) - } - panic(fmt.Errorf("message uexecutor.v1.MsgMintPCResponse 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_MsgMintPCResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgMintPCResponse", 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_MsgMintPCResponse) 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_MsgMintPCResponse) 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_MsgMintPCResponse) 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_MsgMintPCResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgMintPCResponse) - 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().(*MsgMintPCResponse) - 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().(*MsgMintPCResponse) - 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: MsgMintPCResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgMintPCResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_MsgExecutePayload protoreflect.MessageDescriptor fd_MsgExecutePayload_signer protoreflect.FieldDescriptor @@ -2801,7 +897,7 @@ func (x *MsgExecutePayload) ProtoReflect() protoreflect.Message { } func (x *MsgExecutePayload) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[6] + mi := &file_uexecutor_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3435,7 +1531,7 @@ func (x *MsgExecutePayloadResponse) ProtoReflect() protoreflect.Message { } func (x *MsgExecutePayloadResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[7] + mi := &file_uexecutor_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3799,7 +1895,7 @@ func (x *MsgMigrateUEA) ProtoReflect() protoreflect.Message { } func (x *MsgMigrateUEA) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[8] + mi := &file_uexecutor_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4433,7 +2529,7 @@ func (x *MsgMigrateUEAResponse) ProtoReflect() protoreflect.Message { } func (x *MsgMigrateUEAResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[9] + mi := &file_uexecutor_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4793,7 +2889,7 @@ func (x *MsgVoteInbound) ProtoReflect() protoreflect.Message { } func (x *MsgVoteInbound) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + mi := &file_uexecutor_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5288,7 +3384,7 @@ func (x *MsgVoteInboundResponse) ProtoReflect() protoreflect.Message { } func (x *MsgVoteInboundResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + mi := &file_uexecutor_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5652,7 +3748,7 @@ func (x *MsgVoteGasPrice) ProtoReflect() protoreflect.Message { } func (x *MsgVoteGasPrice) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[12] + mi := &file_uexecutor_v1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6224,7 +4320,7 @@ func (x *MsgVoteGasPriceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgVoteGasPriceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[13] + mi := &file_uexecutor_v1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6655,181 +4751,6 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{1} } -// MsgDeployUEA is the message used to deploy a new smart account. -type MsgDeployUEA struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signer is the Cosmos address initiating the tx (used for tx signing) - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // universal_account_id is the identifier of the owner account - UniversalAccountId *UniversalAccountId `protobuf:"bytes,2,opt,name=universal_account_id,json=universalAccountId,proto3" json:"universal_account_id,omitempty"` - // tx_hash is the hash of the transaction in which user locked the tokens - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (x *MsgDeployUEA) Reset() { - *x = MsgDeployUEA{} - if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeployUEA) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeployUEA) ProtoMessage() {} - -// Deprecated: Use MsgDeployUEA.ProtoReflect.Descriptor instead. -func (*MsgDeployUEA) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgDeployUEA) GetSigner() string { - if x != nil { - return x.Signer - } - return "" -} - -func (x *MsgDeployUEA) GetUniversalAccountId() *UniversalAccountId { - if x != nil { - return x.UniversalAccountId - } - return nil -} - -func (x *MsgDeployUEA) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - -// MsgDeployUEAResponse defines the response for MsgDeployUEA. -type MsgDeployUEAResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // uea is the address of the newly deployed smart account - UEA []byte `protobuf:"bytes,1,opt,name=UEA,proto3" json:"UEA,omitempty"` -} - -func (x *MsgDeployUEAResponse) Reset() { - *x = MsgDeployUEAResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeployUEAResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeployUEAResponse) ProtoMessage() {} - -// Deprecated: Use MsgDeployUEAResponse.ProtoReflect.Descriptor instead. -func (*MsgDeployUEAResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgDeployUEAResponse) GetUEA() []byte { - if x != nil { - return x.UEA - } - return nil -} - -// MsgMintPC represents a message to mint PC tokens to a smart account, -// based on the amount locked by the user in the gateway contract. -type MsgMintPC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signer is the Cosmos address initiating the tx (used for tx signing) - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // universal_account_id is the identifier of the owner account - UniversalAccountId *UniversalAccountId `protobuf:"bytes,2,opt,name=universal_account_id,json=universalAccountId,proto3" json:"universal_account_id,omitempty"` - // tx_hash is the hash of the transaction in which user locked the tokens - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (x *MsgMintPC) Reset() { - *x = MsgMintPC{} - if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgMintPC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgMintPC) ProtoMessage() {} - -// Deprecated: Use MsgMintPC.ProtoReflect.Descriptor instead. -func (*MsgMintPC) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgMintPC) GetSigner() string { - if x != nil { - return x.Signer - } - return "" -} - -func (x *MsgMintPC) GetUniversalAccountId() *UniversalAccountId { - if x != nil { - return x.UniversalAccountId - } - return nil -} - -func (x *MsgMintPC) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - -// MsgMintPCResponse defines the response for MsgMintPC. -type MsgMintPCResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgMintPCResponse) Reset() { - *x = MsgMintPCResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgMintPCResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgMintPCResponse) ProtoMessage() {} - -// Deprecated: Use MsgMintPCResponse.ProtoReflect.Descriptor instead. -func (*MsgMintPCResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{5} -} - // MsgExecutePayload defines a message for executing a universal payload type MsgExecutePayload struct { state protoimpl.MessageState @@ -6849,7 +4770,7 @@ type MsgExecutePayload struct { func (x *MsgExecutePayload) Reset() { *x = MsgExecutePayload{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[6] + mi := &file_uexecutor_v1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6863,7 +4784,7 @@ func (*MsgExecutePayload) ProtoMessage() {} // Deprecated: Use MsgExecutePayload.ProtoReflect.Descriptor instead. func (*MsgExecutePayload) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{6} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgExecutePayload) GetSigner() string { @@ -6904,7 +4825,7 @@ type MsgExecutePayloadResponse struct { func (x *MsgExecutePayloadResponse) Reset() { *x = MsgExecutePayloadResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[7] + mi := &file_uexecutor_v1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6918,7 +4839,7 @@ func (*MsgExecutePayloadResponse) ProtoMessage() {} // Deprecated: Use MsgExecutePayloadResponse.ProtoReflect.Descriptor instead. func (*MsgExecutePayloadResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{7} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{3} } // MsgMigrateUEA defines a message for migarting Universal Executor Account (UEA) @@ -6940,7 +4861,7 @@ type MsgMigrateUEA struct { func (x *MsgMigrateUEA) Reset() { *x = MsgMigrateUEA{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[8] + mi := &file_uexecutor_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6954,7 +4875,7 @@ func (*MsgMigrateUEA) ProtoMessage() {} // Deprecated: Use MsgMigrateUEA.ProtoReflect.Descriptor instead. func (*MsgMigrateUEA) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{8} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgMigrateUEA) GetSigner() string { @@ -6995,7 +4916,7 @@ type MsgMigrateUEAResponse struct { func (x *MsgMigrateUEAResponse) Reset() { *x = MsgMigrateUEAResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[9] + mi := &file_uexecutor_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7009,7 +4930,7 @@ func (*MsgMigrateUEAResponse) ProtoMessage() {} // Deprecated: Use MsgMigrateUEAResponse.ProtoReflect.Descriptor instead. func (*MsgMigrateUEAResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{9} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{5} } // MsgVoteInbound allows a universal validator to vote on an inbound transfer. @@ -7026,7 +4947,7 @@ type MsgVoteInbound struct { func (x *MsgVoteInbound) Reset() { *x = MsgVoteInbound{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + mi := &file_uexecutor_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7040,7 +4961,7 @@ func (*MsgVoteInbound) ProtoMessage() {} // Deprecated: Use MsgVoteInbound.ProtoReflect.Descriptor instead. func (*MsgVoteInbound) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{10} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgVoteInbound) GetSigner() string { @@ -7067,7 +4988,7 @@ type MsgVoteInboundResponse struct { func (x *MsgVoteInboundResponse) Reset() { *x = MsgVoteInboundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + mi := &file_uexecutor_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7081,7 +5002,7 @@ func (*MsgVoteInboundResponse) ProtoMessage() {} // Deprecated: Use MsgVoteInboundResponse.ProtoReflect.Descriptor instead. func (*MsgVoteInboundResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{11} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{7} } // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices @@ -7099,7 +5020,7 @@ type MsgVoteGasPrice struct { func (x *MsgVoteGasPrice) Reset() { *x = MsgVoteGasPrice{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[12] + mi := &file_uexecutor_v1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7113,7 +5034,7 @@ func (*MsgVoteGasPrice) ProtoMessage() {} // Deprecated: Use MsgVoteGasPrice.ProtoReflect.Descriptor instead. func (*MsgVoteGasPrice) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{12} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgVoteGasPrice) GetSigner() string { @@ -7154,7 +5075,7 @@ type MsgVoteGasPriceResponse struct { func (x *MsgVoteGasPriceResponse) Reset() { *x = MsgVoteGasPriceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[13] + mi := &file_uexecutor_v1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7168,7 +5089,7 @@ func (*MsgVoteGasPriceResponse) ProtoMessage() {} // Deprecated: Use MsgVoteGasPriceResponse.ProtoReflect.Descriptor instead. func (*MsgVoteGasPriceResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{13} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{9} } var File_uexecutor_v1_tx_proto protoreflect.FileDescriptor @@ -7196,154 +5117,115 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd5, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 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, 0x52, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x3a, 0x26, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x22, 0x28, 0x0a, - 0x14, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x45, 0x41, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x03, 0x55, 0x45, 0x41, 0x22, 0xcf, 0x01, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x4d, - 0x69, 0x6e, 0x74, 0x50, 0x43, 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, 0x52, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x13, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, - 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, - 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, - 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 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, 0x52, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x61, 0x74, 0x61, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, - 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, - 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, 0x52, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x52, 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x52, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x17, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, - 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 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, 0x2f, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x21, 0x82, 0xe7, 0xb0, 0x2a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, - 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 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, 0x2a, 0x0a, 0x11, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, - 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc8, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x54, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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, 0x52, 0x0a, + 0x14, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x12, 0x75, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2b, + 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, + 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 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, 0x52, 0x0a, 0x14, 0x75, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x4b, 0x0a, + 0x11, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, + 0x41, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, + 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 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, + 0x2f, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x3a, 0x21, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, + 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, + 0x65, 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, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb7, + 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 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, 0x5a, 0x0a, 0x0e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 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, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, - 0x45, 0x41, 0x12, 0x1a, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, - 0x69, 0x6e, 0x74, 0x50, 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, - 0x12, 0x1b, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x1a, 0x23, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, - 0x24, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, - 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x41, 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, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, + 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x12, 0x1b, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, + 0x55, 0x45, 0x41, 0x1a, 0x23, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, + 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, + 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, + 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, + 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 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, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, + 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -7358,56 +5240,46 @@ func file_uexecutor_v1_tx_proto_rawDescGZIP() []byte { return file_uexecutor_v1_tx_proto_rawDescData } -var file_uexecutor_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_uexecutor_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_uexecutor_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: uexecutor.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: uexecutor.v1.MsgUpdateParamsResponse - (*MsgDeployUEA)(nil), // 2: uexecutor.v1.MsgDeployUEA - (*MsgDeployUEAResponse)(nil), // 3: uexecutor.v1.MsgDeployUEAResponse - (*MsgMintPC)(nil), // 4: uexecutor.v1.MsgMintPC - (*MsgMintPCResponse)(nil), // 5: uexecutor.v1.MsgMintPCResponse - (*MsgExecutePayload)(nil), // 6: uexecutor.v1.MsgExecutePayload - (*MsgExecutePayloadResponse)(nil), // 7: uexecutor.v1.MsgExecutePayloadResponse - (*MsgMigrateUEA)(nil), // 8: uexecutor.v1.MsgMigrateUEA - (*MsgMigrateUEAResponse)(nil), // 9: uexecutor.v1.MsgMigrateUEAResponse - (*MsgVoteInbound)(nil), // 10: uexecutor.v1.MsgVoteInbound - (*MsgVoteInboundResponse)(nil), // 11: uexecutor.v1.MsgVoteInboundResponse - (*MsgVoteGasPrice)(nil), // 12: uexecutor.v1.MsgVoteGasPrice - (*MsgVoteGasPriceResponse)(nil), // 13: uexecutor.v1.MsgVoteGasPriceResponse - (*Params)(nil), // 14: uexecutor.v1.Params - (*UniversalAccountId)(nil), // 15: uexecutor.v1.UniversalAccountId - (*UniversalPayload)(nil), // 16: uexecutor.v1.UniversalPayload - (*MigrationPayload)(nil), // 17: uexecutor.v1.MigrationPayload - (*Inbound)(nil), // 18: uexecutor.v1.Inbound + (*MsgExecutePayload)(nil), // 2: uexecutor.v1.MsgExecutePayload + (*MsgExecutePayloadResponse)(nil), // 3: uexecutor.v1.MsgExecutePayloadResponse + (*MsgMigrateUEA)(nil), // 4: uexecutor.v1.MsgMigrateUEA + (*MsgMigrateUEAResponse)(nil), // 5: uexecutor.v1.MsgMigrateUEAResponse + (*MsgVoteInbound)(nil), // 6: uexecutor.v1.MsgVoteInbound + (*MsgVoteInboundResponse)(nil), // 7: uexecutor.v1.MsgVoteInboundResponse + (*MsgVoteGasPrice)(nil), // 8: uexecutor.v1.MsgVoteGasPrice + (*MsgVoteGasPriceResponse)(nil), // 9: uexecutor.v1.MsgVoteGasPriceResponse + (*Params)(nil), // 10: uexecutor.v1.Params + (*UniversalAccountId)(nil), // 11: uexecutor.v1.UniversalAccountId + (*UniversalPayload)(nil), // 12: uexecutor.v1.UniversalPayload + (*MigrationPayload)(nil), // 13: uexecutor.v1.MigrationPayload + (*Inbound)(nil), // 14: uexecutor.v1.Inbound } var file_uexecutor_v1_tx_proto_depIdxs = []int32{ - 14, // 0: uexecutor.v1.MsgUpdateParams.params:type_name -> uexecutor.v1.Params - 15, // 1: uexecutor.v1.MsgDeployUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 15, // 2: uexecutor.v1.MsgMintPC.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 15, // 3: uexecutor.v1.MsgExecutePayload.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 16, // 4: uexecutor.v1.MsgExecutePayload.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 15, // 5: uexecutor.v1.MsgMigrateUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 17, // 6: uexecutor.v1.MsgMigrateUEA.migration_payload:type_name -> uexecutor.v1.MigrationPayload - 18, // 7: uexecutor.v1.MsgVoteInbound.inbound:type_name -> uexecutor.v1.Inbound - 0, // 8: uexecutor.v1.Msg.UpdateParams:input_type -> uexecutor.v1.MsgUpdateParams - 2, // 9: uexecutor.v1.Msg.DeployUEA:input_type -> uexecutor.v1.MsgDeployUEA - 4, // 10: uexecutor.v1.Msg.MintPC:input_type -> uexecutor.v1.MsgMintPC - 6, // 11: uexecutor.v1.Msg.ExecutePayload:input_type -> uexecutor.v1.MsgExecutePayload - 8, // 12: uexecutor.v1.Msg.MigrateUEA:input_type -> uexecutor.v1.MsgMigrateUEA - 10, // 13: uexecutor.v1.Msg.VoteInbound:input_type -> uexecutor.v1.MsgVoteInbound - 12, // 14: uexecutor.v1.Msg.VoteGasPrice:input_type -> uexecutor.v1.MsgVoteGasPrice - 1, // 15: uexecutor.v1.Msg.UpdateParams:output_type -> uexecutor.v1.MsgUpdateParamsResponse - 3, // 16: uexecutor.v1.Msg.DeployUEA:output_type -> uexecutor.v1.MsgDeployUEAResponse - 5, // 17: uexecutor.v1.Msg.MintPC:output_type -> uexecutor.v1.MsgMintPCResponse - 7, // 18: uexecutor.v1.Msg.ExecutePayload:output_type -> uexecutor.v1.MsgExecutePayloadResponse - 9, // 19: uexecutor.v1.Msg.MigrateUEA:output_type -> uexecutor.v1.MsgMigrateUEAResponse - 11, // 20: uexecutor.v1.Msg.VoteInbound:output_type -> uexecutor.v1.MsgVoteInboundResponse - 13, // 21: uexecutor.v1.Msg.VoteGasPrice:output_type -> uexecutor.v1.MsgVoteGasPriceResponse - 15, // [15:22] is the sub-list for method output_type - 8, // [8:15] 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 + 10, // 0: uexecutor.v1.MsgUpdateParams.params:type_name -> uexecutor.v1.Params + 11, // 1: uexecutor.v1.MsgExecutePayload.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 12, // 2: uexecutor.v1.MsgExecutePayload.universal_payload:type_name -> uexecutor.v1.UniversalPayload + 11, // 3: uexecutor.v1.MsgMigrateUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 13, // 4: uexecutor.v1.MsgMigrateUEA.migration_payload:type_name -> uexecutor.v1.MigrationPayload + 14, // 5: uexecutor.v1.MsgVoteInbound.inbound:type_name -> uexecutor.v1.Inbound + 0, // 6: uexecutor.v1.Msg.UpdateParams:input_type -> uexecutor.v1.MsgUpdateParams + 2, // 7: uexecutor.v1.Msg.ExecutePayload:input_type -> uexecutor.v1.MsgExecutePayload + 4, // 8: uexecutor.v1.Msg.MigrateUEA:input_type -> uexecutor.v1.MsgMigrateUEA + 6, // 9: uexecutor.v1.Msg.VoteInbound:input_type -> uexecutor.v1.MsgVoteInbound + 8, // 10: uexecutor.v1.Msg.VoteGasPrice:input_type -> uexecutor.v1.MsgVoteGasPrice + 1, // 11: uexecutor.v1.Msg.UpdateParams:output_type -> uexecutor.v1.MsgUpdateParamsResponse + 3, // 12: uexecutor.v1.Msg.ExecutePayload:output_type -> uexecutor.v1.MsgExecutePayloadResponse + 5, // 13: uexecutor.v1.Msg.MigrateUEA:output_type -> uexecutor.v1.MsgMigrateUEAResponse + 7, // 14: uexecutor.v1.Msg.VoteInbound:output_type -> uexecutor.v1.MsgVoteInboundResponse + 9, // 15: uexecutor.v1.Msg.VoteGasPrice:output_type -> uexecutor.v1.MsgVoteGasPriceResponse + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_uexecutor_v1_tx_proto_init() } @@ -7442,54 +5314,6 @@ func file_uexecutor_v1_tx_proto_init() { } } file_uexecutor_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeployUEA); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uexecutor_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeployUEAResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uexecutor_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgMintPC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uexecutor_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgMintPCResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uexecutor_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgExecutePayload); i { case 0: return &v.state @@ -7501,7 +5325,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgExecutePayloadResponse); i { case 0: return &v.state @@ -7513,7 +5337,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgMigrateUEA); i { case 0: return &v.state @@ -7525,7 +5349,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgMigrateUEAResponse); i { case 0: return &v.state @@ -7537,7 +5361,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteInbound); i { case 0: return &v.state @@ -7549,7 +5373,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteInboundResponse); i { case 0: return &v.state @@ -7561,7 +5385,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteGasPrice); i { case 0: return &v.state @@ -7573,7 +5397,7 @@ func file_uexecutor_v1_tx_proto_init() { return nil } } - file_uexecutor_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteGasPriceResponse); i { case 0: return &v.state @@ -7592,7 +5416,7 @@ func file_uexecutor_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uexecutor/v1/tx_grpc.pb.go b/api/uexecutor/v1/tx_grpc.pb.go index 9a79b5a2..e8f87d95 100644 --- a/api/uexecutor/v1/tx_grpc.pb.go +++ b/api/uexecutor/v1/tx_grpc.pb.go @@ -20,8 +20,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/uexecutor.v1.Msg/UpdateParams" - Msg_DeployUEA_FullMethodName = "/uexecutor.v1.Msg/DeployUEA" - Msg_MintPC_FullMethodName = "/uexecutor.v1.Msg/MintPC" Msg_ExecutePayload_FullMethodName = "/uexecutor.v1.Msg/ExecutePayload" Msg_MigrateUEA_FullMethodName = "/uexecutor.v1.Msg/MigrateUEA" Msg_VoteInbound_FullMethodName = "/uexecutor.v1.Msg/VoteInbound" @@ -36,10 +34,6 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // DeployUEA defines a message to deploy a new smart account. - DeployUEA(ctx context.Context, in *MsgDeployUEA, opts ...grpc.CallOption) (*MsgDeployUEAResponse, error) - // MintPC defines a message to mint PC tokens to a smart account, - MintPC(ctx context.Context, in *MsgMintPC, opts ...grpc.CallOption) (*MsgMintPCResponse, error) // ExecutePayload defines a message for executing a universal payload ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) // MigrateUEA defines a message for migrating UEA @@ -67,24 +61,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) DeployUEA(ctx context.Context, in *MsgDeployUEA, opts ...grpc.CallOption) (*MsgDeployUEAResponse, error) { - out := new(MsgDeployUEAResponse) - err := c.cc.Invoke(ctx, Msg_DeployUEA_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) MintPC(ctx context.Context, in *MsgMintPC, opts ...grpc.CallOption) (*MsgMintPCResponse, error) { - out := new(MsgMintPCResponse) - err := c.cc.Invoke(ctx, Msg_MintPC_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) { out := new(MsgExecutePayloadResponse) err := c.cc.Invoke(ctx, Msg_ExecutePayload_FullMethodName, in, out, opts...) @@ -129,10 +105,6 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // DeployUEA defines a message to deploy a new smart account. - DeployUEA(context.Context, *MsgDeployUEA) (*MsgDeployUEAResponse, error) - // MintPC defines a message to mint PC tokens to a smart account, - MintPC(context.Context, *MsgMintPC) (*MsgMintPCResponse, error) // ExecutePayload defines a message for executing a universal payload ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) // MigrateUEA defines a message for migrating UEA @@ -151,12 +123,6 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) DeployUEA(context.Context, *MsgDeployUEA) (*MsgDeployUEAResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeployUEA not implemented") -} -func (UnimplementedMsgServer) MintPC(context.Context, *MsgMintPC) (*MsgMintPCResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MintPC not implemented") -} func (UnimplementedMsgServer) ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecutePayload not implemented") } @@ -200,42 +166,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_DeployUEA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeployUEA) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeployUEA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_DeployUEA_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeployUEA(ctx, req.(*MsgDeployUEA)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_MintPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgMintPC) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MintPC(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_MintPC_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MintPC(ctx, req.(*MsgMintPC)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_ExecutePayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgExecutePayload) if err := dec(in); err != nil { @@ -319,14 +249,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "DeployUEA", - Handler: _Msg_DeployUEA_Handler, - }, - { - MethodName: "MintPC", - Handler: _Msg_MintPC_Handler, - }, { MethodName: "ExecutePayload", Handler: _Msg_ExecutePayload_Handler, diff --git a/app/txpolicy/gasless.go b/app/txpolicy/gasless.go index 06854833..470a13c2 100644 --- a/app/txpolicy/gasless.go +++ b/app/txpolicy/gasless.go @@ -17,8 +17,6 @@ func IsGaslessTx(tx sdk.Tx) bool { GaslessMsgTypes = []string{ sdk.MsgTypeURL(&uexecutortypes.MsgMigrateUEA{}), sdk.MsgTypeURL(&uexecutortypes.MsgExecutePayload{}), - sdk.MsgTypeURL(&uexecutortypes.MsgDeployUEA{}), - sdk.MsgTypeURL(&uexecutortypes.MsgMintPC{}), sdk.MsgTypeURL(&uexecutortypes.MsgVoteInbound{}), sdk.MsgTypeURL(&uexecutortypes.MsgVoteGasPrice{}), sdk.MsgTypeURL(&utsstypes.MsgVoteTssKeyProcess{}), diff --git a/app/upgrades.go b/app/upgrades.go index 9c74affa..560087c7 100755 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -12,6 +12,7 @@ import ( gasoracle "github.com/pushchain/push-chain-node/app/upgrades/gas-oracle" "github.com/pushchain/push-chain-node/app/upgrades/noop" pcmintcap "github.com/pushchain/push-chain-node/app/upgrades/pc-mint-cap" + removefeeabsv1 "github.com/pushchain/push-chain-node/app/upgrades/remove-fee-abs-v1" solanafix "github.com/pushchain/push-chain-node/app/upgrades/solana-fix" tsscore "github.com/pushchain/push-chain-node/app/upgrades/tss-core" tsscoreevmparamsfix "github.com/pushchain/push-chain-node/app/upgrades/tss-core-evm-params-fix" @@ -31,6 +32,7 @@ var Upgrades = []upgrades.Upgrade{ tsscoreevmparamsfix.NewUpgrade(), evmrpcfix.NewUpgrade(), tssvotegasless.NewUpgrade(), + removefeeabsv1.NewUpgrade(), } // RegisterUpgradeHandlers registers the chain upgrade handlers diff --git a/app/upgrades/remove-fee-abs-v1/upgrade.go b/app/upgrades/remove-fee-abs-v1/upgrade.go new file mode 100644 index 00000000..a19b1def --- /dev/null +++ b/app/upgrades/remove-fee-abs-v1/upgrade.go @@ -0,0 +1,35 @@ +package inbound + +import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/types/module" + + storetypes "cosmossdk.io/store/types" + "github.com/pushchain/push-chain-node/app/upgrades" +) + +const UpgradeName = "remove-fee-abs-v1" + +// NewUpgrade constructs the upgrade definition +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) { + return mm.RunMigrations(ctx, configurator, fromVM) + } +} diff --git a/proto/uexecutor/v1/tx.proto b/proto/uexecutor/v1/tx.proto index 858f8746..f45cc1c9 100755 --- a/proto/uexecutor/v1/tx.proto +++ b/proto/uexecutor/v1/tx.proto @@ -18,12 +18,6 @@ service Msg { // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // DeployUEA defines a message to deploy a new smart account. - rpc DeployUEA(MsgDeployUEA) returns (MsgDeployUEAResponse); - - // MintPC defines a message to mint PC tokens to a smart account, - rpc MintPC(MsgMintPC) returns (MsgMintPCResponse); - // ExecutePayload defines a message for executing a universal payload rpc ExecutePayload(MsgExecutePayload) returns (MsgExecutePayloadResponse); @@ -59,46 +53,6 @@ message MsgUpdateParams { // Since: cosmos-sdk 0.47 message MsgUpdateParamsResponse {} -// MsgDeployUEA is the message used to deploy a new smart account. -message MsgDeployUEA { - option (amino.name) = "uexecutor/MsgDeployUEA"; - option (cosmos.msg.v1.signer) = "signer"; - - // signer is the Cosmos address initiating the tx (used for tx signing) - string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // universal_account_id is the identifier of the owner account - UniversalAccountId universal_account_id = 2; - - // tx_hash is the hash of the transaction in which user locked the tokens - string tx_hash = 3; -} - -// MsgDeployUEAResponse defines the response for MsgDeployUEA. -message MsgDeployUEAResponse { - // uea is the address of the newly deployed smart account - bytes UEA = 1; -} - -// MsgMintPC represents a message to mint PC tokens to a smart account, -// based on the amount locked by the user in the gateway contract. -message MsgMintPC { - option (amino.name) = "uexecutor/MsgMintPC"; - option (cosmos.msg.v1.signer) = "signer"; - - // signer is the Cosmos address initiating the tx (used for tx signing) - string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // universal_account_id is the identifier of the owner account - UniversalAccountId universal_account_id = 2; - - // tx_hash is the hash of the transaction in which user locked the tokens - string tx_hash = 3; -} - -// MsgMintPCResponse defines the response for MsgMintPC. -message MsgMintPCResponse {} - // MsgExecutePayload defines a message for executing a universal payload message MsgExecutePayload { option (amino.name) = "uexecutor/MsgExecutePayload"; diff --git a/test/integration/uexecutor/deploy_uea_test.go b/test/integration/uexecutor/deploy_uea_test.go deleted file mode 100644 index 82bf65fa..00000000 --- a/test/integration/uexecutor/deploy_uea_test.go +++ /dev/null @@ -1,103 +0,0 @@ -package integrationtest - -import ( - "bytes" - "testing" - - "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/test/utils" - uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" - uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" - "github.com/stretchr/testify/require" -) - -func TestDeployUEA(t *testing.T) { - app, ctx, _ := utils.SetAppWithValidators(t) - - chainConfigTest := uregistrytypes.ChainConfig{ - Chain: "eip155:11155111", - VmType: uregistrytypes.VmType_EVM, - PublicRpcUrl: "https://sepolia.drpc.org", - GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", - BlockConfirmation: &uregistrytypes.BlockConfirmation{ - FastInbound: 5, - StandardInbound: 12, - }, - GatewayMethods: []*uregistrytypes.GatewayMethods{&uregistrytypes.GatewayMethods{ - Name: "addFunds", - Identifier: "", - EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", - }}, - Enabled: &uregistrytypes.ChainEnabled{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - }, - } - - app.UregistryKeeper.AddChainConfig(ctx, &chainConfigTest) - ms := uexecutorkeeper.NewMsgServerImpl(app.UexecutorKeeper) - - t.Run("Success!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0x7d5e108ba9709c557a6ed2e238bd6d3c65a40f906fe370617fbf96dd79edd0ce" - - msg := &uexecutortypes.MsgDeployUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - resp, err := ms.DeployUEA(ctx, msg) - require.NoError(t, err) - - addr := common.HexToAddress("0x8669BeD121FefA3d9CF2821273f489e717cca95d").Bytes() - - var expected [32]byte - copy(expected[32-len(addr):], addr) - - require.True(t, bytes.Equal(expected[:], resp.UEA), "address bytes do not match") - - }) - t.Run("Repeat transaction!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - msg := &uexecutortypes.MsgDeployUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := ms.DeployUEA(ctx, msg) - require.ErrorContains(t, err, "contract call failed: method 'deployUEA', contract '0x00000000000000000000000000000000000000eA'") - }) - t.Run("Repeat transaction!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0xinvalidhash" - - msg := &uexecutortypes.MsgDeployUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := ms.DeployUEA(ctx, msg) - require.ErrorContains(t, err, "failed to verify gateway interaction transaction") - }) - -} diff --git a/test/integration/uexecutor/execute_payload_test.go b/test/integration/uexecutor/execute_payload_test.go index 9502982d..0c307f0f 100644 --- a/test/integration/uexecutor/execute_payload_test.go +++ b/test/integration/uexecutor/execute_payload_test.go @@ -4,7 +4,11 @@ import ( "testing" "cosmossdk.io/math" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" utils "github.com/pushchain/push-chain-node/test/utils" + "github.com/pushchain/push-chain-node/types" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" @@ -49,8 +53,6 @@ func TestExecutePayload(t *testing.T) { Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", } - validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - validUP := &uexecutortypes.UniversalPayload{ To: "0x527F3692F5C53CfA83F7689885995606F93b6164", Value: "0", @@ -63,22 +65,38 @@ func TestExecutePayload(t *testing.T) { VType: uexecutortypes.VerificationType(0), } - msgDeploy := &uexecutortypes.MsgDeployUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } + evmFrom := common.HexToAddress("0x1000000000000000000000000000000000000001") + // mint to module (or faucet) + err := app.BankKeeper.MintCoins( + ctx, + uexecutortypes.ModuleName, + sdk.NewCoins(sdk.NewCoin(types.BaseDenom, sdkmath.NewInt(2_000_000_000_000_000))), + ) + require.NoError(t, err) - _, err := ms.DeployUEA(ctx, msgDeploy) + // send to evmFrom + err = app.BankKeeper.SendCoinsFromModuleToAccount( + ctx, + uexecutortypes.ModuleName, + sdk.AccAddress(evmFrom.Bytes()), + sdk.NewCoins(sdk.NewCoin(types.BaseDenom, sdkmath.NewInt(1_000_000_000_000_000))), + ) require.NoError(t, err) - msgMint := &uexecutortypes.MsgMintPC{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } + _, err = app.UexecutorKeeper.DeployUEAV2(ctx, evmFrom, validUA) + require.NoError(t, err) + + factoryAddr := utils.GetDefaultAddresses().FactoryAddr + ueaAddr, _, err := app.UexecutorKeeper.CallFactoryToGetUEAAddressForOrigin(ctx, evmFrom, factoryAddr, validUA) + require.NoError(t, err) - _, err = ms.MintPC(ctx, msgMint) + // send to UEA + err = app.BankKeeper.SendCoinsFromModuleToAccount( + ctx, + uexecutortypes.ModuleName, + sdk.AccAddress(ueaAddr.Bytes()), + sdk.NewCoins(sdk.NewCoin(types.BaseDenom, sdkmath.NewInt(1_000_000_000_000_000))), + ) require.NoError(t, err) msg := &uexecutortypes.MsgExecutePayload{ @@ -92,6 +110,7 @@ func TestExecutePayload(t *testing.T) { require.NoError(t, err) }) + t.Run("Invalid Universal Payload!", func(t *testing.T) { validUA := &uexecutortypes.UniversalAccountId{ ChainNamespace: "eip155", @@ -99,8 +118,6 @@ func TestExecutePayload(t *testing.T) { Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", } - // validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - validUP := &uexecutortypes.UniversalPayload{ To: "0x527F3692F5C53CfA83F7689885995606F93b6164", Value: "0", @@ -130,8 +147,6 @@ func TestExecutePayload(t *testing.T) { Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", } - // validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - validUP := &uexecutortypes.UniversalPayload{ To: "0x527F3692F5C53CfA83F7689885995606F93b6164", Value: "0", diff --git a/test/integration/uexecutor/migrate_uea_test.go b/test/integration/uexecutor/migrate_uea_test.go deleted file mode 100644 index cf6ab9d1..00000000 --- a/test/integration/uexecutor/migrate_uea_test.go +++ /dev/null @@ -1,147 +0,0 @@ -package integrationtest - -import ( - "testing" - - "cosmossdk.io/math" - "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/test/utils" - uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" - uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" - "github.com/stretchr/testify/require" -) - -func TestMigrateUEA(t *testing.T) { - app, ctx, _ := utils.SetAppWithValidators(t) - - chainConfigTest := uregistrytypes.ChainConfig{ - Chain: "eip155:11155111", - VmType: uregistrytypes.VmType_EVM, - PublicRpcUrl: "https://sepolia.drpc.org", - GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", - BlockConfirmation: &uregistrytypes.BlockConfirmation{ - FastInbound: 5, - StandardInbound: 12, - }, - GatewayMethods: []*uregistrytypes.GatewayMethods{&uregistrytypes.GatewayMethods{ - Name: "addFunds", - Identifier: "", - EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", - }}, - Enabled: &uregistrytypes.ChainEnabled{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - }, - } - - app.UregistryKeeper.AddChainConfig(ctx, &chainConfigTest) - - params := app.FeeMarketKeeper.GetParams(ctx) - params.BaseFee = math.LegacyNewDec(1000000000) - app.FeeMarketKeeper.SetParams(ctx, params) - - ms := uexecutorkeeper.NewMsgServerImpl(app.UexecutorKeeper) - - t.Run("Success!", func(t *testing.T) { - migratedAddress, newEVMImplAddr := utils.DeployMigrationContract(t, app, ctx) - - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - validMP := &uexecutortypes.MigrationPayload{ - Migration: migratedAddress.Hex(), - Nonce: "0", - Deadline: "0", - } - - msgDeploy := &uexecutortypes.MsgDeployUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - deployUEAResponse, err := ms.DeployUEA(ctx, msgDeploy) - require.NoError(t, err) - - msgMint := &uexecutortypes.MsgMintPC{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err = ms.MintPC(ctx, msgMint) - require.NoError(t, err) - - msg := &uexecutortypes.MsgMigrateUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - MigrationPayload: validMP, - Signature: "0xd1d343e944b77d71542ff15b545244464d0a9bb5606a69ca97d123abc52ec84a54cd46e50cf771fcdf40df0cdb047c50c1dcc17f6482d5def3895ad94e0b1cad1c", - } - - _, err = ms.MigrateUEA(ctx, msg) - require.NoError(t, err) - - logicAfterMigration := app.EVMKeeper.GetState(ctx, common.BytesToAddress(deployUEAResponse.UEA[12:]), common.HexToHash("0x868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d")) - require.Equal(t, newEVMImplAddr, common.BytesToAddress(logicAfterMigration.Bytes())) - - }) - t.Run("Invalid Migration Payload!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - // validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - validMP := &uexecutortypes.MigrationPayload{ - Migration: "", - Nonce: "1", - Deadline: "9999999999", - } - - msg := &uexecutortypes.MsgMigrateUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - MigrationPayload: validMP, - } - - _, err := ms.MigrateUEA(ctx, msg) - require.ErrorContains(t, err, "invalid migration payload") - - }) - - t.Run("Invalid Signature Data", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - // validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - validMP := &uexecutortypes.MigrationPayload{ - Migration: "0x527F3692F5C53CfA83F7689885995606F93b6164", - Nonce: "1", - Deadline: "9999999999", - } - - msg := &uexecutortypes.MsgMigrateUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - MigrationPayload: validMP, - Signature: "0xZZZZ", - } - - _, err := ms.MigrateUEA(ctx, msg) - require.ErrorContains(t, err, "invalid signature format") - - }) -} diff --git a/test/integration/uexecutor/mint_pc_test.go b/test/integration/uexecutor/mint_pc_test.go deleted file mode 100644 index 52fd5d21..00000000 --- a/test/integration/uexecutor/mint_pc_test.go +++ /dev/null @@ -1,123 +0,0 @@ -package integrationtest - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/test/utils" - uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" - uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" - "github.com/stretchr/testify/require" -) - -func TestMintPC(t *testing.T) { - app, ctx, _ := utils.SetAppWithValidators(t) - chainConfigTest := uregistrytypes.ChainConfig{ - Chain: "eip155:11155111", - VmType: uregistrytypes.VmType_EVM, - PublicRpcUrl: "https://sepolia.drpc.org", - GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", - BlockConfirmation: &uregistrytypes.BlockConfirmation{ - FastInbound: 5, - StandardInbound: 12, - }, - GatewayMethods: []*uregistrytypes.GatewayMethods{&uregistrytypes.GatewayMethods{ - Name: "addFunds", - Identifier: "", - EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", - }}, - Enabled: &uregistrytypes.ChainEnabled{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - }, - } - - app.UregistryKeeper.AddChainConfig(ctx, &chainConfigTest) - ms := uexecutorkeeper.NewMsgServerImpl(app.UexecutorKeeper) - - t.Run("Success", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - ethAddr := common.HexToAddress("0x8669BeD121FefA3d9CF2821273f489e717cca95d") - cosmosAddr := sdk.AccAddress(ethAddr.Bytes()) - - beforeMinting := app.BankKeeper.GetBalance(ctx, cosmosAddr, "upc") - - validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - msg := &uexecutortypes.MsgMintPC{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := ms.MintPC(ctx, msg) - require.NoError(t, err) - afterMining := app.BankKeeper.GetBalance(ctx, cosmosAddr, "upc") - require.True(t, afterMining.Amount.GT(beforeMinting.Amount), "after balance should be greater than before balance") - - }) - - t.Run("Tokens Already Minted!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - msg := &uexecutortypes.MsgMintPC{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := ms.MintPC(ctx, msg) - require.ErrorContains(t, err, "evm tx verification failed: tokens already minted for txHash 0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2 on chain eip155:11155111") - - }) - t.Run("Invalid Signer!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0x59d9c4b86fb9cf62bc857bc9c0463f3bfd11ca6ec00b7e7021db1f660908bdbf" - - msg := &uexecutortypes.MsgMintPC{ - Signer: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := ms.MintPC(ctx, msg) - require.ErrorContains(t, err, "contract call failed") - - }) - - t.Run("fail: Invalid TxHash", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - validTxHash := "0xabc123" - msg := &uexecutortypes.MsgMintPC{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := ms.MintPC(ctx, msg) - require.ErrorContains(t, err, "rpc call failed after retries") - }) - -} diff --git a/utils/rpc/client.go b/utils/rpc/client.go deleted file mode 100644 index 7eb36ca5..00000000 --- a/utils/rpc/client.go +++ /dev/null @@ -1,138 +0,0 @@ -package rpc - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "sync" - "time" -) - -type Client struct { - httpClient *http.Client -} - -type RpcCallConfig struct { - PrivateRPC string - PublicRPC string -} - -const ( - defaultRetryCount = 3 - fallbackRetryCount = 1 -) - -var ( - clientInstance *Client - once sync.Once -) - -// getClient returns a singleton RPC client instance -func GetClient() *Client { - once.Do(func() { - transport := &http.Transport{ - MaxIdleConns: 100, - MaxIdleConnsPerHost: 10, - MaxConnsPerHost: 20, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - } - clientInstance = &Client{ - httpClient: &http.Client{ - Timeout: 10 * time.Second, - Transport: transport, - }, - } - }) - return clientInstance -} - -// Call performs a JSON-RPC call with retry logic (3 retries). -func (c *Client) Call(ctx context.Context, url, method string, params interface{}, result interface{}) error { - return c.callWithRetry(ctx, url, method, params, result, defaultRetryCount) -} - -// CallWithFallback tries the private RPC (with retries), then public RPC (once) if private fails. -func (c *Client) CallWithFallback(ctx context.Context, primaryURL, fallbackURL, method string, params interface{}, result interface{}) error { - // First try private RPC with retries - err := c.callWithRetry(ctx, primaryURL, method, params, result, defaultRetryCount) - if err == nil { - return nil - } - - // Fallback: Try public RPC only once - return c.callWithRetry(ctx, fallbackURL, method, params, result, fallbackRetryCount) -} - -// callWithRetry performs a JSON-RPC call with retry logic. -func (c *Client) callWithRetry(ctx context.Context, url, method string, params interface{}, result interface{}, maxRetries int) error { - reqBody := map[string]interface{}{ - "jsonrpc": "2.0", - "method": method, - "params": params, - "id": 1, - } - - bodyBytes, err := json.Marshal(reqBody) - if err != nil { - return fmt.Errorf("failed to marshal request: %w", err) - } - - var respBytes []byte - backoff := 500 * time.Millisecond - - for attempt := 0; attempt < maxRetries; attempt++ { - if attempt > 0 { - select { - case <-ctx.Done(): - return ctx.Err() - case <-time.After(backoff): - backoff *= 2 - } - } - - req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewReader(bodyBytes)) - if err != nil { - return fmt.Errorf("failed to create request: %w", err) - } - req.Header.Set("Content-Type", "application/json") - - resp, err := c.httpClient.Do(req) - if err != nil { - continue - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - _, _ = io.ReadAll(resp.Body) - continue - } - - respBytes, err = io.ReadAll(io.LimitReader(resp.Body, 10*1024*1024)) - if err != nil { - return fmt.Errorf("failed to read response: %w", err) - } - - var rpcErr struct { - Error *struct { - Code int `json:"code"` - Message string `json:"message"` - } `json:"error"` - } - if err := json.Unmarshal(respBytes, &rpcErr); err == nil && rpcErr.Error != nil { - continue - } - - if err := json.Unmarshal(respBytes, &struct { - Result interface{} `json:"result"` - }{Result: result}); err != nil { - return fmt.Errorf("failed to unmarshal result: %w", err) - } - return nil - } - - return fmt.Errorf("rpc call failed after retries") -} diff --git a/utils/rpc/evm/calls.go b/utils/rpc/evm/calls.go deleted file mode 100644 index e173eaa1..00000000 --- a/utils/rpc/evm/calls.go +++ /dev/null @@ -1,63 +0,0 @@ -package rpc - -import ( - "context" - "fmt" - - rpc "github.com/pushchain/push-chain-node/utils/rpc" -) - -// EVMGetTransactionByHash fetches tx info -func EVMGetTransactionByHash(ctx context.Context, cfg rpc.RpcCallConfig, txHash string) (*Transaction, error) { - client := rpc.GetClient() - - var result Transaction - var err error - if cfg.PrivateRPC != "" { - err = client.CallWithFallback(ctx, cfg.PrivateRPC, cfg.PublicRPC, "eth_getTransactionByHash", []interface{}{txHash}, &result) - } else { - err = client.Call(ctx, cfg.PublicRPC, "eth_getTransactionByHash", []interface{}{txHash}, &result) - } - - if err != nil { - return nil, fmt.Errorf("eth_getTransactionByHash failed: %w", err) - } - return &result, nil -} - -// EVMGetTransactionReceipt fetches receipt + logs -func EVMGetTransactionReceipt(ctx context.Context, cfg rpc.RpcCallConfig, txHash string) (*TransactionReceipt, error) { - client := rpc.GetClient() - - var result TransactionReceipt - var err error - if cfg.PrivateRPC != "" { - err = client.CallWithFallback(ctx, cfg.PrivateRPC, cfg.PublicRPC, "eth_getTransactionReceipt", []interface{}{txHash}, &result) - } else { - err = client.Call(ctx, cfg.PublicRPC, "eth_getTransactionReceipt", []interface{}{txHash}, &result) - } - - if err != nil { - fmt.Println("Error calling eth_getTransactionByHash:", err) - return nil, fmt.Errorf("eth_getTransactionReceipt failed: %w", err) - } - return &result, nil -} - -// EVMGetBlockByNumber fetches block details -func EVMGetBlockByNumber(ctx context.Context, cfg rpc.RpcCallConfig, blockNumber string, fullTx bool) (*Block, error) { - client := rpc.GetClient() - - var result Block - var err error - if cfg.PrivateRPC != "" { - err = client.CallWithFallback(ctx, cfg.PrivateRPC, cfg.PublicRPC, "eth_getBlockByNumber", []interface{}{blockNumber, fullTx}, &result) - } else { - err = client.Call(ctx, cfg.PublicRPC, "eth_getBlockByNumber", []interface{}{blockNumber, fullTx}, &result) - } - - if err != nil { - return nil, fmt.Errorf("eth_getBlockByNumber failed: %w", err) - } - return &result, nil -} diff --git a/utils/rpc/evm/types.go b/utils/rpc/evm/types.go deleted file mode 100644 index 71b15fb4..00000000 --- a/utils/rpc/evm/types.go +++ /dev/null @@ -1,43 +0,0 @@ -package rpc - -// Transaction represents a basic EVM transaction response from eth_getTransactionByHash -type Transaction struct { - BlockHash string `json:"blockHash"` - BlockNumber string `json:"blockNumber"` - From string `json:"from"` - Gas string `json:"gas"` - GasPrice string `json:"gasPrice"` - Hash string `json:"hash"` - Input string `json:"input"` - Nonce string `json:"nonce"` - To string `json:"to"` - TransactionIndex string `json:"transactionIndex"` - Value string `json:"value"` - V string `json:"v"` - R string `json:"r"` - S string `json:"s"` -} - -// TransactionReceipt represents eth_getTransactionReceipt result -type TransactionReceipt struct { - TransactionHash string `json:"transactionHash"` - TransactionIndex string `json:"transactionIndex"` - BlockHash string `json:"blockHash"` - BlockNumber string `json:"blockNumber"` - From string `json:"from"` - To string `json:"to"` - CumulativeGasUsed string `json:"cumulativeGasUsed"` - GasUsed string `json:"gasUsed"` - ContractAddress string `json:"contractAddress"` - Logs []interface{} `json:"logs"` // can define `Log` struct if needed - Status string `json:"status"` -} - -// Block represents eth_getBlockByNumber response - -type Block struct { - Number string `json:"number"` - Hash string `json:"hash"` - Timestamp string `json:"timestamp"` - Transactions []interface{} `json:"transactions"` // list of tx hashes or full txs depending on fullTx flag -} diff --git a/utils/rpc/svm/calls.go b/utils/rpc/svm/calls.go deleted file mode 100644 index 88962865..00000000 --- a/utils/rpc/svm/calls.go +++ /dev/null @@ -1,53 +0,0 @@ -package rpc - -import ( - "context" - "fmt" - - rpc "github.com/pushchain/push-chain-node/utils/rpc" -) - -// GetTransaction fetches transaction details using getTransaction RPC method -func SVMGetTransactionBySig(ctx context.Context, cfg rpc.RpcCallConfig, txHash string) (*Transaction, error) { - client := rpc.GetClient() - - var result Transaction - params := []interface{}{ - txHash, - map[string]interface{}{ - "commitment": "confirmed", - "maxSupportedTransactionVersion": 0, - "encoding": "json", - }, - } - - var err error - if cfg.PrivateRPC != "" { - err = client.CallWithFallback(ctx, cfg.PrivateRPC, cfg.PublicRPC, "getTransaction", params, &result) - } else { - err = client.Call(ctx, cfg.PublicRPC, "getTransaction", params, &result) - } - - if err != nil { - return nil, fmt.Errorf("getTransaction failed: %w", err) - } - return &result, nil -} - -// GetSlot fetches current slot using getSlot RPC method -func SVMGetCurrentSlot(ctx context.Context, cfg rpc.RpcCallConfig) (uint64, error) { - client := rpc.GetClient() - - var result Slot - var err error - if cfg.PrivateRPC != "" { - err = client.CallWithFallback(ctx, cfg.PrivateRPC, cfg.PublicRPC, "getSlot", nil, &result) - } else { - err = client.Call(ctx, cfg.PublicRPC, "getSlot", nil, &result) - } - - if err != nil { - return 0, fmt.Errorf("getSlot failed: %w", err) - } - return uint64(result), nil -} diff --git a/utils/rpc/svm/types.go b/utils/rpc/svm/types.go deleted file mode 100644 index fedea44d..00000000 --- a/utils/rpc/svm/types.go +++ /dev/null @@ -1,26 +0,0 @@ -package rpc - -// Transaction represents a Solana transaction response from getTransaction -type Transaction struct { - Slot uint64 `json:"slot"` - Transaction struct { - Message struct { - AccountKeys []string `json:"accountKeys"` - Instructions []Instruction `json:"instructions"` - } `json:"message"` - } `json:"transaction"` - Meta struct { - Err interface{} `json:"err"` - LogMessages []string `json:"logMessages"` - } `json:"meta"` -} - -// Slot represents a Solana slot response from getSlot -type Slot uint64 - -// Inside the svmrpc package -type Instruction struct { - ProgramIDIndex int `json:"programIdIndex"` - Accounts []int `json:"accounts"` - Data string `json:"data"` -} diff --git a/x/uexecutor/autocli.go b/x/uexecutor/autocli.go index 3c9ed76a..70cfb15b 100755 --- a/x/uexecutor/autocli.go +++ b/x/uexecutor/autocli.go @@ -25,14 +25,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "UpdateParams", Skip: false, // set to true if authority gated (to hide from cli) }, - { - RpcMethod: "DeployUEA", - Use: "deploy-uea --universal-account [universal-account] --tx-hash [tx-hash]", - }, - { - RpcMethod: "MintPC", - Use: "mint-pc --universal-account [universal-account] --tx-hash [tx-hash]", - }, { RpcMethod: "ExecutePayload", Use: "execute-payload --universal-account [universal-account] --universal-payload [universal-payload]", diff --git a/x/uexecutor/keeper/msg_deploy_uea.go b/x/uexecutor/keeper/msg_deploy_uea.go index bd12d082..60d22d39 100644 --- a/x/uexecutor/keeper/msg_deploy_uea.go +++ b/x/uexecutor/keeper/msg_deploy_uea.go @@ -4,25 +4,18 @@ import ( "context" "fmt" - "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/x/uexecutor/types" ) // updateParams is for updating params collections of the module -func (k Keeper) DeployUEA(ctx context.Context, evmFrom common.Address, universalAccountId *types.UniversalAccountId, txHash string) ([]byte, error) { +func (k Keeper) DeployUEA(ctx context.Context, evmFrom common.Address, universalAccountId *types.UniversalAccountId) ([]byte, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) // EVM Call arguments factoryAddress := common.HexToAddress(types.FACTORY_PROXY_ADDRESS_HEX) - // RPC call verification to verify the gateway interaction tx on source chain - err := k.utxverifierKeeper.VerifyGatewayInteractionTx(ctx, universalAccountId.Owner, txHash, universalAccountId.GetCAIP2()) - if err != nil { - return nil, errors.Wrapf(err, "failed to verify gateway interaction transaction") - } - // Use your keeper CallEVM directly receipt, err := k.CallFactoryToDeployUEA( sdkCtx, diff --git a/x/uexecutor/keeper/msg_mint_pc.go b/x/uexecutor/keeper/msg_mint_pc.go deleted file mode 100644 index 651a437f..00000000 --- a/x/uexecutor/keeper/msg_mint_pc.go +++ /dev/null @@ -1,147 +0,0 @@ -package keeper - -import ( - "context" - "math/big" - "strconv" - - "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - vmtypes "github.com/cosmos/evm/x/vm/types" - "github.com/ethereum/go-ethereum/common" - ethtypes "github.com/ethereum/go-ethereum/core/types" - pchaintypes "github.com/pushchain/push-chain-node/types" - "github.com/pushchain/push-chain-node/utils" - "github.com/pushchain/push-chain-node/x/uexecutor/types" -) - -// updateParams is for updating params collections of the module -func (k Keeper) MintPC(ctx context.Context, evmFrom common.Address, universalAccountId *types.UniversalAccountId, txHash string) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - factoryAddress := common.HexToAddress(types.FACTORY_PROXY_ADDRESS_HEX) - - // RPC call verification to get amount to be mint - amountOfUsdLocked, usdDecimals, err := k.utxverifierKeeper.VerifyAndGetLockedFunds(ctx, universalAccountId.Owner, txHash, universalAccountId.GetCAIP2()) - if err != nil { - return errors.Wrapf(err, "failed to verify gateway interaction transaction") - } - amountToMint := ConvertUsdToPCTokens(&amountOfUsdLocked, usdDecimals) - - // TODO: temporarily - // Cap the mint amount at a maximum of 10 * 10^18 (10 PC) - maxMint := sdkmath.NewIntFromBigInt( - new(big.Int).Mul(big.NewInt(10), new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)), - ) - - if amountToMint.GT(maxMint) { - amountToMint = maxMint - } - - // Calling factory contract to compute the UEA address - ueaAddress, _, err := k.CallFactoryToGetUEAAddressForOrigin(sdkCtx, evmFrom, factoryAddress, universalAccountId) - if err != nil { - return err - } - - // Convert the computed address to a Cosmos address - cosmosAddr, err := utils.ConvertAnyAddressToBytes(ueaAddress.Hex()) - - if err != nil { - return errors.Wrapf(err, "failed to convert EVM address to Cosmos address") - } - - err = k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(pchaintypes.BaseDenom, amountToMint))) - if err != nil { - return errors.Wrapf(err, "failed to mint coins") - } - - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, cosmosAddr, sdk.NewCoins(sdk.NewCoin(pchaintypes.BaseDenom, amountToMint))) - if err != nil { - return errors.Wrapf(err, "failed to send coins from module to account") - } - - // Emit derived EVM tx events to simulate an EVM-style mint transaction - // from the module to the computed UEA address, for indexing and RPC compatibility. - k.DerivedMintPCEvmTx(sdkCtx, ueaAddress, amountToMint.BigInt()) - - return nil -} - -// ConvertUsdToPCTokens converts locked USD amount (in wei) to PC tokens (with 18 decimals) -func ConvertUsdToPCTokens(usdAmount *big.Int, usdDecimals uint32) sdkmath.Int { - // Multiply usdAmount by PC token's conversion rate (10) - multiplied := new(big.Int).Mul(usdAmount, big.NewInt(10)) - - // Scale to 18 decimals (PC token), accounting for usdDecimals - scaleFactor := new(big.Int).Exp(big.NewInt(10), big.NewInt(int64(18-usdDecimals)), nil) - pcTokens := new(big.Int).Mul(multiplied, scaleFactor) - - return sdkmath.NewIntFromBigInt(pcTokens) -} - -func (k Keeper) DerivedMintPCEvmTx(ctx context.Context, toAddr common.Address, amount *big.Int) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - - uexecutormoduleAcc := k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) // "uexecutor" - uexecutormoduleAddr := uexecutormoduleAcc.GetAddress() - var ethSenderAddr common.Address - copy(ethSenderAddr[:], uexecutormoduleAddr.Bytes()) - - msg := ethtypes.NewMessage( - ethSenderAddr, // from - &toAddr, // to - 0, // nonce - amount, // amount - 0, // gasLimit - big.NewInt(0), // gasPrice - big.NewInt(0), // gasFeeCap - big.NewInt(0), // gasTipCap - nil, // data - ethtypes.AccessList{}, // AccessList - true, // isFake - ) - tx := ethtypes.NewTx(ðtypes.DynamicFeeTx{ - Nonce: msg.Nonce(), - GasFeeCap: msg.GasFeeCap(), - GasTipCap: msg.GasTipCap(), - Gas: msg.Gas(), - To: msg.To(), - Value: msg.Value(), - Data: msg.Data(), - }) - ethTxHash := tx.Hash() - attrs := []sdk.Attribute{} - attrs = append(attrs, []sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyAmount, amount.String()), - // add event for ethereum transaction hash format; - sdk.NewAttribute(vmtypes.AttributeKeyEthereumTxHash, ethTxHash.String()), - // add event for index of valid ethereum tx; NOTE: default txindex for derivedTx - sdk.NewAttribute(vmtypes.AttributeKeyTxIndex, strconv.FormatUint(vmtypes.DerivedTxIndex, 10)), - // add event for eth tx gas used, we can't get it from cosmos tx result when it contains multiple eth tx msgs. - sdk.NewAttribute(vmtypes.AttributeKeyTxGasUsed, "0"), - // add event for recipient address in evm format; - sdk.NewAttribute(vmtypes.AttributeKeyRecipient, toAddr.Hex()), - }...) - - // adding nonce for more info in rpc methods in order to parse derived txs - attrs = append(attrs, sdk.NewAttribute(vmtypes.AttributeKeyTxNonce, "0")) - sdkCtx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - vmtypes.EventTypeEthereumTx, - attrs..., - ), - sdk.NewEvent( - vmtypes.EventTypeTxLog, - sdk.NewAttribute(vmtypes.AttributeKeyTxLog, ""), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, vmtypes.ModuleName), - sdk.NewAttribute(sdk.AttributeKeySender, ethSenderAddr.Hex()), - sdk.NewAttribute(vmtypes.AttributeKeyTxType, strconv.FormatUint(vmtypes.DerivedTxType, 10)), - ), - }) -} diff --git a/x/uexecutor/keeper/msg_server.go b/x/uexecutor/keeper/msg_server.go index 1770dfc7..7b7eb7e6 100755 --- a/x/uexecutor/keeper/msg_server.go +++ b/x/uexecutor/keeper/msg_server.go @@ -37,38 +37,6 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams return &types.MsgUpdateParamsResponse{}, nil } -// DeployUEA handles the deployment of new Smart Account (UEA). -func (ms msgServer) DeployUEA(ctx context.Context, msg *types.MsgDeployUEA) (*types.MsgDeployUEAResponse, error) { - _, evmFromAddress, err := utils.GetAddressPair(msg.Signer) - if err != nil { - return nil, errors.Wrapf(err, "failed to parse signer address") - } - - sa, err := ms.k.DeployUEA(ctx, evmFromAddress, msg.UniversalAccountId, msg.TxHash) - if err != nil { - return nil, err - } - - return &types.MsgDeployUEAResponse{ - UEA: sa, - }, nil -} - -// MintPC handles token minting to the user's UEA for the tokens locked on source chain. -func (ms msgServer) MintPC(ctx context.Context, msg *types.MsgMintPC) (*types.MsgMintPCResponse, error) { - _, evmFromAddress, err := utils.GetAddressPair(msg.Signer) - if err != nil { - return nil, errors.Wrapf(err, "failed to parse signer address") - } - - err = ms.k.MintPC(ctx, evmFromAddress, msg.UniversalAccountId, msg.TxHash) - if err != nil { - return nil, err - } - - return &types.MsgMintPCResponse{}, nil -} - // ExecutePayload handles universal payload execution on the UEA. func (ms msgServer) ExecutePayload(ctx context.Context, msg *types.MsgExecutePayload) (*types.MsgExecutePayloadResponse, error) { _, evmFromAddress, err := utils.GetAddressPair(msg.Signer) diff --git a/x/uexecutor/keeper/msg_server_test.go b/x/uexecutor/keeper/msg_server_test.go index db148903..9dd1941d 100755 --- a/x/uexecutor/keeper/msg_server_test.go +++ b/x/uexecutor/keeper/msg_server_test.go @@ -2,20 +2,12 @@ package keeper_test import ( "errors" - "math/big" "testing" - evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ethereum/go-ethereum/common" - pchaintypes "github.com/pushchain/push-chain-node/types" - "github.com/pushchain/push-chain-node/utils" - uekeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" "github.com/pushchain/push-chain-node/x/uexecutor/types" ue "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" @@ -67,267 +59,6 @@ func TestParams(t *testing.T) { } } -func TestMsgServer_DeployUEA(t *testing.T) { - f := SetupTest(t) - require := require.New(t) - - validSigner := f.addrs[0] - validUA := &types.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x000000000000000000000000000000000000dead", - } - validTxHash := "0xabc123" - - t.Run("fail; invalid signer address", func(t *testing.T) { - msg := &types.MsgDeployUEA{ - Signer: "invalid_address", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err := f.msgServer.DeployUEA(f.ctx, msg) - require.ErrorContains(err, "failed to parse signer address") - }) - - t.Run("fail; gateway interaction tx not verified", func(t *testing.T) { - // You can inject failure in f.app or f.k.utvKeeper if mockable - msg := &types.MsgDeployUEA{ - Signer: validSigner.String(), - UniversalAccountId: validUA, - TxHash: "invalid_tx", - } - f.mockUTVKeeper. - EXPECT().VerifyGatewayInteractionTx(gomock.Any(), validUA.Owner, "invalid_tx", validUA.GetCAIP2()). - Return(errors.New("Gateway interaction failed")) - - _, err := f.msgServer.DeployUEA(f.ctx, msg) - require.ErrorContains(err, "failed to verify gateway interaction transaction") - }) - - t.Run("fail: CallFactoryToDeployUEA Fails", func(t *testing.T) { - msg := &types.MsgDeployUEA{ - Signer: validSigner.String(), - UniversalAccountId: validUA, - TxHash: validTxHash, - } - addr := common.HexToAddress("0x1234567890abcdef1234567890abcdef12345678") - - padded := common.LeftPadBytes(addr.Bytes(), 64) - receipt := &evmtypes.MsgEthereumTxResponse{ - Ret: padded, - } - f.mockUTVKeeper. - EXPECT().VerifyGatewayInteractionTx(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(nil) - - f.mockEVMKeeper.EXPECT(). - DerivedEVMCall(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1). - Return(receipt, errors.New("unable to deploy UEA")) - _, err := f.msgServer.DeployUEA(f.ctx, msg) - require.ErrorContains(err, "unable to deploy UEA") - }) - - t.Run("success; valid input returns UEA", func(t *testing.T) { - msg := &types.MsgDeployUEA{ - Signer: validSigner.String(), - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - addr := common.HexToAddress("0x1234567890abcdef1234567890abcdef12345678") - - padded := common.LeftPadBytes(addr.Bytes(), 64) - receipt := &evmtypes.MsgEthereumTxResponse{ - Ret: padded, - } - f.mockUTVKeeper. - EXPECT().VerifyGatewayInteractionTx(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(nil) - - f.mockEVMKeeper.EXPECT(). - DerivedEVMCall(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Times(1). - Return(receipt, nil) - - _, err := f.msgServer.DeployUEA(f.ctx, msg) - require.NoError(err) - }) -} - -func TestMsgServer_MintPC(t *testing.T) { - f := SetupTest(t) - - validSigner := f.addrs[0] - validUA := &types.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x000000000000000000000000000000000000dead", - } - validTxHash := "0xabc123" - - t.Run("fail: VerifyAndGetLockedFunds fails", func(t *testing.T) { - msg := &types.MsgMintPC{ - Signer: validSigner.String(), - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - f.mockUTVKeeper.EXPECT(). - VerifyAndGetLockedFunds(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(*big.NewInt(0), uint32(0), errors.New("some error")) - - _, err := f.msgServer.MintPC(f.ctx, msg) - require.ErrorContains(t, err, "failed to verify gateway interaction transaction") - }) - - t.Run("fail: CallFactoryToComputeUEAAddress returns error", func(t *testing.T) { - usdAmount := new(big.Int) - usdAmount.SetString("10000000000000000000", 10) - decimals := uint32(18) - - addr := common.HexToAddress("0x1234567890abcdef1234567890abcdef12345678") - - padded := common.LeftPadBytes(addr.Bytes(), 64) // Incorrect 40 bytes padding to initiate the error - receipt := &evmtypes.MsgEthereumTxResponse{ - Ret: padded, - } - - f.mockUTVKeeper.EXPECT(). - VerifyAndGetLockedFunds(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(*usdAmount, decimals, nil) - - f.mockEVMKeeper.EXPECT(). - CallEVM(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). - Return(receipt, errors.New("call-factory fails")) - - msg := &types.MsgMintPC{ - Signer: validSigner.String(), UniversalAccountId: validUA, TxHash: validTxHash, - } - _, err := f.msgServer.MintPC(f.ctx, msg) - require.ErrorContains(t, err, "call-factory fails") - }) - - t.Run("bad-address", func(t *testing.T) { - usdAmount := new(big.Int) - usdAmount.SetString("10000000000000000000", 10) - decimals := uint32(18) - - addr := common.HexToAddress("0x1234567890abcdef1234567890abcdef12345678") - - padded := common.LeftPadBytes(addr.Bytes(), 40) // Incorrect 40 bytes padding to initiate the error - receipt := &evmtypes.MsgEthereumTxResponse{ - Ret: padded, - } - - f.mockUTVKeeper.EXPECT(). - VerifyAndGetLockedFunds(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(*usdAmount, decimals, nil) - - f.mockEVMKeeper.EXPECT(). - CallEVM(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). - Return(receipt, nil) - - msg := &types.MsgMintPC{ - Signer: validSigner.String(), UniversalAccountId: validUA, TxHash: validTxHash, - } - _, err := f.msgServer.MintPC(f.ctx, msg) - require.ErrorContains(t, err, "length insufficient 40 require 64") - }) - - t.Run("fail: Mint Fails", func(t *testing.T) { - msg := &types.MsgMintPC{ - Signer: validSigner.String(), - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - addr := common.HexToAddress("0x1234567890abcdef1234567890abcdef12345678") - - // Create a 64-byte buffer (two 32-byte words). - padded := make([]byte, 64) - - // Put the address into the first 32-byte word, left-padded. - copy(padded[32-len(addr.Bytes()):32], addr.Bytes()) - - receipt := &evmtypes.MsgEthereumTxResponse{ - Ret: padded, - } - - usdAmount := new(big.Int) - usdAmount.SetString("1000000000000000000", 10) // 10 USD, 18 decimals - decimals := uint32(18) - amountToMint := uekeeper.ConvertUsdToPCTokens(usdAmount, decimals) - expectedCoins := sdk.NewCoins(sdk.NewCoin(pchaintypes.BaseDenom, amountToMint)) - - // Mock VerifyAndGetLockedFunds - f.mockUTVKeeper.EXPECT(). - VerifyAndGetLockedFunds(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(*big.NewInt(1_000_000), uint32(6), nil) - - f.mockEVMKeeper.EXPECT(). - CallEVM(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). - Return(receipt, nil) - - // MintCoins should be called with correct args - f.mockBankKeeper.EXPECT(). - MintCoins(gomock.Any(), types.ModuleName, expectedCoins). - Return(errors.New("minting failed")) - - _, err := f.msgServer.MintPC(f.ctx, msg) - require.ErrorContains(t, err, "failed to mint coins") - }) - - t.Run("success", func(t *testing.T) { - msg := &types.MsgMintPC{ - Signer: validSigner.String(), - UniversalAccountId: validUA, - TxHash: validTxHash, - } - addr := common.HexToAddress("0x8669BED121FEFA3D9CF282127384F489E717CC95") - - // Create a 64-byte buffer (two 32-byte words). - padded := make([]byte, 64) - - // Put the address into the first 32-byte word, left-padded. - copy(padded[32-len(addr.Bytes()):32], addr.Bytes()) - - receipt := &evmtypes.MsgEthereumTxResponse{ - Ret: padded, - } - - usdAmount := new(big.Int) - usdAmount.SetString("1000000000000000000", 10) // 10 USD, 18 decimals - decimals := uint32(18) - amountToMint := uekeeper.ConvertUsdToPCTokens(usdAmount, decimals) - expectedCoins := sdk.NewCoins(sdk.NewCoin(pchaintypes.BaseDenom, amountToMint)) - - // Mock VerifyAndGetLockedFunds - f.mockUTVKeeper.EXPECT(). - VerifyAndGetLockedFunds(gomock.Any(), validUA.Owner, validTxHash, validUA.GetCAIP2()). - Return(*big.NewInt(1_000_000), uint32(6), nil) - - f.mockEVMKeeper.EXPECT(). - CallEVM(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()). - Return(receipt, nil) - - // MintCoins should be called with correct args - f.mockBankKeeper.EXPECT(). - MintCoins(gomock.Any(), types.ModuleName, expectedCoins). - Return(nil) - - // Expected Cosmos address from UEA address (derived from validUA.Owner) - expectedAddr, err := utils.ConvertAnyAddressToBytes(addr.String()) - require.NoError(t, err) - - f.mockBankKeeper.EXPECT(). - SendCoinsFromModuleToAccount(gomock.Any(), types.ModuleName, sdk.AccAddress(expectedAddr), expectedCoins). - Return(errors.New("SendCoinFromModuleToAccount fails")) - - _, err = f.msgServer.MintPC(f.ctx, msg) - require.ErrorContains(t, err, "failed to send coins from module to account") - }) -} - func TestMsgServer_ExecutePayload(t *testing.T) { f := SetupTest(t) diff --git a/x/uexecutor/mocks/mock_utvkeeper.go b/x/uexecutor/mocks/mock_utvkeeper.go index a87ad766..31cefef3 100644 --- a/x/uexecutor/mocks/mock_utvkeeper.go +++ b/x/uexecutor/mocks/mock_utvkeeper.go @@ -6,7 +6,6 @@ package mocks import ( context "context" - big "math/big" reflect "reflect" gomock "github.com/golang/mock/gomock" @@ -49,33 +48,3 @@ func (mr *MockUtxverifierKeeperMockRecorder) StoreVerifiedInboundTx(ctx, chain, mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreVerifiedInboundTx", reflect.TypeOf((*MockUtxverifierKeeper)(nil).StoreVerifiedInboundTx), ctx, chain, txHash, verifiedTxMetadata) } - -// VerifyAndGetLockedFunds mocks base method. -func (m *MockUtxverifierKeeper) VerifyAndGetLockedFunds(ctx context.Context, ownerKey, txHash, chainId string) (big.Int, uint32, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyAndGetLockedFunds", ctx, ownerKey, txHash, chainId) - ret0, _ := ret[0].(big.Int) - ret1, _ := ret[1].(uint32) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// VerifyAndGetLockedFunds indicates an expected call of VerifyAndGetLockedFunds. -func (mr *MockUtxverifierKeeperMockRecorder) VerifyAndGetLockedFunds(ctx, ownerKey, txHash, chainId interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyAndGetLockedFunds", reflect.TypeOf((*MockUtxverifierKeeper)(nil).VerifyAndGetLockedFunds), ctx, ownerKey, txHash, chainId) -} - -// VerifyGatewayInteractionTx mocks base method. -func (m *MockUtxverifierKeeper) VerifyGatewayInteractionTx(ctx context.Context, ownerKey, txHash, chainId string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyGatewayInteractionTx", ctx, ownerKey, txHash, chainId) - ret0, _ := ret[0].(error) - return ret0 -} - -// VerifyGatewayInteractionTx indicates an expected call of VerifyGatewayInteractionTx. -func (mr *MockUtxverifierKeeperMockRecorder) VerifyGatewayInteractionTx(ctx, ownerKey, txHash, chainId interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyGatewayInteractionTx", reflect.TypeOf((*MockUtxverifierKeeper)(nil).VerifyGatewayInteractionTx), ctx, ownerKey, txHash, chainId) -} diff --git a/x/uexecutor/types/codec.go b/x/uexecutor/types/codec.go index 6fc793b3..56166b7b 100755 --- a/x/uexecutor/types/codec.go +++ b/x/uexecutor/types/codec.go @@ -22,8 +22,6 @@ func init() { // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateParams{}, ModuleName+"/MsgUpdateParams", nil) - cdc.RegisterConcrete(&MsgDeployUEA{}, ModuleName+"/MsgDeployUEAResponse", nil) - cdc.RegisterConcrete(&MsgMintPC{}, ModuleName+"/MsgMintPC", nil) cdc.RegisterConcrete(&MsgExecutePayload{}, ModuleName+"/MsgExecutePayload", nil) cdc.RegisterConcrete(&MsgVoteInbound{}, ModuleName+"/MsgVoteInbound", nil) } @@ -33,8 +31,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, - &MsgDeployUEAResponse{}, - &MsgMintPC{}, &MsgExecutePayload{}, &MsgVoteInbound{}, ) diff --git a/x/uexecutor/types/expected_keepers.go b/x/uexecutor/types/expected_keepers.go index 1346328f..9e50f9ba 100644 --- a/x/uexecutor/types/expected_keepers.go +++ b/x/uexecutor/types/expected_keepers.go @@ -90,8 +90,6 @@ type AccountKeeper interface { // UtxverifierKeeper defines the expected interface for the UtxverifierKeeper moduledule. type UtxverifierKeeper interface { - VerifyGatewayInteractionTx(ctx context.Context, ownerKey, txHash, chain string) error - VerifyAndGetLockedFunds(ctx context.Context, ownerKey, txHash, chain string) (big.Int, uint32, error) StoreVerifiedInboundTx(ctx context.Context, chain, txHash string, verifiedTxMetadata utxverifiertypes.VerifiedTxMetadata) error } diff --git a/x/uexecutor/types/msg_deploy_uea.go b/x/uexecutor/types/msg_deploy_uea.go deleted file mode 100644 index 6a4ed916..00000000 --- a/x/uexecutor/types/msg_deploy_uea.go +++ /dev/null @@ -1,61 +0,0 @@ -package types - -import ( - "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -var ( - _ sdk.Msg = &MsgDeployUEA{} -) - -// NewMsgDeployUEA creates new instance of MsgDeployUEA -func NewMsgDeployUEA( - sender sdk.Address, - universalAccountId *UniversalAccountId, - txHash string, -) *MsgDeployUEA { - return &MsgDeployUEA{ - Signer: sender.String(), - UniversalAccountId: universalAccountId, - TxHash: txHash, - } -} - -// Route returns the name of the module -func (msg MsgDeployUEA) Route() string { return ModuleName } - -// Type returns the action -func (msg MsgDeployUEA) Type() string { return "deploy_uea" } - -// GetSignBytes implements the LegacyMsg interface. -func (msg MsgDeployUEA) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) -} - -// GetSigners returns the expected signers for a MsgDeployUEA message. -func (msg *MsgDeployUEA) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Signer) - return []sdk.AccAddress{addr} -} - -// ValidateBasic does a sanity check on the provided data. -func (msg *MsgDeployUEA) ValidateBasic() error { - // Validate signer - if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { - return errors.Wrap(err, "invalid signer address") - } - - // Validate universalAccountId - if msg.UniversalAccountId == nil { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "universalAccountId cannot be nil") - } - - // Validate txHash - if len(msg.TxHash) == 0 { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "txHash cannot be empty") - } - - return msg.UniversalAccountId.ValidateBasic() -} diff --git a/x/uexecutor/types/msg_deploy_uea_test.go b/x/uexecutor/types/msg_deploy_uea_test.go deleted file mode 100644 index 87916eb7..00000000 --- a/x/uexecutor/types/msg_deploy_uea_test.go +++ /dev/null @@ -1,94 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pushchain/push-chain-node/x/uexecutor/types" -) - -func TestMsgDeployUEA_ValidateBasic(t *testing.T) { - validSigner := "push1fgaewhyd9fkwtqaj9c233letwcuey6dgly9gv9" - invalidSigner := "invalid_bech32" - validUAcc := &types.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x000000000000000000000000000000000000dead", - } - invalidUAcc := &types.UniversalAccountId{ - ChainNamespace: "", - ChainId: "11155111", - Owner: "0xzzzzzzzz", - } - - tests := []struct { - name string - msg *types.MsgDeployUEA - expectError bool - errContains string - }{ - { - name: "valid message", - msg: types.NewMsgDeployUEA( - sdk.MustAccAddressFromBech32(validSigner), - validUAcc, - "0xabc123", - ), - expectError: false, - }, - { - name: "invalid signer format", - msg: &types.MsgDeployUEA{ - Signer: invalidSigner, - UniversalAccountId: validUAcc, - TxHash: "0xabc123", - }, - expectError: true, - errContains: "invalid signer address", - }, - { - name: "nil universal account", - msg: &types.MsgDeployUEA{ - Signer: validSigner, - UniversalAccountId: nil, - TxHash: "0xabc123", - }, - expectError: true, - errContains: "universalAccountId cannot be nil", - }, - { - name: "empty txHash", - msg: &types.MsgDeployUEA{ - Signer: validSigner, - UniversalAccountId: validUAcc, - TxHash: "", - }, - expectError: true, - errContains: "txHash cannot be empty", - }, - { - name: "invalid universal account", - msg: &types.MsgDeployUEA{ - Signer: validSigner, - UniversalAccountId: invalidUAcc, - TxHash: "0xabc123", - }, - expectError: true, - errContains: "chain namespace cannot be empty", // updated to reflect new validation - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - err := tc.msg.ValidateBasic() - if tc.expectError { - require.Error(t, err) - require.Contains(t, err.Error(), tc.errContains) - } else { - require.NoError(t, err) - } - }) - } -} diff --git a/x/uexecutor/types/msg_mint_pc.go b/x/uexecutor/types/msg_mint_pc.go deleted file mode 100644 index dce85ea9..00000000 --- a/x/uexecutor/types/msg_mint_pc.go +++ /dev/null @@ -1,61 +0,0 @@ -package types - -import ( - "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -var ( - _ sdk.Msg = &MsgMintPC{} -) - -// NewMsgMintPC creates new instance of MsgMintPC -func NewMsgMintPC( - sender sdk.Address, - universalAccountId *UniversalAccountId, - txHash string, -) *MsgMintPC { - return &MsgMintPC{ - Signer: sender.String(), - UniversalAccountId: universalAccountId, - TxHash: txHash, - } -} - -// Route returns the name of the module -func (msg MsgMintPC) Route() string { return ModuleName } - -// Type returns the action -func (msg MsgMintPC) Type() string { return "mint_pc" } - -// GetSignBytes implements the LegacyMsg interface. -func (msg MsgMintPC) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) -} - -// GetSigners returns the expected signers for a MsgMintPC message. -func (msg *MsgMintPC) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Signer) - return []sdk.AccAddress{addr} -} - -// ValidateBasic does a sanity check on the provided data. -func (msg *MsgMintPC) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { - return errors.Wrap(err, "invalid signer address") - } - - // Validate universalAccountId - if msg.UniversalAccountId == nil { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "universalAccountId cannot be nil") - } - - // Validate txHash - if len(msg.TxHash) == 0 { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "txHash cannot be empty") - } - - return msg.UniversalAccountId.ValidateBasic() -} diff --git a/x/uexecutor/types/msg_mint_pc_test.go b/x/uexecutor/types/msg_mint_pc_test.go deleted file mode 100644 index 71885182..00000000 --- a/x/uexecutor/types/msg_mint_pc_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/pushchain/push-chain-node/x/uexecutor/types" - "github.com/stretchr/testify/require" -) - -func TestMsgMintPC_ValidateBasic(t *testing.T) { - validSigner := "push1fgaewhyd9fkwtqaj9c233letwcuey6dgly9gv9" - invalidSigner := "not_bech32" - - validUAcc := &types.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x000000000000000000000000000000000000dead", - } - invalidUAcc := &types.UniversalAccountId{ - ChainNamespace: "", - ChainId: "11155111", - Owner: "0xzzzzzzzz", - } - - tests := []struct { - name string - msg *types.MsgMintPC - expectErr bool - }{ - { - name: "valid message", - msg: &types.MsgMintPC{ - Signer: validSigner, - UniversalAccountId: validUAcc, - TxHash: "0x123abc", - }, - expectErr: false, - }, - { - name: "invalid signer address", - msg: &types.MsgMintPC{ - Signer: invalidSigner, - UniversalAccountId: validUAcc, - TxHash: "0x123abc", - }, - expectErr: true, - }, - { - name: "nil universal account", - msg: &types.MsgMintPC{ - Signer: validSigner, - UniversalAccountId: nil, - TxHash: "0x123abc", - }, - expectErr: true, - }, - { - name: "invalid universal account", - msg: &types.MsgMintPC{ - Signer: validSigner, - UniversalAccountId: invalidUAcc, - TxHash: "0x123abc", - }, - expectErr: true, - }, - { - name: "empty tx hash", - msg: &types.MsgMintPC{ - Signer: validSigner, - UniversalAccountId: validUAcc, - TxHash: "", - }, - expectErr: true, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - err := tc.msg.ValidateBasic() - if tc.expectErr { - require.Error(t, err) - } else { - require.NoError(t, err) - } - }) - } -} diff --git a/x/uexecutor/types/tx.pb.go b/x/uexecutor/types/tx.pb.go index 3c0b969c..b5d55ede 100644 --- a/x/uexecutor/types/tx.pb.go +++ b/x/uexecutor/types/tx.pb.go @@ -130,218 +130,6 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgDeployUEA is the message used to deploy a new smart account. -type MsgDeployUEA struct { - // signer is the Cosmos address initiating the tx (used for tx signing) - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // universal_account_id is the identifier of the owner account - UniversalAccountId *UniversalAccountId `protobuf:"bytes,2,opt,name=universal_account_id,json=universalAccountId,proto3" json:"universal_account_id,omitempty"` - // tx_hash is the hash of the transaction in which user locked the tokens - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (m *MsgDeployUEA) Reset() { *m = MsgDeployUEA{} } -func (m *MsgDeployUEA) String() string { return proto.CompactTextString(m) } -func (*MsgDeployUEA) ProtoMessage() {} -func (*MsgDeployUEA) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{2} -} -func (m *MsgDeployUEA) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeployUEA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeployUEA.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 *MsgDeployUEA) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeployUEA.Merge(m, src) -} -func (m *MsgDeployUEA) XXX_Size() int { - return m.Size() -} -func (m *MsgDeployUEA) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeployUEA.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeployUEA proto.InternalMessageInfo - -func (m *MsgDeployUEA) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -func (m *MsgDeployUEA) GetUniversalAccountId() *UniversalAccountId { - if m != nil { - return m.UniversalAccountId - } - return nil -} - -func (m *MsgDeployUEA) GetTxHash() string { - if m != nil { - return m.TxHash - } - return "" -} - -// MsgDeployUEAResponse defines the response for MsgDeployUEA. -type MsgDeployUEAResponse struct { - // uea is the address of the newly deployed smart account - UEA []byte `protobuf:"bytes,1,opt,name=UEA,proto3" json:"UEA,omitempty"` -} - -func (m *MsgDeployUEAResponse) Reset() { *m = MsgDeployUEAResponse{} } -func (m *MsgDeployUEAResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeployUEAResponse) ProtoMessage() {} -func (*MsgDeployUEAResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{3} -} -func (m *MsgDeployUEAResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeployUEAResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeployUEAResponse.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 *MsgDeployUEAResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeployUEAResponse.Merge(m, src) -} -func (m *MsgDeployUEAResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDeployUEAResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeployUEAResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeployUEAResponse proto.InternalMessageInfo - -func (m *MsgDeployUEAResponse) GetUEA() []byte { - if m != nil { - return m.UEA - } - return nil -} - -// MsgMintPC represents a message to mint PC tokens to a smart account, -// based on the amount locked by the user in the gateway contract. -type MsgMintPC struct { - // signer is the Cosmos address initiating the tx (used for tx signing) - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // universal_account_id is the identifier of the owner account - UniversalAccountId *UniversalAccountId `protobuf:"bytes,2,opt,name=universal_account_id,json=universalAccountId,proto3" json:"universal_account_id,omitempty"` - // tx_hash is the hash of the transaction in which user locked the tokens - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` -} - -func (m *MsgMintPC) Reset() { *m = MsgMintPC{} } -func (m *MsgMintPC) String() string { return proto.CompactTextString(m) } -func (*MsgMintPC) ProtoMessage() {} -func (*MsgMintPC) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{4} -} -func (m *MsgMintPC) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgMintPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgMintPC.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 *MsgMintPC) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgMintPC.Merge(m, src) -} -func (m *MsgMintPC) XXX_Size() int { - return m.Size() -} -func (m *MsgMintPC) XXX_DiscardUnknown() { - xxx_messageInfo_MsgMintPC.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgMintPC proto.InternalMessageInfo - -func (m *MsgMintPC) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -func (m *MsgMintPC) GetUniversalAccountId() *UniversalAccountId { - if m != nil { - return m.UniversalAccountId - } - return nil -} - -func (m *MsgMintPC) GetTxHash() string { - if m != nil { - return m.TxHash - } - return "" -} - -// MsgMintPCResponse defines the response for MsgMintPC. -type MsgMintPCResponse struct { -} - -func (m *MsgMintPCResponse) Reset() { *m = MsgMintPCResponse{} } -func (m *MsgMintPCResponse) String() string { return proto.CompactTextString(m) } -func (*MsgMintPCResponse) ProtoMessage() {} -func (*MsgMintPCResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{5} -} -func (m *MsgMintPCResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgMintPCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgMintPCResponse.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 *MsgMintPCResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgMintPCResponse.Merge(m, src) -} -func (m *MsgMintPCResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgMintPCResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgMintPCResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgMintPCResponse proto.InternalMessageInfo - // MsgExecutePayload defines a message for executing a universal payload type MsgExecutePayload struct { // signer is the Cosmos address initiating the tx (used for tx signing) @@ -358,7 +146,7 @@ func (m *MsgExecutePayload) Reset() { *m = MsgExecutePayload{} } func (m *MsgExecutePayload) String() string { return proto.CompactTextString(m) } func (*MsgExecutePayload) ProtoMessage() {} func (*MsgExecutePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{6} + return fileDescriptor_88d6216044506365, []int{2} } func (m *MsgExecutePayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -423,7 +211,7 @@ func (m *MsgExecutePayloadResponse) Reset() { *m = MsgExecutePayloadResp func (m *MsgExecutePayloadResponse) String() string { return proto.CompactTextString(m) } func (*MsgExecutePayloadResponse) ProtoMessage() {} func (*MsgExecutePayloadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{7} + return fileDescriptor_88d6216044506365, []int{3} } func (m *MsgExecutePayloadResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +256,7 @@ func (m *MsgMigrateUEA) Reset() { *m = MsgMigrateUEA{} } func (m *MsgMigrateUEA) String() string { return proto.CompactTextString(m) } func (*MsgMigrateUEA) ProtoMessage() {} func (*MsgMigrateUEA) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{8} + return fileDescriptor_88d6216044506365, []int{4} } func (m *MsgMigrateUEA) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -533,7 +321,7 @@ func (m *MsgMigrateUEAResponse) Reset() { *m = MsgMigrateUEAResponse{} } func (m *MsgMigrateUEAResponse) String() string { return proto.CompactTextString(m) } func (*MsgMigrateUEAResponse) ProtoMessage() {} func (*MsgMigrateUEAResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{9} + return fileDescriptor_88d6216044506365, []int{5} } func (m *MsgMigrateUEAResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,7 +361,7 @@ func (m *MsgVoteInbound) Reset() { *m = MsgVoteInbound{} } func (m *MsgVoteInbound) String() string { return proto.CompactTextString(m) } func (*MsgVoteInbound) ProtoMessage() {} func (*MsgVoteInbound) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{10} + return fileDescriptor_88d6216044506365, []int{6} } func (m *MsgVoteInbound) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -624,7 +412,7 @@ func (m *MsgVoteInboundResponse) Reset() { *m = MsgVoteInboundResponse{} func (m *MsgVoteInboundResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteInboundResponse) ProtoMessage() {} func (*MsgVoteInboundResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{11} + return fileDescriptor_88d6216044506365, []int{7} } func (m *MsgVoteInboundResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -665,7 +453,7 @@ func (m *MsgVoteGasPrice) Reset() { *m = MsgVoteGasPrice{} } func (m *MsgVoteGasPrice) String() string { return proto.CompactTextString(m) } func (*MsgVoteGasPrice) ProtoMessage() {} func (*MsgVoteGasPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{12} + return fileDescriptor_88d6216044506365, []int{8} } func (m *MsgVoteGasPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -730,7 +518,7 @@ func (m *MsgVoteGasPriceResponse) Reset() { *m = MsgVoteGasPriceResponse func (m *MsgVoteGasPriceResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteGasPriceResponse) ProtoMessage() {} func (*MsgVoteGasPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{13} + return fileDescriptor_88d6216044506365, []int{9} } func (m *MsgVoteGasPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -762,10 +550,6 @@ var xxx_messageInfo_MsgVoteGasPriceResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgUpdateParams)(nil), "uexecutor.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "uexecutor.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgDeployUEA)(nil), "uexecutor.v1.MsgDeployUEA") - proto.RegisterType((*MsgDeployUEAResponse)(nil), "uexecutor.v1.MsgDeployUEAResponse") - proto.RegisterType((*MsgMintPC)(nil), "uexecutor.v1.MsgMintPC") - proto.RegisterType((*MsgMintPCResponse)(nil), "uexecutor.v1.MsgMintPCResponse") proto.RegisterType((*MsgExecutePayload)(nil), "uexecutor.v1.MsgExecutePayload") proto.RegisterType((*MsgExecutePayloadResponse)(nil), "uexecutor.v1.MsgExecutePayloadResponse") proto.RegisterType((*MsgMigrateUEA)(nil), "uexecutor.v1.MsgMigrateUEA") @@ -779,63 +563,55 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/tx.proto", fileDescriptor_88d6216044506365) } var fileDescriptor_88d6216044506365 = []byte{ - // 884 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0x36, 0x6d, 0x45, 0x81, 0x9e, 0xd5, 0xc4, 0x62, 0xe4, 0x48, 0xa2, 0x13, 0xc5, 0x61, 0xda, - 0xc6, 0x55, 0x6a, 0xb1, 0x51, 0x81, 0x0c, 0xda, 0xa4, 0xc4, 0x68, 0x0d, 0x43, 0x81, 0xca, 0x46, - 0x1d, 0xb2, 0x08, 0x27, 0xf2, 0x4a, 0x11, 0x15, 0x79, 0x04, 0xef, 0x28, 0x48, 0x5b, 0xd1, 0xb1, - 0x53, 0xa7, 0xfe, 0x0f, 0x45, 0x17, 0x0f, 0xfd, 0x03, 0x3a, 0x7a, 0x6b, 0xd0, 0xa2, 0x40, 0xa7, - 0xa2, 0xb0, 0x07, 0xff, 0x1b, 0x05, 0x8f, 0x3f, 0x44, 0x52, 0xb2, 0x02, 0x78, 0xf2, 0x22, 0xdc, - 0x7d, 0xdf, 0x7b, 0x4f, 0xef, 0xfb, 0xee, 0x17, 0x61, 0xd7, 0xc3, 0x33, 0xac, 0x79, 0x8c, 0xb8, - 0xca, 0xf4, 0xb9, 0xc2, 0x66, 0x4d, 0xc7, 0x25, 0x8c, 0x88, 0xc5, 0x18, 0x6e, 0x4e, 0x9f, 0x4b, - 0x25, 0x64, 0x99, 0x36, 0x51, 0xf8, 0x6f, 0x10, 0x20, 0x55, 0x34, 0x42, 0x2d, 0x42, 0x15, 0x8b, - 0x1a, 0x7e, 0xa2, 0x45, 0x8d, 0x90, 0xa8, 0xa6, 0x0b, 0xce, 0x1d, 0x4c, 0x43, 0xa6, 0x6c, 0x10, - 0x83, 0xf0, 0xa1, 0xe2, 0x8f, 0x42, 0xb4, 0x16, 0x14, 0x1a, 0x06, 0x44, 0x30, 0x09, 0x28, 0xf9, - 0x57, 0x01, 0xee, 0xf6, 0xa8, 0x31, 0x70, 0x74, 0xc4, 0x70, 0x1f, 0xb9, 0xc8, 0xa2, 0xe2, 0x0b, - 0x28, 0x20, 0x8f, 0x8d, 0x89, 0x6b, 0xb2, 0x79, 0x55, 0xd8, 0x17, 0x0e, 0x0a, 0xdd, 0xea, 0x9f, - 0xbf, 0x1d, 0x96, 0xc3, 0xc4, 0x8e, 0xae, 0xbb, 0x98, 0xd2, 0xaf, 0x99, 0x6b, 0xda, 0x86, 0xba, - 0x08, 0x15, 0x5b, 0x90, 0x77, 0x78, 0x85, 0xea, 0xe6, 0xbe, 0x70, 0xb0, 0xdd, 0x2a, 0x37, 0x93, - 0x0a, 0x9b, 0x41, 0xf5, 0x6e, 0xee, 0xec, 0xdf, 0x47, 0x1b, 0x6a, 0x18, 0xd9, 0xfe, 0xf4, 0x87, - 0xcb, 0xd3, 0xc6, 0xa2, 0xc6, 0x8f, 0x97, 0xa7, 0x8d, 0xda, 0x42, 0x5d, 0xa6, 0x33, 0xb9, 0x06, - 0x95, 0x0c, 0xa4, 0x62, 0xea, 0x10, 0x9b, 0x62, 0xf9, 0x6f, 0x01, 0x8a, 0x3d, 0x6a, 0xbc, 0xc2, - 0xce, 0x84, 0xcc, 0x07, 0x47, 0x1d, 0xf1, 0x33, 0xc8, 0x53, 0xd3, 0xb0, 0xb1, 0xfb, 0x5e, 0x09, - 0x61, 0x9c, 0xa8, 0x42, 0xd9, 0xb3, 0xcd, 0x29, 0x76, 0x29, 0x9a, 0x0c, 0x91, 0xa6, 0x11, 0xcf, - 0x66, 0x43, 0x53, 0x0f, 0xd5, 0xec, 0xa7, 0xd5, 0x0c, 0xa2, 0xc8, 0x4e, 0x10, 0x78, 0xac, 0xab, - 0xa2, 0xb7, 0x84, 0x89, 0x15, 0xb8, 0xcd, 0x66, 0xc3, 0x31, 0xa2, 0xe3, 0xea, 0x96, 0xdf, 0x86, - 0x9a, 0x67, 0xb3, 0x2f, 0x11, 0x1d, 0xb7, 0x3f, 0xf6, 0x85, 0x87, 0xff, 0xec, 0xab, 0xbe, 0x9f, - 0x52, 0x1d, 0xcb, 0x90, 0x0f, 0xa0, 0x9c, 0x9c, 0x47, 0x7a, 0xc5, 0x1d, 0xd8, 0x1a, 0x1c, 0x75, - 0xb8, 0xb6, 0xa2, 0xea, 0x0f, 0xe5, 0x3f, 0x04, 0x28, 0xf4, 0xa8, 0xd1, 0x33, 0x6d, 0xd6, 0x7f, - 0x79, 0xd3, 0xe5, 0x3f, 0xc9, 0xc8, 0xbf, 0x97, 0x92, 0x1f, 0x68, 0x90, 0xef, 0x41, 0x29, 0x9e, - 0xc4, 0x0b, 0xfd, 0xfb, 0x26, 0x47, 0x8f, 0x78, 0x38, 0xee, 0xa3, 0xf9, 0x84, 0x20, 0xfd, 0x86, - 0xc8, 0x3d, 0x81, 0xd2, 0xa2, 0xa6, 0x13, 0xb4, 0xc6, 0x85, 0x6f, 0xb7, 0xea, 0x57, 0x14, 0x0c, - 0x05, 0xa8, 0x3b, 0x5e, 0x06, 0x11, 0x9f, 0x41, 0x69, 0x8a, 0x5d, 0xf3, 0x5b, 0x53, 0x43, 0xcc, - 0x24, 0xf6, 0x50, 0x47, 0x0c, 0x55, 0x73, 0xdc, 0xc5, 0x9d, 0x24, 0xf1, 0x0a, 0x31, 0xd4, 0x7e, - 0x96, 0xf1, 0x73, 0x2f, 0xe5, 0x67, 0xda, 0x2c, 0x79, 0x0f, 0x6a, 0x4b, 0x60, 0xec, 0xef, 0x2f, - 0x9b, 0xf0, 0x01, 0x77, 0xdd, 0x70, 0x11, 0xc3, 0x37, 0xe7, 0x24, 0x9d, 0x40, 0xc9, 0xe2, 0x3d, - 0xf9, 0x5e, 0xac, 0xf5, 0xb6, 0x17, 0x85, 0xc5, 0xde, 0x5a, 0x19, 0x44, 0x7c, 0x00, 0x05, 0xbf, - 0x55, 0xc4, 0x3c, 0x17, 0x87, 0x9e, 0x2e, 0x80, 0xf6, 0xd3, 0x8c, 0x99, 0x95, 0xcc, 0xe6, 0x8c, - 0x9c, 0x91, 0x2b, 0xb0, 0x9b, 0x02, 0x62, 0x13, 0x7f, 0x16, 0xe0, 0x4e, 0x8f, 0x1a, 0xdf, 0x10, - 0x86, 0x8f, 0xed, 0x11, 0xf1, 0xec, 0xeb, 0xec, 0x50, 0x05, 0x6e, 0x9b, 0x41, 0x72, 0x68, 0xdc, - 0x6e, 0x5a, 0x67, 0x58, 0x59, 0x8d, 0xa2, 0xda, 0x8f, 0x33, 0x7d, 0x97, 0x3c, 0xac, 0xa4, 0xbb, - 0x90, 0xab, 0x70, 0x3f, 0x8d, 0xc4, 0x2d, 0xff, 0x15, 0xbc, 0x04, 0x3e, 0xf5, 0x05, 0xa2, 0x7d, - 0xd7, 0xd4, 0xf0, 0x35, 0x7a, 0x6e, 0x40, 0x89, 0x8c, 0x28, 0x76, 0xa7, 0x58, 0x1f, 0x6a, 0x63, - 0x64, 0xda, 0xd1, 0xb2, 0x17, 0xd4, 0xbb, 0x11, 0xf1, 0xd2, 0xc7, 0x8f, 0x75, 0xb1, 0x0c, 0xb7, - 0x1c, 0xff, 0x6f, 0xf8, 0x2a, 0xe6, 0xd4, 0x60, 0x22, 0x3e, 0x86, 0xe2, 0x68, 0x42, 0xb4, 0xef, - 0x86, 0xb6, 0x67, 0x8d, 0xb0, 0xcb, 0x57, 0x27, 0xa7, 0x6e, 0x73, 0xec, 0x35, 0x87, 0xda, 0x9f, - 0x64, 0x74, 0xa6, 0x5f, 0x8c, 0xa4, 0x82, 0xf0, 0xc5, 0x48, 0x42, 0x91, 0xe0, 0xd6, 0x59, 0x0e, - 0xb6, 0x7a, 0xd4, 0x10, 0xdf, 0x40, 0x31, 0xf5, 0xfc, 0x3d, 0xcc, 0xec, 0xa6, 0xf4, 0x83, 0x23, - 0x7d, 0xb4, 0x96, 0x8e, 0xef, 0xe7, 0x13, 0x28, 0x2c, 0xde, 0x22, 0x69, 0x29, 0x27, 0xe6, 0x24, - 0xf9, 0x6a, 0x2e, 0x2e, 0xd6, 0x85, 0x7c, 0x78, 0xad, 0x57, 0x96, 0xa2, 0x03, 0x42, 0x7a, 0x74, - 0x05, 0x11, 0xd7, 0x78, 0x0b, 0x77, 0x32, 0x77, 0xe6, 0x72, 0x4a, 0x3a, 0x40, 0x7a, 0xfa, 0x9e, - 0x80, 0xb8, 0xf6, 0x6b, 0x80, 0xc4, 0x7d, 0xb1, 0xb7, 0xa2, 0x95, 0x88, 0x94, 0x9e, 0xac, 0x21, - 0xe3, 0x7a, 0x5f, 0xc1, 0x76, 0xf2, 0xe8, 0x3c, 0x58, 0xca, 0x49, 0xb0, 0xd2, 0x87, 0xeb, 0xd8, - 0xb8, 0xe4, 0x1b, 0x28, 0xa6, 0xb6, 0xf6, 0xc3, 0x95, 0x59, 0x11, 0xbd, 0x62, 0x95, 0x57, 0xed, - 0x21, 0xe9, 0xd6, 0xf7, 0x97, 0xa7, 0x0d, 0xa1, 0xdb, 0x3f, 0x3b, 0xaf, 0x0b, 0xef, 0xce, 0xeb, - 0xc2, 0x7f, 0xe7, 0x75, 0xe1, 0xa7, 0x8b, 0xfa, 0xc6, 0xbb, 0x8b, 0xfa, 0xc6, 0x3f, 0x17, 0xf5, - 0x8d, 0xb7, 0x2f, 0x0c, 0x93, 0x8d, 0xbd, 0x51, 0x53, 0x23, 0x96, 0xe2, 0x78, 0x74, 0xcc, 0xcf, - 0x04, 0x1f, 0x1d, 0xf2, 0xe1, 0xa1, 0x4d, 0x74, 0xac, 0xcc, 0x94, 0xc5, 0x0e, 0xe6, 0x9f, 0x73, - 0xa3, 0x3c, 0xff, 0x3c, 0xfb, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xcf, 0x87, 0x73, - 0x3c, 0x0a, 0x00, 0x00, + // 760 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xbf, 0x4f, 0xdb, 0x4e, + 0x1c, 0x8d, 0x21, 0xf0, 0x55, 0x8e, 0x7c, 0x81, 0x58, 0xa1, 0xf9, 0x01, 0x04, 0x48, 0x5b, 0x41, + 0x43, 0x89, 0x0b, 0x95, 0x18, 0xb2, 0x41, 0x8b, 0x2a, 0x54, 0x05, 0xa5, 0x2e, 0x74, 0x60, 0x89, + 0x2e, 0xf6, 0xd5, 0xb1, 0x8a, 0x7d, 0xd6, 0xdd, 0x39, 0x82, 0xad, 0xea, 0xd8, 0xa9, 0x53, 0xff, + 0x87, 0xaa, 0x0b, 0x43, 0xa5, 0xae, 0x1d, 0x19, 0x51, 0xbb, 0x74, 0xaa, 0x2a, 0x18, 0xf8, 0x37, + 0x2a, 0x9f, 0x7f, 0xe5, 0x1c, 0x1a, 0x24, 0xa6, 0x2e, 0xd1, 0xf9, 0xbd, 0xcf, 0xe7, 0xe5, 0xf3, + 0xde, 0x9d, 0xcf, 0x60, 0xc6, 0x45, 0xc7, 0x48, 0x73, 0x19, 0x26, 0x4a, 0x6f, 0x5d, 0x61, 0xc7, + 0x75, 0x87, 0x60, 0x86, 0xe5, 0x6c, 0x04, 0xd7, 0x7b, 0xeb, 0xe5, 0x1c, 0xb4, 0x4c, 0x1b, 0x2b, + 0xfc, 0xd7, 0x2f, 0x28, 0x17, 0x34, 0x4c, 0x2d, 0x4c, 0x15, 0x8b, 0x1a, 0x5e, 0xa3, 0x45, 0x8d, + 0x80, 0x28, 0x8a, 0x82, 0x27, 0x0e, 0xa2, 0x01, 0x93, 0x37, 0xb0, 0x81, 0xf9, 0x52, 0xf1, 0x56, + 0x01, 0x5a, 0xf2, 0x85, 0xda, 0x3e, 0xe1, 0x3f, 0xf8, 0x54, 0xf5, 0xb3, 0x04, 0xa6, 0x9a, 0xd4, + 0x38, 0x70, 0x74, 0xc8, 0x50, 0x0b, 0x12, 0x68, 0x51, 0x79, 0x13, 0x64, 0xa0, 0xcb, 0xba, 0x98, + 0x98, 0xec, 0xa4, 0x28, 0x2d, 0x4a, 0x2b, 0x99, 0xed, 0xe2, 0xf7, 0x2f, 0x6b, 0xf9, 0xa0, 0x71, + 0x4b, 0xd7, 0x09, 0xa2, 0xf4, 0x25, 0x23, 0xa6, 0x6d, 0xa8, 0x71, 0xa9, 0xbc, 0x01, 0xc6, 0x1d, + 0xae, 0x50, 0x1c, 0x59, 0x94, 0x56, 0x26, 0x36, 0xf2, 0xf5, 0x7e, 0x87, 0x75, 0x5f, 0x7d, 0x3b, + 0x7d, 0xf6, 0x6b, 0x21, 0xa5, 0x06, 0x95, 0x8d, 0x87, 0xef, 0xae, 0x4e, 0x6b, 0xb1, 0xc6, 0xfb, + 0xab, 0xd3, 0x5a, 0x29, 0x76, 0x97, 0x98, 0xac, 0x5a, 0x02, 0x85, 0x04, 0xa4, 0x22, 0xea, 0x60, + 0x9b, 0xa2, 0xea, 0xb7, 0x11, 0x90, 0x6b, 0x52, 0x63, 0x87, 0xb7, 0xa2, 0x16, 0x3c, 0x39, 0xc2, + 0x50, 0x97, 0x1f, 0x81, 0x71, 0x6a, 0x1a, 0x36, 0x22, 0x37, 0xfa, 0x08, 0xea, 0x64, 0x15, 0xe4, + 0x5d, 0xdb, 0xec, 0x21, 0x42, 0xe1, 0x51, 0x1b, 0x6a, 0x1a, 0x76, 0x6d, 0xd6, 0x36, 0xf5, 0xc0, + 0xd2, 0xa2, 0x68, 0xe9, 0x20, 0xac, 0xdc, 0xf2, 0x0b, 0x77, 0x75, 0x55, 0x76, 0x07, 0x30, 0xf9, + 0x39, 0xc8, 0xc5, 0x9a, 0x8e, 0x3f, 0x5a, 0x71, 0x94, 0x0b, 0x56, 0xfe, 0x22, 0x18, 0x18, 0x50, + 0xa7, 0xdd, 0x04, 0x22, 0xaf, 0x82, 0x5c, 0x0f, 0x11, 0xf3, 0xb5, 0xa9, 0x41, 0x66, 0x62, 0xbb, + 0xad, 0x43, 0x06, 0x8b, 0x69, 0xcf, 0x9d, 0x3a, 0xdd, 0x4f, 0x3c, 0x85, 0x0c, 0x36, 0x56, 0xbd, + 0x78, 0x03, 0x6b, 0x5e, 0xb6, 0xb3, 0x42, 0xb6, 0x62, 0x58, 0xd5, 0x59, 0x50, 0x1a, 0x00, 0xa3, + 0x7c, 0x3f, 0x8d, 0x80, 0xff, 0x9b, 0xd4, 0x68, 0x9a, 0x06, 0x81, 0x0c, 0x1d, 0xec, 0x6c, 0xfd, + 0x3b, 0xd9, 0x5a, 0x7c, 0x26, 0x2f, 0x8b, 0xa1, 0xd9, 0x36, 0xc3, 0xb2, 0x28, 0x5b, 0x2b, 0x81, + 0xc8, 0x73, 0x20, 0xe3, 0x8d, 0x0a, 0x99, 0x4b, 0x50, 0x90, 0x69, 0x0c, 0x34, 0x96, 0x13, 0x61, + 0x16, 0x84, 0x30, 0xe3, 0x64, 0xaa, 0x05, 0x30, 0x23, 0x00, 0x51, 0x88, 0x1f, 0x25, 0x30, 0xd9, + 0xa4, 0xc6, 0x2b, 0xcc, 0xd0, 0xae, 0xdd, 0xc1, 0xae, 0x7d, 0x9b, 0x13, 0xaa, 0x80, 0xff, 0x4c, + 0xbf, 0x39, 0x08, 0x6e, 0x46, 0xf4, 0x19, 0x28, 0xab, 0x61, 0x55, 0x63, 0x29, 0x31, 0x77, 0xce, + 0x45, 0x8a, 0x38, 0x45, 0xb5, 0x08, 0xee, 0x88, 0x48, 0x34, 0xf2, 0x0f, 0xff, 0x82, 0xf0, 0xa8, + 0x67, 0x90, 0xb6, 0x88, 0xa9, 0xa1, 0x5b, 0xcc, 0x5c, 0x03, 0x39, 0xdc, 0xa1, 0x88, 0xf4, 0x90, + 0xde, 0xd6, 0xba, 0xd0, 0xb4, 0xc3, 0x6d, 0xcf, 0xa8, 0x53, 0x21, 0xf1, 0xc4, 0xc3, 0x77, 0x75, + 0x39, 0x0f, 0xc6, 0x1c, 0xef, 0x6f, 0xf8, 0x2e, 0xa6, 0x55, 0xff, 0x41, 0x5e, 0x02, 0xd9, 0xce, + 0x11, 0xd6, 0xde, 0xb4, 0x6d, 0xd7, 0xea, 0x20, 0xc2, 0x77, 0x27, 0xad, 0x4e, 0x70, 0x6c, 0x8f, + 0x43, 0x8d, 0x07, 0x09, 0x9f, 0xe2, 0x45, 0xd2, 0xef, 0x20, 0xb8, 0x48, 0xfa, 0xa1, 0xd0, 0xf0, + 0xc6, 0xd7, 0x51, 0x30, 0xda, 0xa4, 0x86, 0xbc, 0x0f, 0xb2, 0xc2, 0xad, 0x38, 0x9f, 0x38, 0x4d, + 0xe2, 0x3d, 0x54, 0xbe, 0x3f, 0x94, 0x0e, 0xd5, 0xe5, 0x43, 0x30, 0x99, 0xb8, 0xa2, 0x16, 0x06, + 0x1a, 0xc5, 0x82, 0xf2, 0xf2, 0x0d, 0x05, 0x91, 0xf6, 0x1e, 0x00, 0x7d, 0xaf, 0xe7, 0xec, 0x40, + 0x5b, 0x4c, 0x96, 0xef, 0x0e, 0x21, 0x23, 0xbd, 0x17, 0x60, 0xa2, 0xff, 0xa4, 0xce, 0x0d, 0xf4, + 0xf4, 0xb1, 0xe5, 0x7b, 0xc3, 0xd8, 0x48, 0x72, 0x1f, 0x64, 0x85, 0x93, 0x34, 0x7f, 0x6d, 0x57, + 0x48, 0x5f, 0x13, 0xea, 0x75, 0x5b, 0x56, 0x1e, 0x7b, 0x7b, 0x75, 0x5a, 0x93, 0xb6, 0x5b, 0x67, + 0x17, 0x15, 0xe9, 0xfc, 0xa2, 0x22, 0xfd, 0xbe, 0xa8, 0x48, 0x1f, 0x2e, 0x2b, 0xa9, 0xf3, 0xcb, + 0x4a, 0xea, 0xe7, 0x65, 0x25, 0x75, 0xb8, 0x69, 0x98, 0xac, 0xeb, 0x76, 0xea, 0x1a, 0xb6, 0x14, + 0xc7, 0xa5, 0x5d, 0x7e, 0x04, 0xf9, 0x6a, 0x8d, 0x2f, 0xd7, 0x6c, 0xac, 0x23, 0xe5, 0x58, 0x89, + 0x0f, 0x0c, 0xff, 0xa8, 0x76, 0xc6, 0xf9, 0x47, 0xf2, 0xf1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xda, 0x49, 0x1e, 0xf4, 0xc2, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -854,10 +630,6 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // DeployUEA defines a message to deploy a new smart account. - DeployUEA(ctx context.Context, in *MsgDeployUEA, opts ...grpc.CallOption) (*MsgDeployUEAResponse, error) - // MintPC defines a message to mint PC tokens to a smart account, - MintPC(ctx context.Context, in *MsgMintPC, opts ...grpc.CallOption) (*MsgMintPCResponse, error) // ExecutePayload defines a message for executing a universal payload ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) // MigrateUEA defines a message for migrating UEA @@ -885,24 +657,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) DeployUEA(ctx context.Context, in *MsgDeployUEA, opts ...grpc.CallOption) (*MsgDeployUEAResponse, error) { - out := new(MsgDeployUEAResponse) - err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/DeployUEA", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) MintPC(ctx context.Context, in *MsgMintPC, opts ...grpc.CallOption) (*MsgMintPCResponse, error) { - out := new(MsgMintPCResponse) - err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/MintPC", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) { out := new(MsgExecutePayloadResponse) err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/ExecutePayload", in, out, opts...) @@ -945,10 +699,6 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // DeployUEA defines a message to deploy a new smart account. - DeployUEA(context.Context, *MsgDeployUEA) (*MsgDeployUEAResponse, error) - // MintPC defines a message to mint PC tokens to a smart account, - MintPC(context.Context, *MsgMintPC) (*MsgMintPCResponse, error) // ExecutePayload defines a message for executing a universal payload ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) // MigrateUEA defines a message for migrating UEA @@ -966,12 +716,6 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) DeployUEA(ctx context.Context, req *MsgDeployUEA) (*MsgDeployUEAResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeployUEA not implemented") -} -func (*UnimplementedMsgServer) MintPC(ctx context.Context, req *MsgMintPC) (*MsgMintPCResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MintPC not implemented") -} func (*UnimplementedMsgServer) ExecutePayload(ctx context.Context, req *MsgExecutePayload) (*MsgExecutePayloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecutePayload not implemented") } @@ -1007,42 +751,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_DeployUEA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeployUEA) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeployUEA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/uexecutor.v1.Msg/DeployUEA", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeployUEA(ctx, req.(*MsgDeployUEA)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_MintPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgMintPC) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MintPC(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/uexecutor.v1.Msg/MintPC", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MintPC(ctx, req.(*MsgMintPC)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_ExecutePayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgExecutePayload) if err := dec(in); err != nil { @@ -1123,14 +831,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "DeployUEA", - Handler: _Msg_DeployUEA_Handler, - }, - { - MethodName: "MintPC", - Handler: _Msg_MintPC_Handler, - }, { MethodName: "ExecutePayload", Handler: _Msg_ExecutePayload_Handler, @@ -1215,7 +915,7 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgDeployUEA) Marshal() (dAtA []byte, err error) { +func (m *MsgExecutePayload) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1225,20 +925,32 @@ func (m *MsgDeployUEA) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDeployUEA) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgExecutePayload) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDeployUEA) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgExecutePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TxHash) > 0 { - i -= len(m.TxHash) - copy(dAtA[i:], m.TxHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.TxHash))) + if len(m.VerificationData) > 0 { + i -= len(m.VerificationData) + copy(dAtA[i:], m.VerificationData) + i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationData))) + i-- + dAtA[i] = 0x22 + } + if m.UniversalPayload != nil { + { + size, err := m.UniversalPayload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } @@ -1264,7 +976,7 @@ func (m *MsgDeployUEA) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgDeployUEAResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgExecutePayloadResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1274,27 +986,20 @@ func (m *MsgDeployUEAResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDeployUEAResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgExecutePayloadResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDeployUEAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgExecutePayloadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.UEA) > 0 { - i -= len(m.UEA) - copy(dAtA[i:], m.UEA) - i = encodeVarintTx(dAtA, i, uint64(len(m.UEA))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *MsgMintPC) Marshal() (dAtA []byte, err error) { +func (m *MsgMigrateUEA) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1304,20 +1009,32 @@ func (m *MsgMintPC) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgMintPC) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgMigrateUEA) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgMintPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgMigrateUEA) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TxHash) > 0 { - i -= len(m.TxHash) - copy(dAtA[i:], m.TxHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.TxHash))) + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x22 + } + if m.MigrationPayload != nil { + { + size, err := m.MigrationPayload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } @@ -1343,7 +1060,7 @@ func (m *MsgMintPC) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgMintPCResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgMigrateUEAResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1353,12 +1070,12 @@ func (m *MsgMintPCResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgMintPCResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgMigrateUEAResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgMintPCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgMigrateUEAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1366,7 +1083,7 @@ func (m *MsgMintPCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgExecutePayload) Marshal() (dAtA []byte, err error) { +func (m *MsgVoteInbound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1376,187 +1093,19 @@ func (m *MsgExecutePayload) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgExecutePayload) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgVoteInbound) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgExecutePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgVoteInbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.VerificationData) > 0 { - i -= len(m.VerificationData) - copy(dAtA[i:], m.VerificationData) - i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationData))) - i-- - dAtA[i] = 0x22 - } - if m.UniversalPayload != nil { + if m.Inbound != nil { { - size, err := m.UniversalPayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.UniversalAccountId != nil { - { - size, err := m.UniversalAccountId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - 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 *MsgExecutePayloadResponse) 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 *MsgExecutePayloadResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgExecutePayloadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgMigrateUEA) 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 *MsgMigrateUEA) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMigrateUEA) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if m.MigrationPayload != nil { - { - size, err := m.MigrationPayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.UniversalAccountId != nil { - { - size, err := m.UniversalAccountId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - 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 *MsgMigrateUEAResponse) 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 *MsgMigrateUEAResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgMigrateUEAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgVoteInbound) 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 *MsgVoteInbound) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgVoteInbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Inbound != nil { - { - size, err := m.Inbound.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inbound.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1704,70 +1253,6 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgDeployUEA) 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.UniversalAccountId != nil { - l = m.UniversalAccountId.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TxHash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeployUEAResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UEA) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgMintPC) 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.UniversalAccountId != nil { - l = m.UniversalAccountId.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TxHash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgMintPCResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgExecutePayload) Size() (n int) { if m == nil { return 0 @@ -2065,440 +1550,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeployUEA) 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: MsgDeployUEA: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeployUEA: 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UniversalAccountId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UniversalAccountId == nil { - m.UniversalAccountId = &UniversalAccountId{} - } - if err := m.UniversalAccountId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - 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 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.TxHash = string(dAtA[iNdEx:postIndex]) - 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 *MsgDeployUEAResponse) 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: MsgDeployUEAResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeployUEAResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UEA", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UEA = append(m.UEA[:0], dAtA[iNdEx:postIndex]...) - if m.UEA == nil { - m.UEA = []byte{} - } - 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 *MsgMintPC) 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: MsgMintPC: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMintPC: 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UniversalAccountId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UniversalAccountId == nil { - m.UniversalAccountId = &UniversalAccountId{} - } - if err := m.UniversalAccountId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - 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 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.TxHash = string(dAtA[iNdEx:postIndex]) - 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 *MsgMintPCResponse) 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: MsgMintPCResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMintPCResponse: 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 *MsgExecutePayload) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/utxverifier/keeper/evm_helpers.go b/x/utxverifier/keeper/evm_helpers.go index c28d2f70..b0cf03e3 100644 --- a/x/utxverifier/keeper/evm_helpers.go +++ b/x/utxverifier/keeper/evm_helpers.go @@ -3,14 +3,13 @@ package keeper import ( - "context" "encoding/hex" "fmt" "math/big" "strings" - "github.com/pushchain/push-chain-node/utils/rpc" - evmrpc "github.com/pushchain/push-chain-node/utils/rpc/evm" + // "github.com/pushchain/push-chain-node/utils/rpc" + // evmrpc "github.com/pushchain/push-chain-node/utils/rpc/evm" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" utxverifiertypes "github.com/pushchain/push-chain-node/x/utxverifier/types" ) @@ -123,39 +122,39 @@ func ParseEVMFundsAddedEventLogs( } // Checks if a given evm tx hash has enough confirmations -func CheckEVMBlockConfirmations( - ctx context.Context, - txHash string, - rpcCfg rpc.RpcCallConfig, - requiredConfirmations uint64, -) error { - // Fetch transaction receipt - receipt, err := evmrpc.EVMGetTransactionReceipt(ctx, rpcCfg, txHash) - if err != nil { - return fmt.Errorf("fetch receipt failed: %w", err) - } - - txBlockNum, ok := new(big.Int).SetString(receipt.BlockNumber[2:], 16) // remove "0x" - if !ok { - return fmt.Errorf("invalid block number in receipt: %s", receipt.BlockNumber) - } - - latestBlock, err := evmrpc.EVMGetBlockByNumber(ctx, rpcCfg, "latest", false) - if err != nil { - return fmt.Errorf("failed to fetch latest block: %w", err) - } - - latestBlockNum, ok := new(big.Int).SetString(latestBlock.Number[2:], 16) - if !ok { - return fmt.Errorf("invalid latest block number: %s", latestBlock.Number) - } - - confirmations := new(big.Int).Sub(latestBlockNum, txBlockNum) - required := big.NewInt(int64(requiredConfirmations)) - - if confirmations.Cmp(required) < 0 { - return fmt.Errorf("insufficient confirmations: got %s, need %d", confirmations.String(), requiredConfirmations) - } - - return nil -} +// func CheckEVMBlockConfirmations( +// ctx context.Context, +// txHash string, +// rpcCfg rpc.RpcCallConfig, +// requiredConfirmations uint64, +// ) error { +// // Fetch transaction receipt +// receipt, err := evmrpc.EVMGetTransactionReceipt(ctx, rpcCfg, txHash) +// if err != nil { +// return fmt.Errorf("fetch receipt failed: %w", err) +// } + +// txBlockNum, ok := new(big.Int).SetString(receipt.BlockNumber[2:], 16) // remove "0x" +// if !ok { +// return fmt.Errorf("invalid block number in receipt: %s", receipt.BlockNumber) +// } + +// latestBlock, err := evmrpc.EVMGetBlockByNumber(ctx, rpcCfg, "latest", false) +// if err != nil { +// return fmt.Errorf("failed to fetch latest block: %w", err) +// } + +// latestBlockNum, ok := new(big.Int).SetString(latestBlock.Number[2:], 16) +// if !ok { +// return fmt.Errorf("invalid latest block number: %s", latestBlock.Number) +// } + +// confirmations := new(big.Int).Sub(latestBlockNum, txBlockNum) +// required := big.NewInt(int64(requiredConfirmations)) + +// if confirmations.Cmp(required) < 0 { +// return fmt.Errorf("insufficient confirmations: got %s, need %d", confirmations.String(), requiredConfirmations) +// } + +// return nil +// } diff --git a/x/utxverifier/keeper/svm_helpers.go b/x/utxverifier/keeper/svm_helpers.go index 7e71a776..00ee1f7a 100644 --- a/x/utxverifier/keeper/svm_helpers.go +++ b/x/utxverifier/keeper/svm_helpers.go @@ -4,18 +4,16 @@ package keeper import ( "bytes" - "context" "encoding/base64" "encoding/binary" - "encoding/hex" "fmt" "math/big" "strings" "github.com/decred/base58" - "github.com/pushchain/push-chain-node/utils/rpc" - svmrpc "github.com/pushchain/push-chain-node/utils/rpc/svm" - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + // "github.com/pushchain/push-chain-node/utils/rpc" + // svmrpc "github.com/pushchain/push-chain-node/utils/rpc/svm" + utxverifiertypes "github.com/pushchain/push-chain-node/x/utxverifier/types" ) @@ -46,80 +44,80 @@ func compareSVMAddresses(addr1, addr2 string) bool { return bytes1 != nil && bytes2 != nil && bytes.Equal(bytes1, bytes2) } -func IsValidSVMAddFundsInstruction( - instructions []svmrpc.Instruction, - accountKeys []string, - chainConfig uregistrytypes.ChainConfig, -) error { - for _, inst := range instructions { - if inst.ProgramIDIndex < 0 || inst.ProgramIDIndex >= len(accountKeys) { - return fmt.Errorf("invalid program ID index: %d", inst.ProgramIDIndex) - } - programID := accountKeys[inst.ProgramIDIndex] - if !compareSVMAddresses(programID, chainConfig.GatewayAddress) { - continue - } - - if len(inst.Accounts) == 0 { - return fmt.Errorf("gateway instruction missing accounts") - } - if inst.Data == "" { - return fmt.Errorf("gateway instruction missing data") - } - - dataBytes := base58.Decode(inst.Data) - if dataBytes == nil || len(dataBytes) < 8 { - return fmt.Errorf("invalid instruction data format") - } - actual := dataBytes[:8] - - var expected []byte - for _, method := range chainConfig.GatewayMethods { - if method.Name == uregistrytypes.GATEWAY_METHOD.SVM.AddFunds { - var err error - expected, err = hex.DecodeString(method.Identifier) - if err != nil { - return fmt.Errorf("invalid expected discriminator: %w", err) - } - break - } - } - if expected == nil { - return fmt.Errorf("add_funds method not found in config") - } - if !bytes.Equal(actual, expected) { - return fmt.Errorf("discriminator mismatch: expected %x, got %x", expected, actual) - } - return nil // ✅ Valid instruction found - } - return fmt.Errorf("no instruction found calling gateway address %s", chainConfig.GatewayAddress) -} - -// Checks if a given svm tx hash has enough confirmations -func CheckSVMBlockConfirmations( - ctx context.Context, - txHashBase58 string, - rpcCfg rpc.RpcCallConfig, - requiredConfirmations uint64, -) error { - // Fetch transaction receipt - tx, err := svmrpc.SVMGetTransactionBySig(ctx, rpcCfg, txHashBase58) - if err != nil { - return fmt.Errorf("fetch tx failed: %w", err) - } - - currentSlot, err := svmrpc.SVMGetCurrentSlot(ctx, rpcCfg) - if err != nil { - return fmt.Errorf("fetch current slot failed: %w", err) - } - - confirmations := currentSlot - tx.Slot - if confirmations < uint64(requiredConfirmations) { - return fmt.Errorf("insufficient confirmations: got %d, need %d", confirmations, requiredConfirmations) - } - - return nil -} +// func IsValidSVMAddFundsInstruction( +// instructions []svmrpc.Instruction, +// accountKeys []string, +// chainConfig uregistrytypes.ChainConfig, +// ) error { +// for _, inst := range instructions { +// if inst.ProgramIDIndex < 0 || inst.ProgramIDIndex >= len(accountKeys) { +// return fmt.Errorf("invalid program ID index: %d", inst.ProgramIDIndex) +// } +// programID := accountKeys[inst.ProgramIDIndex] +// if !compareSVMAddresses(programID, chainConfig.GatewayAddress) { +// continue +// } + +// if len(inst.Accounts) == 0 { +// return fmt.Errorf("gateway instruction missing accounts") +// } +// if inst.Data == "" { +// return fmt.Errorf("gateway instruction missing data") +// } + +// dataBytes := base58.Decode(inst.Data) +// if dataBytes == nil || len(dataBytes) < 8 { +// return fmt.Errorf("invalid instruction data format") +// } +// actual := dataBytes[:8] + +// var expected []byte +// for _, method := range chainConfig.GatewayMethods { +// if method.Name == uregistrytypes.GATEWAY_METHOD.SVM.AddFunds { +// var err error +// expected, err = hex.DecodeString(method.Identifier) +// if err != nil { +// return fmt.Errorf("invalid expected discriminator: %w", err) +// } +// break +// } +// } +// if expected == nil { +// return fmt.Errorf("add_funds method not found in config") +// } +// if !bytes.Equal(actual, expected) { +// return fmt.Errorf("discriminator mismatch: expected %x, got %x", expected, actual) +// } +// return nil // ✅ Valid instruction found +// } +// return fmt.Errorf("no instruction found calling gateway address %s", chainConfig.GatewayAddress) +// } + +// // Checks if a given svm tx hash has enough confirmations +// func CheckSVMBlockConfirmations( +// ctx context.Context, +// txHashBase58 string, +// rpcCfg rpc.RpcCallConfig, +// requiredConfirmations uint64, +// ) error { +// // Fetch transaction receipt +// tx, err := svmrpc.SVMGetTransactionBySig(ctx, rpcCfg, txHashBase58) +// if err != nil { +// return fmt.Errorf("fetch tx failed: %w", err) +// } + +// currentSlot, err := svmrpc.SVMGetCurrentSlot(ctx, rpcCfg) +// if err != nil { +// return fmt.Errorf("fetch current slot failed: %w", err) +// } + +// confirmations := currentSlot - tx.Slot +// if confirmations < uint64(requiredConfirmations) { +// return fmt.Errorf("insufficient confirmations: got %d, need %d", confirmations, requiredConfirmations) +// } + +// return nil +// } // ParseSVMFundsAddedLog parses Solana log messages to extract the FundsAddedEvent // @param logMessages Program logs from the transaction diff --git a/x/utxverifier/keeper/verify_and_send_funds_tx.go b/x/utxverifier/keeper/verify_and_send_funds_tx.go index 4afe7d21..19353e35 100644 --- a/x/utxverifier/keeper/verify_and_send_funds_tx.go +++ b/x/utxverifier/keeper/verify_and_send_funds_tx.go @@ -1,49 +1,41 @@ package keeper -import ( - "context" - "fmt" - "math/big" - - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" -) - // VerifyAndGetLockedFunds verifies if the user has interacted with the gateway on the source chain and send the locked funds amount. -func (k Keeper) VerifyAndGetLockedFunds(ctx context.Context, ownerKey, txHash, chain string) (big.Int, uint32, error) { - // Step 1: Load chain config - chainConfig, err := k.uregistryKeeper.GetChainConfig(ctx, chain) - if err != nil { - return *big.NewInt(0), 0, err - } +// func (k Keeper) VerifyAndGetLockedFunds(ctx context.Context, ownerKey, txHash, chain string) (big.Int, uint32, error) { +// // Step 1: Load chain config +// chainConfig, err := k.uregistryKeeper.GetChainConfig(ctx, chain) +// if err != nil { +// return *big.NewInt(0), 0, err +// } - if !chainConfig.Enabled.IsInboundEnabled { - return *big.NewInt(0), 0, fmt.Errorf("chain %s is not enabled", chain) - } +// if !chainConfig.Enabled.IsInboundEnabled { +// return *big.NewInt(0), 0, fmt.Errorf("chain %s is not enabled", chain) +// } - switch chainConfig.VmType { - case uregistrytypes.VmType_EVM: - usdValue, err := k.verifyEVMAndGetFunds(ctx, ownerKey, txHash, chainConfig) - if err != nil { - return *big.NewInt(0), 0, fmt.Errorf("evm tx verification failed: %w", err) - } - usdAmount := new(big.Int) - usdAmount, ok := usdAmount.SetString(usdValue.Amount, 10) // base 10 - if !ok { - return *big.NewInt(0), 0, fmt.Errorf("invalid amount string: %s", usdValue.Amount) - } - return *usdAmount, usdValue.Decimals, nil - case uregistrytypes.VmType_SVM: - usdValue, err := k.verifySVMAndGetFunds(ctx, ownerKey, txHash, chainConfig) - if err != nil { - return *big.NewInt(0), 0, fmt.Errorf("svm tx verification failed: %w", err) - } - usdAmount := new(big.Int) - usdAmount, ok := usdAmount.SetString(usdValue.Amount, 10) // base 10 - if !ok { - return *big.NewInt(0), 0, fmt.Errorf("invalid amount string: %s", usdValue.Amount) - } - return *usdAmount, usdValue.Decimals, nil - default: - return *big.NewInt(0), 0, fmt.Errorf("unsupported VM type %s for chain %s", chainConfig.VmType.String(), chain) - } -} +// switch chainConfig.VmType { +// case uregistrytypes.VmType_EVM: +// usdValue, err := k.verifyEVMAndGetFunds(ctx, ownerKey, txHash, chainConfig) +// if err != nil { +// return *big.NewInt(0), 0, fmt.Errorf("evm tx verification failed: %w", err) +// } +// usdAmount := new(big.Int) +// usdAmount, ok := usdAmount.SetString(usdValue.Amount, 10) // base 10 +// if !ok { +// return *big.NewInt(0), 0, fmt.Errorf("invalid amount string: %s", usdValue.Amount) +// } +// return *usdAmount, usdValue.Decimals, nil +// case uregistrytypes.VmType_SVM: +// usdValue, err := k.verifySVMAndGetFunds(ctx, ownerKey, txHash, chainConfig) +// if err != nil { +// return *big.NewInt(0), 0, fmt.Errorf("svm tx verification failed: %w", err) +// } +// usdAmount := new(big.Int) +// usdAmount, ok := usdAmount.SetString(usdValue.Amount, 10) // base 10 +// if !ok { +// return *big.NewInt(0), 0, fmt.Errorf("invalid amount string: %s", usdValue.Amount) +// } +// return *usdAmount, usdValue.Decimals, nil +// default: +// return *big.NewInt(0), 0, fmt.Errorf("unsupported VM type %s for chain %s", chainConfig.VmType.String(), chain) +// } +// } diff --git a/x/utxverifier/keeper/verify_gateway_interaction_tx.go b/x/utxverifier/keeper/verify_gateway_interaction_tx.go index a4430f43..6f828cc9 100644 --- a/x/utxverifier/keeper/verify_gateway_interaction_tx.go +++ b/x/utxverifier/keeper/verify_gateway_interaction_tx.go @@ -1,35 +1,28 @@ package keeper -import ( - "context" - "fmt" - - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" -) - // VerifyGatewayInteractionTx only verifies if the user has interacted with the gateway on the source chain. -func (k Keeper) VerifyGatewayInteractionTx(ctx context.Context, ownerKey, txHash, chain string) error { - // Step 1: Load chain config - chainConfig, err := k.uregistryKeeper.GetChainConfig(ctx, chain) - if err != nil { - return err - } +// func (k Keeper) VerifyGatewayInteractionTx(ctx context.Context, ownerKey, txHash, chain string) error { +// // Step 1: Load chain config +// chainConfig, err := k.uregistryKeeper.GetChainConfig(ctx, chain) +// if err != nil { +// return err +// } - if !chainConfig.Enabled.IsInboundEnabled { - return fmt.Errorf("chain %s is not enabled", chain) - } +// if !chainConfig.Enabled.IsInboundEnabled { +// return fmt.Errorf("chain %s is not enabled", chain) +// } - switch chainConfig.VmType { - case uregistrytypes.VmType_EVM: - if err := k.verifyEVMInteraction(ctx, ownerKey, txHash, chainConfig); err != nil { - return fmt.Errorf("evm tx verification failed: %w", err) - } - case uregistrytypes.VmType_SVM: - if err := k.verifySVMInteraction(ctx, ownerKey, txHash, chainConfig); err != nil { - return fmt.Errorf("svm tx verification failed: %w", err) - } - default: - return fmt.Errorf("unsupported VM type %s for chain %s", chainConfig.VmType.String(), chain) - } - return nil -} +// switch chainConfig.VmType { +// case uregistrytypes.VmType_EVM: +// if err := k.verifyEVMInteraction(ctx, ownerKey, txHash, chainConfig); err != nil { +// return fmt.Errorf("evm tx verification failed: %w", err) +// } +// case uregistrytypes.VmType_SVM: +// if err := k.verifySVMInteraction(ctx, ownerKey, txHash, chainConfig); err != nil { +// return fmt.Errorf("svm tx verification failed: %w", err) +// } +// default: +// return fmt.Errorf("unsupported VM type %s for chain %s", chainConfig.VmType.String(), chain) +// } +// return nil +// } diff --git a/x/utxverifier/keeper/verify_tx_evm.go b/x/utxverifier/keeper/verify_tx_evm.go index 18650477..ae5442eb 100644 --- a/x/utxverifier/keeper/verify_tx_evm.go +++ b/x/utxverifier/keeper/verify_tx_evm.go @@ -4,9 +4,8 @@ import ( "context" "fmt" - "github.com/pushchain/push-chain-node/utils" - "github.com/pushchain/push-chain-node/utils/rpc" - evmrpc "github.com/pushchain/push-chain-node/utils/rpc/evm" + // "github.com/pushchain/push-chain-node/utils/rpc" + // evmrpc "github.com/pushchain/push-chain-node/utils/rpc/evm" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" utxverifiertypes "github.com/pushchain/push-chain-node/x/utxverifier/types" ) @@ -44,16 +43,16 @@ func (k Keeper) verifyEVMAndGetFunds(ctx context.Context, ownerKey, txHash strin return nil, fmt.Errorf("tokens already minted for txHash %s on chain %s", txHash, chainConfig.Chain) } - rpcCfg := rpc.RpcCallConfig{ - PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), - PublicRPC: chainConfig.PublicRpcUrl, - } + // rpcCfg := rpc.RpcCallConfig{ + // PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), + // PublicRPC: chainConfig.PublicRpcUrl, + // } // Check for valid block confirmations - err = CheckEVMBlockConfirmations(ctx, txHash, rpcCfg, uint64(chainConfig.BlockConfirmation.FastInbound)) - if err != nil { - return nil, err - } + // err = CheckEVMBlockConfirmations(ctx, txHash, rpcCfg, uint64(chainConfig.BlockConfirmation.FastInbound)) + // if err != nil { + // return nil, err + // } // Mutate the original metadata metadata.Minted = true @@ -86,95 +85,95 @@ func (k Keeper) VerifyEVMInboundTx( } // If not found, perform verification - return k.EVMProcessUnverifiedInboundTx(ctx, ownerKey, txHash, chainConfig) + return nil, fmt.Errorf("removed rpc calls") } -func (k Keeper) EVMProcessUnverifiedInboundTx( - ctx context.Context, - ownerKey, txHash string, - chainConfig uregistrytypes.ChainConfig, -) (*utxverifiertypes.VerifiedTxMetadata, error) { - rpcCfg := rpc.RpcCallConfig{ - PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), - PublicRPC: chainConfig.PublicRpcUrl, - } - - // Step 1: Fetch transaction receipt - receipt, err := evmrpc.EVMGetTransactionReceipt(ctx, rpcCfg, txHash) - if err != nil { - return nil, fmt.Errorf("fetch receipt failed: %w", err) - } - - // Step 2: Fetch transaction details - tx, err := evmrpc.EVMGetTransactionByHash(ctx, rpcCfg, txHash) - if err != nil { - return nil, fmt.Errorf("failed to fetch transaction: %w", err) - } - - // Normalize addresses for comparison - from := NormalizeEVMAddress(receipt.From) - to := NormalizeEVMAddress(receipt.To) - expectedFrom := NormalizeEVMAddress(ownerKey) - expectedTo := NormalizeEVMAddress(chainConfig.GatewayAddress) - // fmt.Print(to) - // fmt.Print(expectedTo) - - // INPUT CHECKS - // Check 1: Verify if ownerKey is Valid From address - if !compareEVMAddr(from, expectedFrom) { - return nil, fmt.Errorf("transaction sender %s does not match ownerKey %s", tx.From, expectedFrom) - } - - // Check 2: Verify if tx.To is Valid gateway address - if !isValidEVMGateway(to, expectedTo) { - return nil, fmt.Errorf("transaction recipient %s is not gateway address %s", tx.To, expectedTo) - } - - // Check 3: Verify if transaction is calling addFunds method - // ok, selector := isEVMTxCallingAddFunds(tx.Input, chainConfig) - // if !ok { - // return nil, fmt.Errorf("transaction is not calling addFunds, expected selector %s but got input %s", selector, tx.Input) - // } - - // Step 3: Extract values from logs - eventTopic := "" - for _, method := range chainConfig.GatewayMethods { - if method.Name == uregistrytypes.GATEWAY_METHOD.EVM.AddFunds { - eventTopic = method.EventIdentifier - break - } - } - if eventTopic == "" { - return nil, fmt.Errorf("addFunds method not found in gateway methods") - } - - fundsAddedEventLogs, err := ParseEVMFundsAddedEventLogs(receipt.Logs, eventTopic) - if err != nil { - return nil, fmt.Errorf("amount extract failed: %w", err) - } - - // Collect all payload hashes - payloadHashes := make([]string, len(fundsAddedEventLogs)) - for i, log := range fundsAddedEventLogs { - payloadHashes[i] = log.PayloadHash - } - - metadata := utxverifiertypes.VerifiedTxMetadata{ - Minted: false, - PayloadHashes: payloadHashes, - UsdValue: &utxverifiertypes.USDValue{ - Amount: fundsAddedEventLogs[0].AmountInUSD.String(), - Decimals: fundsAddedEventLogs[0].Decimals, - }, - Sender: ownerKey, - } - - // Step 4: Store verified inbound tx in storage - err = k.StoreVerifiedInboundTx(ctx, chainConfig.Chain, txHash, metadata) - if err != nil { - return nil, err - } - - // Step 5: Return the metadata - return &metadata, nil -} +// func (k Keeper) EVMProcessUnverifiedInboundTx( +// ctx context.Context, +// ownerKey, txHash string, +// chainConfig uregistrytypes.ChainConfig, +// ) (*utxverifiertypes.VerifiedTxMetadata, error) { +// rpcCfg := rpc.RpcCallConfig{ +// PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), +// PublicRPC: chainConfig.PublicRpcUrl, +// } + +// // Step 1: Fetch transaction receipt +// receipt, err := evmrpc.EVMGetTransactionReceipt(ctx, rpcCfg, txHash) +// if err != nil { +// return nil, fmt.Errorf("fetch receipt failed: %w", err) +// } + +// // Step 2: Fetch transaction details +// tx, err := evmrpc.EVMGetTransactionByHash(ctx, rpcCfg, txHash) +// if err != nil { +// return nil, fmt.Errorf("failed to fetch transaction: %w", err) +// } + +// // Normalize addresses for comparison +// from := NormalizeEVMAddress(receipt.From) +// to := NormalizeEVMAddress(receipt.To) +// expectedFrom := NormalizeEVMAddress(ownerKey) +// expectedTo := NormalizeEVMAddress(chainConfig.GatewayAddress) +// // fmt.Print(to) +// // fmt.Print(expectedTo) + +// // INPUT CHECKS +// // Check 1: Verify if ownerKey is Valid From address +// if !compareEVMAddr(from, expectedFrom) { +// return nil, fmt.Errorf("transaction sender %s does not match ownerKey %s", tx.From, expectedFrom) +// } + +// // Check 2: Verify if tx.To is Valid gateway address +// if !isValidEVMGateway(to, expectedTo) { +// return nil, fmt.Errorf("transaction recipient %s is not gateway address %s", tx.To, expectedTo) +// } + +// // Check 3: Verify if transaction is calling addFunds method +// // ok, selector := isEVMTxCallingAddFunds(tx.Input, chainConfig) +// // if !ok { +// // return nil, fmt.Errorf("transaction is not calling addFunds, expected selector %s but got input %s", selector, tx.Input) +// // } + +// // Step 3: Extract values from logs +// eventTopic := "" +// for _, method := range chainConfig.GatewayMethods { +// if method.Name == uregistrytypes.GATEWAY_METHOD.EVM.AddFunds { +// eventTopic = method.EventIdentifier +// break +// } +// } +// if eventTopic == "" { +// return nil, fmt.Errorf("addFunds method not found in gateway methods") +// } + +// fundsAddedEventLogs, err := ParseEVMFundsAddedEventLogs(receipt.Logs, eventTopic) +// if err != nil { +// return nil, fmt.Errorf("amount extract failed: %w", err) +// } + +// // Collect all payload hashes +// payloadHashes := make([]string, len(fundsAddedEventLogs)) +// for i, log := range fundsAddedEventLogs { +// payloadHashes[i] = log.PayloadHash +// } + +// metadata := utxverifiertypes.VerifiedTxMetadata{ +// Minted: false, +// PayloadHashes: payloadHashes, +// UsdValue: &utxverifiertypes.USDValue{ +// Amount: fundsAddedEventLogs[0].AmountInUSD.String(), +// Decimals: fundsAddedEventLogs[0].Decimals, +// }, +// Sender: ownerKey, +// } + +// // Step 4: Store verified inbound tx in storage +// err = k.StoreVerifiedInboundTx(ctx, chainConfig.Chain, txHash, metadata) +// if err != nil { +// return nil, err +// } + +// // Step 5: Return the metadata +// return &metadata, nil +// } diff --git a/x/utxverifier/keeper/verify_tx_svm.go b/x/utxverifier/keeper/verify_tx_svm.go index db995b5a..afb673c3 100644 --- a/x/utxverifier/keeper/verify_tx_svm.go +++ b/x/utxverifier/keeper/verify_tx_svm.go @@ -2,12 +2,10 @@ package keeper import ( "context" - "encoding/hex" "fmt" - "github.com/pushchain/push-chain-node/utils" - "github.com/pushchain/push-chain-node/utils/rpc" - svmrpc "github.com/pushchain/push-chain-node/utils/rpc/svm" + // "github.com/pushchain/push-chain-node/utils/rpc" + // svmrpc "github.com/pushchain/push-chain-node/utils/rpc/svm" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" utxverifiertypes "github.com/pushchain/push-chain-node/x/utxverifier/types" ) @@ -33,45 +31,45 @@ func (k Keeper) verifySVMAndGetPayload(ctx context.Context, ownerKey, txHash str } // verifySVMAndGetFunds verifies transaction and extracts locked amount -func (k Keeper) verifySVMAndGetFunds(ctx context.Context, ownerKey, txHash string, chainConfig uregistrytypes.ChainConfig) (*utxverifiertypes.USDValue, error) { - // Fetch stored metadata - metadata, err := k.VerifySVMInboundTx(ctx, ownerKey, txHash, chainConfig) - if err != nil { - return nil, err - } - - // Check if already minted - if metadata.Minted { - return nil, fmt.Errorf("tokens already minted for txHash %s on chain %s", txHash, chainConfig.Chain) - } - - rpcCfg := rpc.RpcCallConfig{ - PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), - PublicRPC: chainConfig.PublicRpcUrl, - } - - txHashBase58, err := utxverifiertypes.NormalizeTxHash(txHash, chainConfig.VmType) - if err != nil { - return nil, fmt.Errorf("failed to normalize tx hash: %w", err) - } - - // Check for valid block confirmations - err = CheckSVMBlockConfirmations(ctx, txHashBase58, rpcCfg, uint64(chainConfig.BlockConfirmation.FastInbound)) - if err != nil { - return nil, err - } - - // Mutate the original metadata - metadata.Minted = true - - // Step 4: Mutate Minted to true in the stored metadata - err = k.StoreVerifiedInboundTx(ctx, chainConfig.Chain, txHash, *metadata) - if err != nil { - return nil, err - } - - return metadata.UsdValue, nil -} +// func (k Keeper) verifySVMAndGetFunds(ctx context.Context, ownerKey, txHash string, chainConfig uregistrytypes.ChainConfig) (*utxverifiertypes.USDValue, error) { +// // Fetch stored metadata +// metadata, err := k.VerifySVMInboundTx(ctx, ownerKey, txHash, chainConfig) +// if err != nil { +// return nil, err +// } + +// // Check if already minted +// if metadata.Minted { +// return nil, fmt.Errorf("tokens already minted for txHash %s on chain %s", txHash, chainConfig.Chain) +// } + +// // rpcCfg := rpc.RpcCallConfig{ +// // PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), +// // PublicRPC: chainConfig.PublicRpcUrl, +// // } + +// // txHashBase58, err := utxverifiertypes.NormalizeTxHash(txHash, chainConfig.VmType) +// // if err != nil { +// // return nil, fmt.Errorf("failed to normalize tx hash: %w", err) +// // } + +// // Check for valid block confirmations +// // err = CheckSVMBlockConfirmations(ctx, txHashBase58, rpcCfg, uint64(chainConfig.BlockConfirmation.FastInbound)) +// // if err != nil { +// // return nil, err +// // } + +// // Mutate the original metadata +// metadata.Minted = true + +// // Step 4: Mutate Minted to true in the stored metadata +// err = k.StoreVerifiedInboundTx(ctx, chainConfig.Chain, txHash, *metadata) +// if err != nil { +// return nil, err +// } + +// return metadata.UsdValue, nil +// } func (k Keeper) VerifySVMInboundTx( ctx context.Context, @@ -92,95 +90,95 @@ func (k Keeper) VerifySVMInboundTx( } // If not found, perform verification - return k.SVMProcessUnverifiedInboundTx(ctx, ownerKey, txHash, chainConfig) + return nil, fmt.Errorf("removed rpc calls") } -func (k Keeper) SVMProcessUnverifiedInboundTx( - ctx context.Context, - ownerKey, txHash string, - chainConfig uregistrytypes.ChainConfig, -) (*utxverifiertypes.VerifiedTxMetadata, error) { - rpcCfg := rpc.RpcCallConfig{ - PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), - PublicRPC: chainConfig.PublicRpcUrl, - } - - txHashBase58, err := utxverifiertypes.NormalizeTxHash(txHash, chainConfig.VmType) - if err != nil { - return nil, fmt.Errorf("failed to normalize tx hash: %w", err) - } - - // Step 1: Fetch transaction receipt - tx, err := svmrpc.SVMGetTransactionBySig(ctx, rpcCfg, txHashBase58) - if err != nil { - return nil, fmt.Errorf("failed to fetch transaction: %w", err) - } - - // Verify transaction status - if tx.Meta.Err != nil { - return nil, fmt.Errorf("transaction failed with error: %v", tx.Meta.Err) - } - - // Check 1: Check 1: Verify if ownerKey is Valid sender address - _, err = IsValidSVMSender(tx.Transaction.Message.AccountKeys, ownerKey) - if err != nil { - return nil, err - } - - // Verify program ID - if len(tx.Transaction.Message.Instructions) == 0 { - return nil, fmt.Errorf("no instructions found in transaction") - } - - // Check2: Check if any instruction calls the gateway contract - // err = IsValidSVMAddFundsInstruction(tx.Transaction.Message.Instructions, tx.Transaction.Message.AccountKeys, chainConfig) - // if err != nil { - // return nil, err - // } - - // Step 3: Parse logs for FundsAddedEvent - // Get the event discriminator from chain config - var eventDiscriminator []byte - for _, method := range chainConfig.GatewayMethods { - if method.Name == uregistrytypes.GATEWAY_METHOD.SVM.AddFunds { - eventDiscriminator, err = hex.DecodeString(method.EventIdentifier) - if err != nil { - return nil, fmt.Errorf("invalid event discriminator in chain config: %w", err) - } - break - } - } - if eventDiscriminator == nil { - return nil, fmt.Errorf("add_funds method not found in chain config") - } - - fundsAddedEventLogs, err := ParseSVMFundsAddedEventLog(tx.Meta.LogMessages, eventDiscriminator) - if err != nil { - return nil, fmt.Errorf("amount extract failed: %w", err) - } - - // Collect all payload hashes - payloadHashes := make([]string, len(fundsAddedEventLogs)) - for i, log := range fundsAddedEventLogs { - payloadHashes[i] = log.PayloadHash - } - - metadata := utxverifiertypes.VerifiedTxMetadata{ - Minted: false, - PayloadHashes: payloadHashes, - UsdValue: &utxverifiertypes.USDValue{ - Amount: fundsAddedEventLogs[0].AmountInUSD.String(), - Decimals: fundsAddedEventLogs[0].Decimals, - }, - Sender: ownerKey, - } - - // Step 4: Store verified inbound tx in storage - err = k.StoreVerifiedInboundTx(ctx, chainConfig.Chain, txHash, metadata) - if err != nil { - return nil, err - } - - // Step 5: Return the metadata - return &metadata, nil -} +// func (k Keeper) SVMProcessUnverifiedInboundTx( +// ctx context.Context, +// ownerKey, txHash string, +// chainConfig uregistrytypes.ChainConfig, +// ) (*utxverifiertypes.VerifiedTxMetadata, error) { +// rpcCfg := rpc.RpcCallConfig{ +// PrivateRPC: utils.GetEnvRPCOverride(chainConfig.Chain), +// PublicRPC: chainConfig.PublicRpcUrl, +// } + +// txHashBase58, err := utxverifiertypes.NormalizeTxHash(txHash, chainConfig.VmType) +// if err != nil { +// return nil, fmt.Errorf("failed to normalize tx hash: %w", err) +// } + +// // Step 1: Fetch transaction receipt +// tx, err := svmrpc.SVMGetTransactionBySig(ctx, rpcCfg, txHashBase58) +// if err != nil { +// return nil, fmt.Errorf("failed to fetch transaction: %w", err) +// } + +// // Verify transaction status +// if tx.Meta.Err != nil { +// return nil, fmt.Errorf("transaction failed with error: %v", tx.Meta.Err) +// } + +// // Check 1: Check 1: Verify if ownerKey is Valid sender address +// _, err = IsValidSVMSender(tx.Transaction.Message.AccountKeys, ownerKey) +// if err != nil { +// return nil, err +// } + +// // Verify program ID +// if len(tx.Transaction.Message.Instructions) == 0 { +// return nil, fmt.Errorf("no instructions found in transaction") +// } + +// // Check2: Check if any instruction calls the gateway contract +// // err = IsValidSVMAddFundsInstruction(tx.Transaction.Message.Instructions, tx.Transaction.Message.AccountKeys, chainConfig) +// // if err != nil { +// // return nil, err +// // } + +// // Step 3: Parse logs for FundsAddedEvent +// // Get the event discriminator from chain config +// var eventDiscriminator []byte +// for _, method := range chainConfig.GatewayMethods { +// if method.Name == uregistrytypes.GATEWAY_METHOD.SVM.AddFunds { +// eventDiscriminator, err = hex.DecodeString(method.EventIdentifier) +// if err != nil { +// return nil, fmt.Errorf("invalid event discriminator in chain config: %w", err) +// } +// break +// } +// } +// if eventDiscriminator == nil { +// return nil, fmt.Errorf("add_funds method not found in chain config") +// } + +// fundsAddedEventLogs, err := ParseSVMFundsAddedEventLog(tx.Meta.LogMessages, eventDiscriminator) +// if err != nil { +// return nil, fmt.Errorf("amount extract failed: %w", err) +// } + +// // Collect all payload hashes +// payloadHashes := make([]string, len(fundsAddedEventLogs)) +// for i, log := range fundsAddedEventLogs { +// payloadHashes[i] = log.PayloadHash +// } + +// metadata := utxverifiertypes.VerifiedTxMetadata{ +// Minted: false, +// PayloadHashes: payloadHashes, +// UsdValue: &utxverifiertypes.USDValue{ +// Amount: fundsAddedEventLogs[0].AmountInUSD.String(), +// Decimals: fundsAddedEventLogs[0].Decimals, +// }, +// Sender: ownerKey, +// } + +// // Step 4: Store verified inbound tx in storage +// err = k.StoreVerifiedInboundTx(ctx, chainConfig.Chain, txHash, metadata) +// if err != nil { +// return nil, err +// } + +// // Step 5: Return the metadata +// return &metadata, nil +// }