diff --git a/CHANGELOG.md b/CHANGELOG.md
index c024bd7c5e..86218264bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -75,6 +75,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/fswap) [\#1365](https://github.com/Finschia/finschia-sdk/pull/1365) fix update swap keys for possibly overlapped keys(`(hello,world) should be different to (hel,loworld)`)
* (x/fswap) [\#1379](https://github.com/Finschia/finschia-sdk/pull/1379) add missing router registration
* (x/fswap, x/fbridge) [\#1380](https://github.com/Finschia/finschia-sdk/pull/1380) Fix bug where amino is not supported in fswap and fbridge (backport #1378)
+* (x/fswap) [\#1385](https://github.com/Finschia/finschia-sdk/pull/1385) add accidentally deleted event emissions(EventSetSwap, EventAddDenomMetadata)
### Removed
diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md
index 289208be3d..8ac2e922b3 100644
--- a/docs/core/proto-docs.md
+++ b/docs/core/proto-docs.md
@@ -984,7 +984,7 @@
- [lbm/fswap/v1/event.proto](#lbm/fswap/v1/event.proto)
- [EventAddDenomMetadata](#lbm.fswap.v1.EventAddDenomMetadata)
- - [EventMakeSwap](#lbm.fswap.v1.EventMakeSwap)
+ - [EventSetSwap](#lbm.fswap.v1.EventSetSwap)
- [EventSwapCoins](#lbm.fswap.v1.EventSwapCoins)
- [lbm/fswap/v1/genesis.proto](#lbm/fswap/v1/genesis.proto)
@@ -14636,9 +14636,9 @@ Msg defines the foundation Msg service.
-
+
-### EventMakeSwap
+### EventSetSwap
diff --git a/proto/lbm/fswap/v1/event.proto b/proto/lbm/fswap/v1/event.proto
index 10f9f3ea5d..680f4961cb 100644
--- a/proto/lbm/fswap/v1/event.proto
+++ b/proto/lbm/fswap/v1/event.proto
@@ -19,7 +19,7 @@ message EventSwapCoins {
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"];
}
-message EventMakeSwap {
+message EventSetSwap {
Swap swap = 1 [(gogoproto.nullable) = false];
}
diff --git a/x/fswap/keeper/keeper.go b/x/fswap/keeper/keeper.go
index 713d1330d0..e2db580211 100644
--- a/x/fswap/keeper/keeper.go
+++ b/x/fswap/keeper/keeper.go
@@ -145,9 +145,17 @@ func (k Keeper) SetSwap(ctx sdk.Context, swap types.Swap, toDenomMetadata bank.M
return err
}
+ eventManager := ctx.EventManager()
+ if err := eventManager.EmitTypedEvent(&types.EventSetSwap{Swap: swap}); err != nil {
+ panic(err)
+ }
+
existingMetadata, ok := k.GetDenomMetaData(ctx, swap.ToDenom)
if !ok {
k.SetDenomMetaData(ctx, toDenomMetadata)
+ if err := eventManager.EmitTypedEvent(&(types.EventAddDenomMetadata{Metadata: toDenomMetadata})); err != nil {
+ panic(err)
+ }
return nil
}
if !denomMetadataEqual(existingMetadata, toDenomMetadata) {
diff --git a/x/fswap/keeper/keeper_test.go b/x/fswap/keeper/keeper_test.go
index 63774bef84..7e63f11818 100644
--- a/x/fswap/keeper/keeper_test.go
+++ b/x/fswap/keeper/keeper_test.go
@@ -5,6 +5,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
+ abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/Finschia/finschia-sdk/crypto/keys/secp256k1"
@@ -194,6 +195,7 @@ func (s *KeeperTestSuite) TestSetSwap() {
toDenomMeta bank.Metadata
existingMetadata bool
expectedError error
+ expectedEvents sdk.Events
}{
"valid": {
types.Swap{
@@ -205,6 +207,28 @@ func (s *KeeperTestSuite) TestSetSwap() {
s.toDenomMetadata,
false,
nil,
+ sdk.Events{
+ sdk.Event{
+ Type: "lbm.fswap.v1.EventSetSwap",
+ Attributes: []abci.EventAttribute{
+ {
+ Key: []byte("swap"),
+ Value: []uint8{0x7b, 0x22, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x66, 0x72, 0x6f, 0x6d, 0x44, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x74, 0x6f, 0x44, 0x22, 0x2c, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x7d},
+ Index: false,
+ },
+ },
+ },
+ sdk.Event{
+ Type: "lbm.fswap.v1.EventAddDenomMetadata",
+ Attributes: []abci.EventAttribute{
+ {
+ Key: []byte("metadata"),
+ Value: []uint8{0x7b, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x2d, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x3a, 0x22, 0x74, 0x6f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d, 0x2c, 0x22, 0x62, 0x61, 0x73, 0x65, 0x22, 0x3a, 0x22, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x22, 0x2c, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x22, 0x3a, 0x22, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x63, 0x6f, 0x69, 0x6e, 0x22, 0x2c, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x44, 0x55, 0x4d, 0x4d, 0x59, 0x22, 0x2c, 0x22, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x3a, 0x22, 0x44, 0x55, 0x4d, 0x22, 0x7d},
+ Index: false,
+ },
+ },
+ },
+ },
},
"to-denom metadata change not allowed": {
types.Swap{
@@ -223,6 +247,7 @@ func (s *KeeperTestSuite) TestSetSwap() {
},
true,
sdkerrors.ErrInvalidRequest,
+ sdk.Events{},
},
}
for name, tc := range testCases {
@@ -232,9 +257,11 @@ func (s *KeeperTestSuite) TestSetSwap() {
if tc.existingMetadata {
err := s.keeper.SetSwap(ctx, tc.swap, s.toDenomMetadata)
s.Require().ErrorIs(err, tc.expectedError)
- } else {
- s.Require().ErrorIs(err, tc.expectedError)
+ return
}
+ s.Require().ErrorIs(err, tc.expectedError)
+ events := ctx.EventManager().Events()
+ s.Require().Equal(tc.expectedEvents, events)
})
}
}
diff --git a/x/fswap/types/event.pb.go b/x/fswap/types/event.pb.go
index a535059e7e..31313699e3 100644
--- a/x/fswap/types/event.pb.go
+++ b/x/fswap/types/event.pb.go
@@ -88,22 +88,22 @@ func (m *EventSwapCoins) GetToCoinAmount() types.Coin {
return types.Coin{}
}
-type EventMakeSwap struct {
+type EventSetSwap struct {
Swap Swap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap"`
}
-func (m *EventMakeSwap) Reset() { *m = EventMakeSwap{} }
-func (m *EventMakeSwap) String() string { return proto.CompactTextString(m) }
-func (*EventMakeSwap) ProtoMessage() {}
-func (*EventMakeSwap) Descriptor() ([]byte, []int) {
+func (m *EventSetSwap) Reset() { *m = EventSetSwap{} }
+func (m *EventSetSwap) String() string { return proto.CompactTextString(m) }
+func (*EventSetSwap) ProtoMessage() {}
+func (*EventSetSwap) Descriptor() ([]byte, []int) {
return fileDescriptor_92d5edbd64a725af, []int{1}
}
-func (m *EventMakeSwap) XXX_Unmarshal(b []byte) error {
+func (m *EventSetSwap) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
-func (m *EventMakeSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+func (m *EventSetSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
- return xxx_messageInfo_EventMakeSwap.Marshal(b, m, deterministic)
+ return xxx_messageInfo_EventSetSwap.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@@ -113,19 +113,19 @@ func (m *EventMakeSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error
return b[:n], nil
}
}
-func (m *EventMakeSwap) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EventMakeSwap.Merge(m, src)
+func (m *EventSetSwap) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EventSetSwap.Merge(m, src)
}
-func (m *EventMakeSwap) XXX_Size() int {
+func (m *EventSetSwap) XXX_Size() int {
return m.Size()
}
-func (m *EventMakeSwap) XXX_DiscardUnknown() {
- xxx_messageInfo_EventMakeSwap.DiscardUnknown(m)
+func (m *EventSetSwap) XXX_DiscardUnknown() {
+ xxx_messageInfo_EventSetSwap.DiscardUnknown(m)
}
-var xxx_messageInfo_EventMakeSwap proto.InternalMessageInfo
+var xxx_messageInfo_EventSetSwap proto.InternalMessageInfo
-func (m *EventMakeSwap) GetSwap() Swap {
+func (m *EventSetSwap) GetSwap() Swap {
if m != nil {
return m.Swap
}
@@ -178,40 +178,40 @@ func (m *EventAddDenomMetadata) GetMetadata() types1.Metadata {
func init() {
proto.RegisterType((*EventSwapCoins)(nil), "lbm.fswap.v1.EventSwapCoins")
- proto.RegisterType((*EventMakeSwap)(nil), "lbm.fswap.v1.EventMakeSwap")
+ proto.RegisterType((*EventSetSwap)(nil), "lbm.fswap.v1.EventSetSwap")
proto.RegisterType((*EventAddDenomMetadata)(nil), "lbm.fswap.v1.EventAddDenomMetadata")
}
func init() { proto.RegisterFile("lbm/fswap/v1/event.proto", fileDescriptor_92d5edbd64a725af) }
var fileDescriptor_92d5edbd64a725af = []byte{
- // 403 bytes of a gzipped FileDescriptorProto
+ // 401 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xcd, 0x8e, 0xda, 0x30,
- 0x14, 0x85, 0x13, 0x8a, 0xfa, 0x63, 0x28, 0xaa, 0xa2, 0x22, 0xa5, 0x48, 0x04, 0x94, 0x15, 0x52,
- 0x5b, 0x5b, 0x81, 0x5d, 0xa5, 0x2e, 0x48, 0x7f, 0xd4, 0x0d, 0x9b, 0x74, 0x53, 0x75, 0x83, 0x9c,
- 0xc4, 0x40, 0x14, 0x6c, 0xa7, 0xd8, 0x04, 0x78, 0x8b, 0xae, 0xfb, 0x08, 0x7d, 0x12, 0x96, 0x2c,
- 0x67, 0xc5, 0x8c, 0xe0, 0x0d, 0xe6, 0x09, 0x46, 0x36, 0x01, 0x06, 0xcd, 0x62, 0x56, 0xb3, 0xbb,
- 0xd6, 0xb9, 0xf7, 0x7c, 0xd7, 0xc7, 0x06, 0xf6, 0x34, 0xa4, 0x68, 0x24, 0x16, 0x38, 0x43, 0xb9,
- 0x87, 0x48, 0x4e, 0x98, 0x84, 0xd9, 0x8c, 0x4b, 0x6e, 0x55, 0xa7, 0x21, 0x85, 0x5a, 0x81, 0xb9,
- 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b7, 0x2a, 0xf9, 0x89, 0xea, 0x7e, 0x03,
+ 0xd5, 0x3c, 0x1b, 0xa2, 0xe3, 0xb1, 0x3e, 0x83, 0xb2, 0x8a, 0x4e, 0xc7, 0x52, 0xe9, 0x5a, 0xf0,
+ 0xf1, 0xcb, 0x41, 0xd5, 0xe1, 0x97, 0x15, 0x34, 0xd0, 0x5d, 0xee, 0x05, 0xa8, 0xeb, 0xe9, 0x7e,
+ 0x1c, 0xff, 0x20, 0x8c, 0xd3, 0x3f, 0x44, 0xe2, 0x18, 0x4b, 0x6c, 0xfd, 0x03, 0x6f, 0x69, 0x51,
+ 0x17, 0x56, 0xcd, 0xd3, 0x35, 0xd8, 0xe4, 0x78, 0x8d, 0xc3, 0x80, 0xdf, 0x54, 0xae, 0xf7, 0xdb,
+ 0x56, 0x7d, 0x85, 0xe9, 0xf4, 0xab, 0x1b, 0x2b, 0xb7, 0xc1, 0xc1, 0xc2, 0x0d, 0x8e, 0x6e, 0xfe,
+ 0xef, 0xf5, 0xce, 0x31, 0x37, 0x3b, 0xc7, 0xbc, 0xdb, 0x39, 0xe6, 0xe5, 0xde, 0x31, 0x36, 0x7b,
+ 0xc7, 0xb8, 0xd9, 0x3b, 0xc6, 0x7f, 0xf8, 0x6c, 0x0a, 0xcb, 0xe2, 0x83, 0xe8, 0x34, 0xc2, 0xd7,
+ 0xfa, 0x7b, 0xf4, 0x1e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xbc, 0xd3, 0x3f, 0xb8, 0x02, 0x00,
+ 0x00,
}
func (m *EventSwapCoins) Marshal() (dAtA []byte, err error) {
@@ -264,7 +264,7 @@ func (m *EventSwapCoins) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
-func (m *EventMakeSwap) Marshal() (dAtA []byte, err error) {
+func (m *EventSetSwap) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -274,12 +274,12 @@ func (m *EventMakeSwap) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
-func (m *EventMakeSwap) MarshalTo(dAtA []byte) (int, error) {
+func (m *EventSetSwap) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *EventMakeSwap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+func (m *EventSetSwap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@@ -358,7 +358,7 @@ func (m *EventSwapCoins) Size() (n int) {
return n
}
-func (m *EventMakeSwap) Size() (n int) {
+func (m *EventSetSwap) Size() (n int) {
if m == nil {
return 0
}
@@ -534,7 +534,7 @@ func (m *EventSwapCoins) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *EventMakeSwap) Unmarshal(dAtA []byte) error {
+func (m *EventSetSwap) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -557,10 +557,10 @@ func (m *EventMakeSwap) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: EventMakeSwap: wiretype end group for non-group")
+ return fmt.Errorf("proto: EventSetSwap: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: EventMakeSwap: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: EventSetSwap: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1: