diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f5d86d346..d83d4ec64e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,6 +51,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (types) [\#1314](https://github.com/Finschia/finschia-sdk/pull/1314) replace IsEqual with Equal
* (x/fswap) [\#1363](https://github.com/Finschia/finschia-sdk/pull/1363) introduce new event for MakeSwapProposal
* (x/fbridge) [\#1366](https://github.com/Finschia/finschia-sdk/pull/1366) Set target denom as module parameters
+* (x/fbridge) [\#1369](https://github.com/Finschia/finschia-sdk/pull/1369) Add the event of `SetBridgeStatus`
### Bug Fixes
* (x/auth) [#1281](https://github.com/Finschia/finschia-sdk/pull/1281) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking. (backport #1274)
diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md
index 64ea89222a..9cbd5f6d61 100644
--- a/docs/core/proto-docs.md
+++ b/docs/core/proto-docs.md
@@ -797,6 +797,7 @@
- [EventClaim](#lbm.fbridge.v1.EventClaim)
- [EventConfirmProvision](#lbm.fbridge.v1.EventConfirmProvision)
- [EventProvision](#lbm.fbridge.v1.EventProvision)
+ - [EventSetBridgeStatus](#lbm.fbridge.v1.EventSetBridgeStatus)
- [EventSuggestRole](#lbm.fbridge.v1.EventSuggestRole)
- [EventTransfer](#lbm.fbridge.v1.EventTransfer)
- [EventUpdateParams](#lbm.fbridge.v1.EventUpdateParams)
@@ -12052,6 +12053,22 @@ VoteOption enumerates the valid vote options for a given role proposal.
+
+
+### EventSetBridgeStatus
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `guardian` | [string](#string) | | the guardian address who modifies the bridge status (a.k.a. bridge switch) |
+| `status` | [BridgeStatus](#lbm.fbridge.v1.BridgeStatus) | | the new status of the guardian's bridge switch |
+
+
+
+
+
+
### EventSuggestRole
diff --git a/proto/lbm/fbridge/v1/event.proto b/proto/lbm/fbridge/v1/event.proto
index 610039eb5b..0977ff2728 100644
--- a/proto/lbm/fbridge/v1/event.proto
+++ b/proto/lbm/fbridge/v1/event.proto
@@ -62,3 +62,10 @@ message EventClaim {
// the amount of token to be claimed
string amount = 4;
}
+
+message EventSetBridgeStatus {
+ // the guardian address who modifies the bridge status (a.k.a. bridge switch)
+ string guardian = 1;
+ // the new status of the guardian's bridge switch
+ BridgeStatus status = 2;
+}
\ No newline at end of file
diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go
index 72fc696a00..49d2e4ac8c 100644
--- a/x/fbridge/keeper/msg_server.go
+++ b/x/fbridge/keeper/msg_server.go
@@ -164,5 +164,12 @@ func (m msgServer) SetBridgeStatus(goCtx context.Context, msg *types.MsgSetBridg
return nil, err
}
+ if err := ctx.EventManager().EmitTypedEvent(&types.EventSetBridgeStatus{
+ Guardian: msg.Guardian,
+ Status: msg.Status,
+ }); err != nil {
+ panic(err)
+ }
+
return &types.MsgSetBridgeStatusResponse{}, nil
}
diff --git a/x/fbridge/types/event.pb.go b/x/fbridge/types/event.pb.go
index 4acb26aa67..1bd20fe730 100644
--- a/x/fbridge/types/event.pb.go
+++ b/x/fbridge/types/event.pb.go
@@ -444,6 +444,60 @@ func (m *EventClaim) GetAmount() string {
return ""
}
+type EventSetBridgeStatus struct {
+ // the guardian address who modifies the bridge status (a.k.a. bridge switch)
+ Guardian string `protobuf:"bytes,1,opt,name=guardian,proto3" json:"guardian,omitempty"`
+ // the new status of the guardian's bridge switch
+ Status BridgeStatus `protobuf:"varint,2,opt,name=status,proto3,enum=lbm.fbridge.v1.BridgeStatus" json:"status,omitempty"`
+}
+
+func (m *EventSetBridgeStatus) Reset() { *m = EventSetBridgeStatus{} }
+func (m *EventSetBridgeStatus) String() string { return proto.CompactTextString(m) }
+func (*EventSetBridgeStatus) ProtoMessage() {}
+func (*EventSetBridgeStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_a36aa6e56f2275b8, []int{7}
+}
+func (m *EventSetBridgeStatus) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *EventSetBridgeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_EventSetBridgeStatus.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 *EventSetBridgeStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EventSetBridgeStatus.Merge(m, src)
+}
+func (m *EventSetBridgeStatus) XXX_Size() int {
+ return m.Size()
+}
+func (m *EventSetBridgeStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_EventSetBridgeStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EventSetBridgeStatus proto.InternalMessageInfo
+
+func (m *EventSetBridgeStatus) GetGuardian() string {
+ if m != nil {
+ return m.Guardian
+ }
+ return ""
+}
+
+func (m *EventSetBridgeStatus) GetStatus() BridgeStatus {
+ if m != nil {
+ return m.Status
+ }
+ return StatusEmpty
+}
+
func init() {
proto.RegisterType((*EventUpdateParams)(nil), "lbm.fbridge.v1.EventUpdateParams")
proto.RegisterType((*EventTransfer)(nil), "lbm.fbridge.v1.EventTransfer")
@@ -452,40 +506,44 @@ func init() {
proto.RegisterType((*EventProvision)(nil), "lbm.fbridge.v1.EventProvision")
proto.RegisterType((*EventConfirmProvision)(nil), "lbm.fbridge.v1.EventConfirmProvision")
proto.RegisterType((*EventClaim)(nil), "lbm.fbridge.v1.EventClaim")
+ proto.RegisterType((*EventSetBridgeStatus)(nil), "lbm.fbridge.v1.EventSetBridgeStatus")
}
func init() { proto.RegisterFile("lbm/fbridge/v1/event.proto", fileDescriptor_a36aa6e56f2275b8) }
var fileDescriptor_a36aa6e56f2275b8 = []byte{
- // 439 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,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 0xcd, 0x55, 0x3a, 0xa0,
+ 0x17, 0xf7, 0xe8, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x84, 0xa9, 0x5c, 0xd3, 0x03, 0x00,
+ 0x00,
}
func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) {
@@ -776,6 +834,41 @@ func (m *EventClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *EventSetBridgeStatus) 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 *EventSetBridgeStatus) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *EventSetBridgeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Status != 0 {
+ i = encodeVarintEvent(dAtA, i, uint64(m.Status))
+ i--
+ dAtA[i] = 0x10
+ }
+ if len(m.Guardian) > 0 {
+ i -= len(m.Guardian)
+ copy(dAtA[i:], m.Guardian)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.Guardian)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func encodeVarintEvent(dAtA []byte, offset int, v uint64) int {
offset -= sovEvent(v)
base := offset
@@ -916,6 +1009,22 @@ func (m *EventClaim) Size() (n int) {
return n
}
+func (m *EventSetBridgeStatus) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Guardian)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ if m.Status != 0 {
+ n += 1 + sovEvent(uint64(m.Status))
+ }
+ return n
+}
+
func sovEvent(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -1804,6 +1913,107 @@ func (m *EventClaim) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *EventSetBridgeStatus) 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 ErrIntOverflowEvent
+ }
+ 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: EventSetBridgeStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EventSetBridgeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Guardian", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ 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 ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Guardian = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ m.Status = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Status |= BridgeStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipEvent(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipEvent(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0