diff --git a/proto/dymensionxyz/dymension/eibc/events.proto b/proto/dymensionxyz/dymension/eibc/events.proto index bbca04eb8..880b41cad 100644 --- a/proto/dymensionxyz/dymension/eibc/events.proto +++ b/proto/dymensionxyz/dymension/eibc/events.proto @@ -106,3 +106,16 @@ message EventDemandOrderFulfilledAuthorized { // operator_fee is the fee of the operator. string operator_fee = 14; } + +message EventDemandOrderDeleted { + // order_id is the unique identifier of the demand order. + string order_id = 1; + // packet_key is the base64 encoded key of the packet. + string packet_key = 2; + // packet_status is the status of the packet. + string packet_status = 3; + // rollapp_id is the id of the rollapp. + string rollapp_id = 4; + // packet_type is the type of the packet. + string packet_type = 5; +} diff --git a/x/eibc/keeper/hooks.go b/x/eibc/keeper/hooks.go index 2adb763ed..96ec6bd22 100644 --- a/x/eibc/keeper/hooks.go +++ b/x/eibc/keeper/hooks.go @@ -4,6 +4,7 @@ import ( "errors" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/dymensionxyz/sdk-utils/utils/uevent" commontypes "github.com/dymensionxyz/dymension/v3/x/common/types" delayeacktypes "github.com/dymensionxyz/dymension/v3/x/delayedack/types" @@ -68,5 +69,15 @@ func (d delayedAckHooks) AfterPacketDeleted(ctx sdk.Context, rollappPacket *comm statuses := []commontypes.Status{commontypes.Status_PENDING, commontypes.Status_FINALIZED} for _, status := range statuses { d.deleteDemandOrder(ctx, status, demandOrderID) + + if err := uevent.EmitTypedEvent(ctx, &types.EventDemandOrderDeleted{ + OrderId: demandOrderID, + PacketKey: string(packetKey), + PacketStatus: status.String(), + RollappId: rollappPacket.RollappId, + PacketType: rollappPacket.Type.String(), + }); err != nil { + d.Logger(ctx).Error("emit event", "error", err) + } } } diff --git a/x/eibc/types/events.pb.go b/x/eibc/types/events.pb.go index fdde93146..6175c9305 100644 --- a/x/eibc/types/events.pb.go +++ b/x/eibc/types/events.pb.go @@ -562,12 +562,94 @@ func (m *EventDemandOrderFulfilledAuthorized) GetOperatorFee() string { return "" } +type EventDemandOrderDeleted struct { + // order_id is the unique identifier of the demand order. + OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + // packet_key is the base64 encoded key of the packet. + PacketKey string `protobuf:"bytes,2,opt,name=packet_key,json=packetKey,proto3" json:"packet_key,omitempty"` + // packet_status is the status of the packet. + PacketStatus string `protobuf:"bytes,3,opt,name=packet_status,json=packetStatus,proto3" json:"packet_status,omitempty"` + // rollapp_id is the id of the rollapp. + RollappId string `protobuf:"bytes,4,opt,name=rollapp_id,json=rollappId,proto3" json:"rollapp_id,omitempty"` + // packet_type is the type of the packet. + PacketType string `protobuf:"bytes,5,opt,name=packet_type,json=packetType,proto3" json:"packet_type,omitempty"` +} + +func (m *EventDemandOrderDeleted) Reset() { *m = EventDemandOrderDeleted{} } +func (m *EventDemandOrderDeleted) String() string { return proto.CompactTextString(m) } +func (*EventDemandOrderDeleted) ProtoMessage() {} +func (*EventDemandOrderDeleted) Descriptor() ([]byte, []int) { + return fileDescriptor_87abe4479c806cf7, []int{5} +} +func (m *EventDemandOrderDeleted) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDemandOrderDeleted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDemandOrderDeleted.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 *EventDemandOrderDeleted) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDemandOrderDeleted.Merge(m, src) +} +func (m *EventDemandOrderDeleted) XXX_Size() int { + return m.Size() +} +func (m *EventDemandOrderDeleted) XXX_DiscardUnknown() { + xxx_messageInfo_EventDemandOrderDeleted.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDemandOrderDeleted proto.InternalMessageInfo + +func (m *EventDemandOrderDeleted) GetOrderId() string { + if m != nil { + return m.OrderId + } + return "" +} + +func (m *EventDemandOrderDeleted) GetPacketKey() string { + if m != nil { + return m.PacketKey + } + return "" +} + +func (m *EventDemandOrderDeleted) GetPacketStatus() string { + if m != nil { + return m.PacketStatus + } + return "" +} + +func (m *EventDemandOrderDeleted) GetRollappId() string { + if m != nil { + return m.RollappId + } + return "" +} + +func (m *EventDemandOrderDeleted) GetPacketType() string { + if m != nil { + return m.PacketType + } + return "" +} + func init() { proto.RegisterType((*EventDemandOrderCreated)(nil), "dymensionxyz.dymension.eibc.EventDemandOrderCreated") proto.RegisterType((*EventDemandOrderPacketStatusUpdated)(nil), "dymensionxyz.dymension.eibc.EventDemandOrderPacketStatusUpdated") proto.RegisterType((*EventDemandOrderFeeUpdated)(nil), "dymensionxyz.dymension.eibc.EventDemandOrderFeeUpdated") proto.RegisterType((*EventDemandOrderFulfilled)(nil), "dymensionxyz.dymension.eibc.EventDemandOrderFulfilled") proto.RegisterType((*EventDemandOrderFulfilledAuthorized)(nil), "dymensionxyz.dymension.eibc.EventDemandOrderFulfilledAuthorized") + proto.RegisterType((*EventDemandOrderDeleted)(nil), "dymensionxyz.dymension.eibc.EventDemandOrderDeleted") } func init() { @@ -575,47 +657,49 @@ func init() { } var fileDescriptor_87abe4479c806cf7 = []byte{ - // 633 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcf, 0x52, 0x13, 0x4f, - 0x10, 0x66, 0x09, 0xe4, 0x4f, 0x27, 0xfc, 0xf9, 0x4d, 0x51, 0x3f, 0x96, 0x08, 0x11, 0x42, 0x51, - 0x46, 0x0f, 0xd9, 0x52, 0x9e, 0x00, 0xd4, 0x94, 0x14, 0x07, 0x35, 0xea, 0xc5, 0xcb, 0xd6, 0x92, - 0xe9, 0x24, 0x53, 0x6c, 0x76, 0xa6, 0x66, 0x27, 0x40, 0xb8, 0x7b, 0xf7, 0x69, 0x7c, 0x06, 0x8f, - 0x1c, 0x3d, 0x52, 0x50, 0xbc, 0x87, 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 0xf8, 0xee, 0xcf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x7a, 0xa7, 0x80, 0xd9, 0x82, 0x06, 0x00, 0x00, + // 665 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0xcd, 0x4e, 0xdb, 0x40, + 0x10, 0xc6, 0xf9, 0xcf, 0x24, 0xfc, 0xd4, 0x42, 0xc5, 0xa4, 0x90, 0x42, 0x10, 0x6a, 0xda, 0x43, + 0xac, 0x96, 0x27, 0x80, 0xd2, 0xa8, 0x88, 0x43, 0xdb, 0xb4, 0xbd, 0xf4, 0x62, 0x99, 0x78, 0x92, + 0xac, 0x70, 0xbc, 0xab, 0xf5, 0x06, 0x08, 0xf7, 0xde, 0xfb, 0x34, 0x55, 0x1f, 0xa1, 0x47, 0x8e, + 0x3d, 0x22, 0x10, 0xef, 0x51, 0xed, 0xae, 0x1d, 0x12, 0x07, 0x48, 0x55, 0xf5, 0xd4, 0x9b, 0xf7, + 0x9b, 0xcf, 0xb3, 0xb3, 0xf3, 0x7d, 0xb3, 0x0b, 0x75, 0x6f, 0xd8, 0xc7, 0x20, 0x24, 0x34, 0x38, + 0x1b, 0x9e, 0xdb, 0xa3, 0x85, 0x8d, 0xe4, 0xa8, 0x6d, 0xe3, 0x09, 0x06, 0x22, 0x6c, 0x30, 0x4e, + 0x05, 0x35, 0x9f, 0x8c, 0x33, 0x1b, 0xa3, 0x45, 0x43, 0x32, 0x2b, 0xcb, 0x5d, 0xda, 0xa5, 0x8a, + 0x67, 0xcb, 0x2f, 0xfd, 0x4b, 0xe5, 0xc5, 0x3d, 0xc9, 0xdb, 0xb4, 0xdf, 0xa7, 0x81, 0x1d, 0x0a, + 0x57, 0x0c, 0xa2, 0xf4, 0x95, 0xc6, 0x43, 0x85, 0x78, 0xd8, 0x77, 0x03, 0xcf, 0xa1, 0xdc, 0x43, + 0xae, 0xf9, 0xb5, 0xcb, 0x14, 0xac, 0xbc, 0x91, 0xf5, 0xed, 0xab, 0xd8, 0x3b, 0x19, 0x7a, 0xcd, + 0xd1, 0x15, 0xe8, 0x99, 0xab, 0x50, 0x50, 0x54, 0x87, 0x78, 0x96, 0xb1, 0x61, 0xd4, 0x8b, 0xad, + 0xbc, 0x5a, 0x1f, 0x78, 0xe6, 0x32, 0x64, 0x19, 0x27, 0x6d, 0xb4, 0x52, 0x0a, 0xd7, 0x0b, 0x73, + 0x09, 0xd2, 0x1d, 0x44, 0x2b, 0xad, 0x30, 0xf9, 0x69, 0x6e, 0x43, 0x99, 0x84, 0x4e, 0x67, 0xe0, + 0x77, 0x88, 0xef, 0xa3, 0x67, 0x65, 0x36, 0x8c, 0x7a, 0x61, 0x2f, 0x65, 0x19, 0xad, 0x12, 0x09, + 0x9b, 0x31, 0x6c, 0x6e, 0xc1, 0x3c, 0x73, 0xdb, 0xc7, 0x28, 0x1c, 0x7d, 0x18, 0x2b, 0xab, 0x52, + 0x94, 0x35, 0xf8, 0x51, 0x61, 0xe6, 0x3a, 0x40, 0x44, 0x3a, 0xc6, 0xa1, 0x95, 0x53, 0x8c, 0xa2, + 0x46, 0x0e, 0x71, 0x28, 0xc3, 0x9c, 0xfa, 0xbe, 0xcb, 0x98, 0xac, 0x37, 0xaf, 0xc3, 0x11, 0x72, + 0xe0, 0x99, 0x6b, 0x50, 0xe4, 0xd8, 0x26, 0x8c, 0x60, 0x20, 0xac, 0x42, 0x14, 0x8d, 0x01, 0xf3, + 0x29, 0x94, 0xa2, 0xdc, 0x62, 0xc8, 0xd0, 0x2a, 0xaa, 0x78, 0xb4, 0xdd, 0xa7, 0x21, 0x43, 0x73, + 0x13, 0xca, 0x8c, 0x53, 0xda, 0x71, 0x7a, 0x48, 0xba, 0x3d, 0x61, 0xc1, 0x86, 0x51, 0xcf, 0xb4, + 0x4a, 0x0a, 0x7b, 0xab, 0x20, 0xf3, 0x31, 0xe4, 0xdc, 0x3e, 0x1d, 0x04, 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0x8e, 0x61, 0x68, 0x95, 0xf5, 0x46, 0x3e, 0xdb, 0xd5, 0x80, 0xf9, 0x1c, 0x96, 0x28, 0x43, 0xee, + 0x0a, 0xca, 0x47, 0xa4, 0x79, 0x45, 0x5a, 0x8c, 0xf1, 0x98, 0xba, 0x09, 0xe5, 0x11, 0x55, 0x36, + 0x65, 0x41, 0xd1, 0x4a, 0x31, 0xd6, 0x44, 0xac, 0xfd, 0x30, 0xa6, 0xef, 0xdc, 0x7d, 0xf4, 0x71, + 0xc6, 0x50, 0x4d, 0xde, 0x7f, 0xa9, 0xe4, 0xfd, 0x37, 0xd5, 0xcf, 0xf4, 0xcc, 0x21, 0xca, 0x24, + 0x87, 0x28, 0xd1, 0xd0, 0x6c, 0xb2, 0xa1, 0x7b, 0x87, 0x3f, 0xaf, 0xaa, 0xc6, 0xc5, 0x55, 0xd5, + 0xb8, 0xbc, 0xaa, 0x1a, 0xdf, 0xae, 0xab, 0x73, 0x17, 0xd7, 0xd5, 0xb9, 0x5f, 0xd7, 0xd5, 0xb9, + 0x2f, 0x2f, 0xbb, 0x44, 0xf4, 0x06, 0x47, 0xf2, 0xda, 0xb1, 0xef, 0x79, 0x83, 0x4e, 0x76, 0xec, + 0x33, 0xfd, 0x10, 0xc9, 0xec, 0xe1, 0x51, 0x4e, 0x3d, 0x41, 0x3b, 0xbf, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x2f, 0xed, 0xa3, 0x12, 0x3d, 0x07, 0x00, 0x00, } func (m *EventDemandOrderCreated) Marshal() (dAtA []byte, err error) { @@ -1010,6 +1094,64 @@ func (m *EventDemandOrderFulfilledAuthorized) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *EventDemandOrderDeleted) 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 *EventDemandOrderDeleted) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDemandOrderDeleted) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PacketType) > 0 { + i -= len(m.PacketType) + copy(dAtA[i:], m.PacketType) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PacketType))) + i-- + dAtA[i] = 0x2a + } + if len(m.RollappId) > 0 { + i -= len(m.RollappId) + copy(dAtA[i:], m.RollappId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.RollappId))) + i-- + dAtA[i] = 0x22 + } + if len(m.PacketStatus) > 0 { + i -= len(m.PacketStatus) + copy(dAtA[i:], m.PacketStatus) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PacketStatus))) + i-- + dAtA[i] = 0x1a + } + if len(m.PacketKey) > 0 { + i -= len(m.PacketKey) + copy(dAtA[i:], m.PacketKey) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PacketKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.OrderId) > 0 { + i -= len(m.OrderId) + copy(dAtA[i:], m.OrderId) + i = encodeVarintEvents(dAtA, i, uint64(len(m.OrderId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -1214,6 +1356,35 @@ func (m *EventDemandOrderFulfilledAuthorized) Size() (n int) { return n } +func (m *EventDemandOrderDeleted) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OrderId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.PacketKey) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.PacketStatus) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.RollappId) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.PacketType) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2618,6 +2789,216 @@ func (m *EventDemandOrderFulfilledAuthorized) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventDemandOrderDeleted) 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 ErrIntOverflowEvents + } + 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: EventDemandOrderDeleted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDemandOrderDeleted: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OrderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PacketKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketStatus", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PacketStatus = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollappId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RollappId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PacketType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PacketType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/sequencer/types/metadata.pb.go b/x/sequencer/types/metadata.pb.go index 5c975ddce..b19b1e7e3 100644 --- a/x/sequencer/types/metadata.pb.go +++ b/x/sequencer/types/metadata.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used.