diff --git a/api/fx/gravity/crosschain/v1/types.pulsar.go b/api/fx/gravity/crosschain/v1/types.pulsar.go index 489a02d0..8b61077f 100644 --- a/api/fx/gravity/crosschain/v1/types.pulsar.go +++ b/api/fx/gravity/crosschain/v1/types.pulsar.go @@ -7686,6 +7686,698 @@ func (x *fastReflection_OutgoingBridgeCall) ProtoMethods() *protoiface.Methods { } } +var ( + md_QuoteInfo protoreflect.MessageDescriptor + fd_QuoteInfo_id protoreflect.FieldDescriptor + fd_QuoteInfo_token protoreflect.FieldDescriptor + fd_QuoteInfo_fee protoreflect.FieldDescriptor + fd_QuoteInfo_oracle protoreflect.FieldDescriptor + fd_QuoteInfo_gas_limit protoreflect.FieldDescriptor + fd_QuoteInfo_expiry protoreflect.FieldDescriptor +) + +func init() { + file_fx_gravity_crosschain_v1_types_proto_init() + md_QuoteInfo = File_fx_gravity_crosschain_v1_types_proto.Messages().ByName("QuoteInfo") + fd_QuoteInfo_id = md_QuoteInfo.Fields().ByName("id") + fd_QuoteInfo_token = md_QuoteInfo.Fields().ByName("token") + fd_QuoteInfo_fee = md_QuoteInfo.Fields().ByName("fee") + fd_QuoteInfo_oracle = md_QuoteInfo.Fields().ByName("oracle") + fd_QuoteInfo_gas_limit = md_QuoteInfo.Fields().ByName("gas_limit") + fd_QuoteInfo_expiry = md_QuoteInfo.Fields().ByName("expiry") +} + +var _ protoreflect.Message = (*fastReflection_QuoteInfo)(nil) + +type fastReflection_QuoteInfo QuoteInfo + +func (x *QuoteInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuoteInfo)(x) +} + +func (x *QuoteInfo) slowProtoReflect() protoreflect.Message { + mi := &file_fx_gravity_crosschain_v1_types_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuoteInfo_messageType fastReflection_QuoteInfo_messageType +var _ protoreflect.MessageType = fastReflection_QuoteInfo_messageType{} + +type fastReflection_QuoteInfo_messageType struct{} + +func (x fastReflection_QuoteInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuoteInfo)(nil) +} +func (x fastReflection_QuoteInfo_messageType) New() protoreflect.Message { + return new(fastReflection_QuoteInfo) +} +func (x fastReflection_QuoteInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuoteInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuoteInfo) Descriptor() protoreflect.MessageDescriptor { + return md_QuoteInfo +} + +// 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_QuoteInfo) Type() protoreflect.MessageType { + return _fastReflection_QuoteInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuoteInfo) New() protoreflect.Message { + return new(fastReflection_QuoteInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuoteInfo) Interface() protoreflect.ProtoMessage { + return (*QuoteInfo)(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_QuoteInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_QuoteInfo_id, value) { + return + } + } + if x.Token != "" { + value := protoreflect.ValueOfString(x.Token) + if !f(fd_QuoteInfo_token, value) { + return + } + } + if x.Fee != "" { + value := protoreflect.ValueOfString(x.Fee) + if !f(fd_QuoteInfo_fee, value) { + return + } + } + if x.Oracle != "" { + value := protoreflect.ValueOfString(x.Oracle) + if !f(fd_QuoteInfo_oracle, value) { + return + } + } + if x.GasLimit != uint64(0) { + value := protoreflect.ValueOfUint64(x.GasLimit) + if !f(fd_QuoteInfo_gas_limit, value) { + return + } + } + if x.Expiry != uint64(0) { + value := protoreflect.ValueOfUint64(x.Expiry) + if !f(fd_QuoteInfo_expiry, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuoteInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "fx.gravity.crosschain.v1.QuoteInfo.id": + return x.Id != uint64(0) + case "fx.gravity.crosschain.v1.QuoteInfo.token": + return x.Token != "" + case "fx.gravity.crosschain.v1.QuoteInfo.fee": + return x.Fee != "" + case "fx.gravity.crosschain.v1.QuoteInfo.oracle": + return x.Oracle != "" + case "fx.gravity.crosschain.v1.QuoteInfo.gas_limit": + return x.GasLimit != uint64(0) + case "fx.gravity.crosschain.v1.QuoteInfo.expiry": + return x.Expiry != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fx.gravity.crosschain.v1.QuoteInfo")) + } + panic(fmt.Errorf("message fx.gravity.crosschain.v1.QuoteInfo 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_QuoteInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "fx.gravity.crosschain.v1.QuoteInfo.id": + x.Id = uint64(0) + case "fx.gravity.crosschain.v1.QuoteInfo.token": + x.Token = "" + case "fx.gravity.crosschain.v1.QuoteInfo.fee": + x.Fee = "" + case "fx.gravity.crosschain.v1.QuoteInfo.oracle": + x.Oracle = "" + case "fx.gravity.crosschain.v1.QuoteInfo.gas_limit": + x.GasLimit = uint64(0) + case "fx.gravity.crosschain.v1.QuoteInfo.expiry": + x.Expiry = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fx.gravity.crosschain.v1.QuoteInfo")) + } + panic(fmt.Errorf("message fx.gravity.crosschain.v1.QuoteInfo 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_QuoteInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "fx.gravity.crosschain.v1.QuoteInfo.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "fx.gravity.crosschain.v1.QuoteInfo.token": + value := x.Token + return protoreflect.ValueOfString(value) + case "fx.gravity.crosschain.v1.QuoteInfo.fee": + value := x.Fee + return protoreflect.ValueOfString(value) + case "fx.gravity.crosschain.v1.QuoteInfo.oracle": + value := x.Oracle + return protoreflect.ValueOfString(value) + case "fx.gravity.crosschain.v1.QuoteInfo.gas_limit": + value := x.GasLimit + return protoreflect.ValueOfUint64(value) + case "fx.gravity.crosschain.v1.QuoteInfo.expiry": + value := x.Expiry + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fx.gravity.crosschain.v1.QuoteInfo")) + } + panic(fmt.Errorf("message fx.gravity.crosschain.v1.QuoteInfo 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_QuoteInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "fx.gravity.crosschain.v1.QuoteInfo.id": + x.Id = value.Uint() + case "fx.gravity.crosschain.v1.QuoteInfo.token": + x.Token = value.Interface().(string) + case "fx.gravity.crosschain.v1.QuoteInfo.fee": + x.Fee = value.Interface().(string) + case "fx.gravity.crosschain.v1.QuoteInfo.oracle": + x.Oracle = value.Interface().(string) + case "fx.gravity.crosschain.v1.QuoteInfo.gas_limit": + x.GasLimit = value.Uint() + case "fx.gravity.crosschain.v1.QuoteInfo.expiry": + x.Expiry = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fx.gravity.crosschain.v1.QuoteInfo")) + } + panic(fmt.Errorf("message fx.gravity.crosschain.v1.QuoteInfo 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_QuoteInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fx.gravity.crosschain.v1.QuoteInfo.id": + panic(fmt.Errorf("field id of message fx.gravity.crosschain.v1.QuoteInfo is not mutable")) + case "fx.gravity.crosschain.v1.QuoteInfo.token": + panic(fmt.Errorf("field token of message fx.gravity.crosschain.v1.QuoteInfo is not mutable")) + case "fx.gravity.crosschain.v1.QuoteInfo.fee": + panic(fmt.Errorf("field fee of message fx.gravity.crosschain.v1.QuoteInfo is not mutable")) + case "fx.gravity.crosschain.v1.QuoteInfo.oracle": + panic(fmt.Errorf("field oracle of message fx.gravity.crosschain.v1.QuoteInfo is not mutable")) + case "fx.gravity.crosschain.v1.QuoteInfo.gas_limit": + panic(fmt.Errorf("field gas_limit of message fx.gravity.crosschain.v1.QuoteInfo is not mutable")) + case "fx.gravity.crosschain.v1.QuoteInfo.expiry": + panic(fmt.Errorf("field expiry of message fx.gravity.crosschain.v1.QuoteInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fx.gravity.crosschain.v1.QuoteInfo")) + } + panic(fmt.Errorf("message fx.gravity.crosschain.v1.QuoteInfo 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_QuoteInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fx.gravity.crosschain.v1.QuoteInfo.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "fx.gravity.crosschain.v1.QuoteInfo.token": + return protoreflect.ValueOfString("") + case "fx.gravity.crosschain.v1.QuoteInfo.fee": + return protoreflect.ValueOfString("") + case "fx.gravity.crosschain.v1.QuoteInfo.oracle": + return protoreflect.ValueOfString("") + case "fx.gravity.crosschain.v1.QuoteInfo.gas_limit": + return protoreflect.ValueOfUint64(uint64(0)) + case "fx.gravity.crosschain.v1.QuoteInfo.expiry": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fx.gravity.crosschain.v1.QuoteInfo")) + } + panic(fmt.Errorf("message fx.gravity.crosschain.v1.QuoteInfo 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_QuoteInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fx.gravity.crosschain.v1.QuoteInfo", 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_QuoteInfo) 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_QuoteInfo) 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_QuoteInfo) 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_QuoteInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuoteInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.Token) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Fee) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Oracle) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GasLimit != 0 { + n += 1 + runtime.Sov(uint64(x.GasLimit)) + } + if x.Expiry != 0 { + n += 1 + runtime.Sov(uint64(x.Expiry)) + } + 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().(*QuoteInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Expiry != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Expiry)) + i-- + dAtA[i] = 0x30 + } + if x.GasLimit != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasLimit)) + i-- + dAtA[i] = 0x28 + } + if len(x.Oracle) > 0 { + i -= len(x.Oracle) + copy(dAtA[i:], x.Oracle) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Oracle))) + i-- + dAtA[i] = 0x22 + } + if len(x.Fee) > 0 { + i -= len(x.Fee) + copy(dAtA[i:], x.Fee) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fee))) + i-- + dAtA[i] = 0x1a + } + if len(x.Token) > 0 { + i -= len(x.Token) + copy(dAtA[i:], x.Token) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) + i-- + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuoteInfo) + 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: QuoteInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuoteInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fee", 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.Fee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Oracle", 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.Oracle = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + x.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + x.Expiry = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Expiry |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -8558,6 +9250,81 @@ func (x *OutgoingBridgeCall) GetEventNonce() uint64 { return 0 } +type QuoteInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Fee string `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` + Oracle string `protobuf:"bytes,4,opt,name=oracle,proto3" json:"oracle,omitempty"` + GasLimit uint64 `protobuf:"varint,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + Expiry uint64 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (x *QuoteInfo) Reset() { + *x = QuoteInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_fx_gravity_crosschain_v1_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuoteInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuoteInfo) ProtoMessage() {} + +// Deprecated: Use QuoteInfo.ProtoReflect.Descriptor instead. +func (*QuoteInfo) Descriptor() ([]byte, []int) { + return file_fx_gravity_crosschain_v1_types_proto_rawDescGZIP(), []int{11} +} + +func (x *QuoteInfo) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *QuoteInfo) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *QuoteInfo) GetFee() string { + if x != nil { + return x.Fee + } + return "" +} + +func (x *QuoteInfo) GetOracle() string { + if x != nil { + return x.Oracle + } + return "" +} + +func (x *QuoteInfo) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *QuoteInfo) GetExpiry() uint64 { + if x != nil { + return x.Expiry + } + return 0 +} + var File_fx_gravity_crosschain_v1_types_proto protoreflect.FileDescriptor var file_fx_gravity_crosschain_v1_types_proto_rawDesc = []byte{ @@ -8741,7 +9508,19 @@ var file_fx_gravity_crosschain_v1_types_proto_rawDesc = []byte{ 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x2a, 0xe8, 0x01, 0x0a, 0x09, 0x43, 0x6c, 0x61, 0x69, 0x6d, + 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3d, 0x0a, 0x03, 0x66, 0x65, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x2a, 0xe8, 0x01, 0x0a, 0x09, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, @@ -8787,7 +9566,7 @@ func file_fx_gravity_crosschain_v1_types_proto_rawDescGZIP() []byte { } var file_fx_gravity_crosschain_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_fx_gravity_crosschain_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_fx_gravity_crosschain_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_fx_gravity_crosschain_v1_types_proto_goTypes = []interface{}{ (ClaimType)(0), // 0: fx.gravity.crosschain.v1.ClaimType (*ProposalOracle)(nil), // 1: fx.gravity.crosschain.v1.ProposalOracle @@ -8801,16 +9580,17 @@ var file_fx_gravity_crosschain_v1_types_proto_goTypes = []interface{}{ (*ERC20Token)(nil), // 9: fx.gravity.crosschain.v1.ERC20Token (*Params)(nil), // 10: fx.gravity.crosschain.v1.Params (*OutgoingBridgeCall)(nil), // 11: fx.gravity.crosschain.v1.OutgoingBridgeCall - (*anypb.Any)(nil), // 12: google.protobuf.Any - (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin + (*QuoteInfo)(nil), // 12: fx.gravity.crosschain.v1.QuoteInfo + (*anypb.Any)(nil), // 13: google.protobuf.Any + (*v1beta1.Coin)(nil), // 14: cosmos.base.v1beta1.Coin } var file_fx_gravity_crosschain_v1_types_proto_depIdxs = []int32{ 3, // 0: fx.gravity.crosschain.v1.OracleSet.members:type_name -> fx.gravity.crosschain.v1.BridgeValidator - 12, // 1: fx.gravity.crosschain.v1.Attestation.claim:type_name -> google.protobuf.Any + 13, // 1: fx.gravity.crosschain.v1.Attestation.claim:type_name -> google.protobuf.Any 8, // 2: fx.gravity.crosschain.v1.OutgoingTxBatch.transactions:type_name -> fx.gravity.crosschain.v1.OutgoingTransferTx 9, // 3: fx.gravity.crosschain.v1.OutgoingTransferTx.token:type_name -> fx.gravity.crosschain.v1.ERC20Token 9, // 4: fx.gravity.crosschain.v1.OutgoingTransferTx.fee:type_name -> fx.gravity.crosschain.v1.ERC20Token - 13, // 5: fx.gravity.crosschain.v1.Params.delegate_threshold:type_name -> cosmos.base.v1beta1.Coin + 14, // 5: fx.gravity.crosschain.v1.Params.delegate_threshold:type_name -> cosmos.base.v1beta1.Coin 9, // 6: fx.gravity.crosschain.v1.OutgoingBridgeCall.tokens:type_name -> fx.gravity.crosschain.v1.ERC20Token 7, // [7:7] is the sub-list for method output_type 7, // [7:7] is the sub-list for method input_type @@ -8957,6 +9737,18 @@ func file_fx_gravity_crosschain_v1_types_proto_init() { return nil } } + file_fx_gravity_crosschain_v1_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuoteInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -8964,7 +9756,7 @@ func file_fx_gravity_crosschain_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_fx_gravity_crosschain_v1_types_proto_rawDesc, NumEnums: 1, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/fx/gravity/crosschain/v1/types.proto b/proto/fx/gravity/crosschain/v1/types.proto index 3a1f8233..378a9d89 100644 --- a/proto/fx/gravity/crosschain/v1/types.proto +++ b/proto/fx/gravity/crosschain/v1/types.proto @@ -205,3 +205,16 @@ message OutgoingBridgeCall { uint64 block_height = 9; uint64 event_nonce = 10; } + +message QuoteInfo { + uint64 id = 1; + string token = 2; + string fee = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + string oracle = 4; + uint64 gas_limit = 5; + uint64 expiry = 6; +} \ No newline at end of file diff --git a/x/crosschain/keeper/abci.go b/x/crosschain/keeper/abci.go index 5d53148f..b42bdfc9 100644 --- a/x/crosschain/keeper/abci.go +++ b/x/crosschain/keeper/abci.go @@ -168,15 +168,15 @@ func (k Keeper) cleanupTimeOutBridgeCall(ctx sdk.Context) (err error) { return true } - quoteId := k.GetOutgoingBridgeCallQuoteId(ctx, data.Nonce) - if quoteId == nil || quoteId.Sign() == 0 { + quoteInfo, found := k.GetOutgoingBridgeCallQuoteInfo(ctx, data.Nonce) + if !found { // 1. handler bridge call refund if err = k.RefundOutgoingBridgeCall(ctx, data); err != nil { return true } } else { // 1. resend bridge call - if err = k.ResendBridgeCall(ctx, *data, quoteId); err != nil { + if err = k.ResendBridgeCall(ctx, *data, quoteInfo); err != nil { return true } } diff --git a/x/crosschain/keeper/bridge_call_out.go b/x/crosschain/keeper/bridge_call_out.go index 52a17980..a2bd0911 100644 --- a/x/crosschain/keeper/bridge_call_out.go +++ b/x/crosschain/keeper/bridge_call_out.go @@ -362,59 +362,56 @@ func (k Keeper) handleBridgeCallQuote(ctx sdk.Context, from common.Address, brid if quoteId == nil || quoteId.Sign() <= 0 { return nil } - quoteInfo, err := k.brideFeeQuoteKeeper.GetQuoteById(ctx, quoteId) + contractQuote, err := k.brideFeeQuoteKeeper.GetQuoteById(ctx, quoteId) if err != nil { return err } - if quoteInfo.IsTimeout(ctx.BlockTime()) { + if contractQuote.IsTimeout(ctx.BlockTime()) { return types.ErrInvalid.Wrapf("quote is timeout") } // transfer fee to module - bridgeToken, err := k.erc20Keeper.GetBridgeToken(ctx, k.moduleName, quoteInfo.TokenName) + bridgeToken, err := k.erc20Keeper.GetBridgeToken(ctx, k.moduleName, contractQuote.TokenName) if err != nil { return err } if bridgeToken.IsOrigin() { - fees := sdk.NewCoins(sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewIntFromBigInt(quoteInfo.Fee))) + fees := sdk.NewCoins(sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewIntFromBigInt(contractQuote.Fee))) if err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from.Bytes(), k.moduleName, fees); err != nil { return err } } else { - if _, err = k.erc20TokenKeeper.Transfer(ctx, bridgeToken.GetContractAddress(), from, k.GetModuleEvmAddress(), quoteInfo.Fee); err != nil { + if _, err = k.erc20TokenKeeper.Transfer(ctx, bridgeToken.GetContractAddress(), from, k.GetModuleEvmAddress(), contractQuote.Fee); err != nil { return err } } - k.SetOutgoingBridgeCallQuoteId(ctx, bridgeCallNonce, quoteId) + k.SetOutgoingBridgeCallQuoteInfo(ctx, bridgeCallNonce, types.NewQuoteInfo(contractQuote)) return nil } func (k Keeper) TransferQuoteFeeToRelayer(ctx sdk.Context, bridgeCallNonce uint64) error { - quoteId := k.GetOutgoingBridgeCallQuoteId(ctx, bridgeCallNonce) - if quoteId.Sign() <= 0 { + quoteInfo, found := k.GetOutgoingBridgeCallQuoteInfo(ctx, bridgeCallNonce) + if !found { return nil } - k.DeleteOutgoingBridgeCallQuoteId(ctx, bridgeCallNonce) + k.DeleteOutgoingBridgeCallQuoteInfo(ctx, bridgeCallNonce) - quoteInfo, err := k.brideFeeQuoteKeeper.GetQuoteById(ctx, quoteId) - if err != nil { - return err - } - bridgeToken, err := k.erc20Keeper.GetBridgeToken(ctx, k.moduleName, quoteInfo.TokenName) + bridgeToken, err := k.erc20Keeper.GetBridgeToken(ctx, k.moduleName, quoteInfo.Token) if err != nil { return err } + quoteOracle := quoteInfo.OracleAddress() if bridgeToken.IsOrigin() { - fees := sdk.NewCoins(sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewIntFromBigInt(quoteInfo.Fee))) - if err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, k.moduleName, quoteInfo.Oracle.Bytes(), fees); err != nil { + fees := sdk.NewCoins(sdk.NewCoin(fxtypes.DefaultDenom, quoteInfo.Fee)) + if err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, k.moduleName, quoteOracle.Bytes(), fees); err != nil { return err } } else { - if _, err = k.erc20TokenKeeper.Transfer(ctx, bridgeToken.GetContractAddress(), k.GetModuleEvmAddress(), quoteInfo.Oracle, quoteInfo.Fee); err != nil { + if _, err = k.erc20TokenKeeper.Transfer(ctx, bridgeToken.GetContractAddress(), k.GetModuleEvmAddress(), quoteOracle, quoteInfo.Fee.BigInt()); err != nil { return err } } @@ -422,36 +419,43 @@ func (k Keeper) TransferQuoteFeeToRelayer(ctx sdk.Context, bridgeCallNonce uint6 return nil } -func (k Keeper) SetOutgoingBridgeCallQuoteId(ctx sdk.Context, nonce uint64, quoteId *big.Int) { +func (k Keeper) SetOutgoingBridgeCallQuoteInfo(ctx sdk.Context, nonce uint64, quoteInfo types.QuoteInfo) { store := ctx.KVStore(k.storeKey) - store.Set(types.GetBridgeCallQuoteKey(nonce), sdk.Uint64ToBigEndian(quoteId.Uint64())) + store.Set(types.GetBridgeCallQuoteKey(nonce), k.cdc.MustMarshal("eInfo)) } -func (k Keeper) GetOutgoingBridgeCallQuoteId(ctx sdk.Context, nonce uint64) *big.Int { +func (k Keeper) GetOutgoingBridgeCallQuoteInfo(ctx sdk.Context, nonce uint64) (types.QuoteInfo, bool) { store := ctx.KVStore(k.storeKey) - return new(big.Int).SetUint64(sdk.BigEndianToUint64(store.Get(types.GetBridgeCallQuoteKey(nonce)))) + bz := store.Get(types.GetBridgeCallQuoteKey(nonce)) + if bz == nil { + return types.QuoteInfo{}, false + } + + quoteInfo := types.QuoteInfo{} + k.cdc.MustUnmarshal(bz, "eInfo) + return quoteInfo, true } -func (k Keeper) DeleteOutgoingBridgeCallQuoteId(ctx sdk.Context, nonce uint64) { +func (k Keeper) DeleteOutgoingBridgeCallQuoteInfo(ctx sdk.Context, nonce uint64) { store := ctx.KVStore(k.storeKey) store.Delete(types.GetBridgeCallQuoteKey(nonce)) } -func (k Keeper) ResendBridgeCall(ctx sdk.Context, bridgeCall types.OutgoingBridgeCall, quoteId *big.Int) error { +func (k Keeper) ResendBridgeCall(ctx sdk.Context, bridgeCall types.OutgoingBridgeCall, quoteInfo types.QuoteInfo) error { bridgeCallTimeout := k.CalExternalTimeoutHeight(ctx, GetBridgeCallTimeout) if bridgeCallTimeout <= 0 { return types.ErrInvalid.Wrapf("bridge call timeout height") } oldBridgeCallNonce := bridgeCall.Nonce - k.DeleteOutgoingBridgeCallQuoteId(ctx, oldBridgeCallNonce) + k.DeleteOutgoingBridgeCallQuoteInfo(ctx, oldBridgeCallNonce) newBridgeCallNonce := k.autoIncrementID(ctx, types.KeyLastBridgeCallID) bridgeCall.Nonce = newBridgeCallNonce bridgeCall.Timeout = bridgeCallTimeout k.SetOutgoingBridgeCall(ctx, &bridgeCall) - k.SetOutgoingBridgeCallQuoteId(ctx, newBridgeCallNonce, quoteId) + k.SetOutgoingBridgeCallQuoteInfo(ctx, newBridgeCallNonce, quoteInfo) ctx.EventManager().EmitEvent(sdk.NewEvent(types.EventTypeBridgeCallResend, sdk.NewAttribute(types.AttributeKeyBridgeCallResendOldNonce, fmt.Sprintf("%d", oldBridgeCallNonce)), diff --git a/x/crosschain/types/types.go b/x/crosschain/types/types.go index 03b89266..d70badc6 100644 --- a/x/crosschain/types/types.go +++ b/x/crosschain/types/types.go @@ -507,3 +507,18 @@ func NewOriginTokenKey(moduleName string, id uint64) string { func NewIBCTransferKey(ibcChannel string, ibcSequence uint64) string { return fmt.Sprintf("%s/%d", ibcChannel, ibcSequence) } + +func NewQuoteInfo(quote contract.IBridgeFeeQuoteQuoteInfo) QuoteInfo { + return QuoteInfo{ + Id: quote.Id.Uint64(), + Token: quote.TokenName, + Fee: sdkmath.NewIntFromBigInt(quote.Fee), + Oracle: quote.Oracle.Hex(), + GasLimit: quote.GasLimit.Uint64(), + Expiry: quote.Expiry.Uint64(), + } +} + +func (q QuoteInfo) OracleAddress() gethcommon.Address { + return gethcommon.HexToAddress(q.Oracle) +} diff --git a/x/crosschain/types/types.pb.go b/x/crosschain/types/types.pb.go index aaef54c5..75d1aca8 100644 --- a/x/crosschain/types/types.pb.go +++ b/x/crosschain/types/types.pb.go @@ -936,6 +936,83 @@ func (m *OutgoingBridgeCall) GetEventNonce() uint64 { return 0 } +type QuoteInfo struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Fee cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=fee,proto3,customtype=cosmossdk.io/math.Int" json:"fee"` + Oracle string `protobuf:"bytes,4,opt,name=oracle,proto3" json:"oracle,omitempty"` + GasLimit uint64 `protobuf:"varint,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + Expiry uint64 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (m *QuoteInfo) Reset() { *m = QuoteInfo{} } +func (m *QuoteInfo) String() string { return proto.CompactTextString(m) } +func (*QuoteInfo) ProtoMessage() {} +func (*QuoteInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_83d601f55c9df9b7, []int{11} +} +func (m *QuoteInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuoteInfo.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 *QuoteInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuoteInfo.Merge(m, src) +} +func (m *QuoteInfo) XXX_Size() int { + return m.Size() +} +func (m *QuoteInfo) XXX_DiscardUnknown() { + xxx_messageInfo_QuoteInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_QuoteInfo proto.InternalMessageInfo + +func (m *QuoteInfo) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *QuoteInfo) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *QuoteInfo) GetOracle() string { + if m != nil { + return m.Oracle + } + return "" +} + +func (m *QuoteInfo) GetGasLimit() uint64 { + if m != nil { + return m.GasLimit + } + return 0 +} + +func (m *QuoteInfo) GetExpiry() uint64 { + if m != nil { + return m.Expiry + } + return 0 +} + func init() { proto.RegisterEnum("fx.gravity.crosschain.v1.ClaimType", ClaimType_name, ClaimType_value) proto.RegisterType((*ProposalOracle)(nil), "fx.gravity.crosschain.v1.ProposalOracle") @@ -949,6 +1026,7 @@ func init() { proto.RegisterType((*ERC20Token)(nil), "fx.gravity.crosschain.v1.ERC20Token") proto.RegisterType((*Params)(nil), "fx.gravity.crosschain.v1.Params") proto.RegisterType((*OutgoingBridgeCall)(nil), "fx.gravity.crosschain.v1.OutgoingBridgeCall") + proto.RegisterType((*QuoteInfo)(nil), "fx.gravity.crosschain.v1.QuoteInfo") } func init() { @@ -956,101 +1034,105 @@ func init() { } var fileDescriptor_83d601f55c9df9b7 = []byte{ - // 1499 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4b, 0x6f, 0x1b, 0x47, - 0x12, 0x16, 0x29, 0x8a, 0x12, 0x8b, 0x7a, 0xd0, 0x6d, 0x49, 0xa6, 0x24, 0x98, 0x92, 0x68, 0xef, - 0xae, 0xfc, 0x1a, 0xae, 0xb4, 0x7b, 0x58, 0xec, 0x03, 0x58, 0xbe, 0xec, 0x25, 0x96, 0x96, 0x88, - 0xd1, 0x28, 0x71, 0x72, 0x19, 0x34, 0x67, 0x9a, 0xc3, 0x81, 0x87, 0xdd, 0xc4, 0x4c, 0x93, 0xa6, - 0x6e, 0x01, 0x62, 0x20, 0x39, 0xe6, 0x1f, 0xe4, 0x90, 0xbf, 0xe0, 0x1f, 0xe1, 0xa3, 0x91, 0x53, - 0x10, 0x04, 0x4e, 0x60, 0xe7, 0x90, 0x9f, 0x11, 0xf4, 0x63, 0xc8, 0x91, 0x64, 0x1d, 0x9c, 0x5b, - 0xd7, 0x57, 0x5f, 0x55, 0x77, 0x57, 0xd7, 0x63, 0x06, 0xee, 0xf6, 0x26, 0x15, 0x2f, 0xc4, 0x63, - 0x9f, 0x9f, 0x57, 0x9c, 0x90, 0x45, 0x91, 0xd3, 0xc7, 0x3e, 0xad, 0x8c, 0x0f, 0x2b, 0xfc, 0x7c, - 0x48, 0x22, 0x63, 0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 0x9b, 0xa7, 0x67, 0x6d, 0xab, 0x90, 0xdd, 0xce, 0x7c, 0xfd, 0x5d, 0x69, 0xae, 0xd6, - 0x7a, 0xfd, 0xae, 0x94, 0x7a, 0xf3, 0xae, 0x94, 0xfa, 0xe5, 0x5d, 0x29, 0xf5, 0xcd, 0xfb, 0xd2, - 0xdc, 0x9b, 0xf7, 0xa5, 0xb9, 0x1f, 0xde, 0x97, 0xe6, 0x3e, 0xaf, 0x78, 0x3e, 0xef, 0x8f, 0xba, - 0x86, 0xc3, 0x06, 0x95, 0xde, 0x88, 0xca, 0x36, 0x35, 0xa9, 0xf4, 0x26, 0x8f, 0x1c, 0x16, 0x92, - 0xca, 0x24, 0xf9, 0x7b, 0x21, 0xff, 0x2d, 0xba, 0x59, 0xf9, 0xf9, 0xf1, 0xb7, 0xdf, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x8f, 0x46, 0x41, 0x3d, 0x84, 0x0c, 0x00, 0x00, + // 1557 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcb, 0x6f, 0x1b, 0x45, + 0x18, 0xcf, 0xda, 0x8e, 0x13, 0x7f, 0xce, 0xc3, 0x9d, 0x26, 0xa9, 0x93, 0xa8, 0x4e, 0xe2, 0x16, + 0x48, 0x5f, 0x6b, 0x12, 0x38, 0x20, 0xa0, 0x12, 0x7e, 0xb5, 0x58, 0xb8, 0x89, 0xd9, 0x6c, 0xa0, + 0x70, 0x59, 0x8d, 0x77, 0xc7, 0xeb, 0x55, 0xd7, 0x3b, 0xd6, 0xee, 0xd8, 0x75, 0x6e, 0x48, 0x54, + 0x82, 0x23, 0xff, 0x01, 0x07, 0xfe, 0x85, 0x5e, 0xb9, 0xf7, 0x58, 0x71, 0x42, 0x08, 0x15, 0xd4, + 0x72, 0xe0, 0xcf, 0x40, 0xf3, 0x58, 0xdb, 0x49, 0x9a, 0x43, 0xb8,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, 0xff, 0x07, 0x75, 0x3d, + 0xb2, 0x44, 0x0d, 0x00, 0x00, } func (m *ProposalOracle) Marshal() (dAtA []byte, err error) { @@ -1729,6 +1811,68 @@ func (m *OutgoingBridgeCall) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QuoteInfo) 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 *QuoteInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Expiry != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Expiry)) + i-- + dAtA[i] = 0x30 + } + if m.GasLimit != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x28 + } + if len(m.Oracle) > 0 { + i -= len(m.Oracle) + copy(dAtA[i:], m.Oracle) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Oracle))) + i-- + dAtA[i] = 0x22 + } + { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -2041,6 +2185,34 @@ func (m *OutgoingBridgeCall) Size() (n int) { return n } +func (m *QuoteInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovTypes(uint64(m.Id)) + } + l = len(m.Token) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Fee.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Oracle) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTypes(uint64(m.GasLimit)) + } + if m.Expiry != 0 { + n += 1 + sovTypes(uint64(m.Expiry)) + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4112,6 +4284,211 @@ func (m *OutgoingBridgeCall) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuoteInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuoteInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuoteInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Oracle", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Oracle = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + m.Expiry = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Expiry |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0