diff --git a/proto/zetachain/zetacore/fungible/events.proto b/proto/zetachain/zetacore/fungible/events.proto index bc910036f2..41b78c635e 100644 --- a/proto/zetachain/zetacore/fungible/events.proto +++ b/proto/zetachain/zetacore/fungible/events.proto @@ -44,7 +44,7 @@ message EventZRC20Paused { string signer = 3; } -message EventZRC20UnPaused { +message EventZRC20Unpaused { string msg_type_url = 1; repeated string zrc20_addresses = 2; string signer = 3; diff --git a/typescript/zetachain/zetacore/fungible/events_pb.d.ts b/typescript/zetachain/zetacore/fungible/events_pb.d.ts index abcd12946a..2cfb7f648b 100644 --- a/typescript/zetachain/zetacore/fungible/events_pb.d.ts +++ b/typescript/zetachain/zetacore/fungible/events_pb.d.ts @@ -209,9 +209,9 @@ export declare class EventZRC20Paused extends Message { } /** - * @generated from message zetachain.zetacore.fungible.EventZRC20UnPaused + * @generated from message zetachain.zetacore.fungible.EventZRC20Unpaused */ -export declare class EventZRC20UnPaused extends Message { +export declare class EventZRC20Unpaused extends Message { /** * @generated from field: string msg_type_url = 1; */ @@ -227,19 +227,19 @@ export declare class EventZRC20UnPaused extends Message { */ signer: string; - constructor(data?: PartialMessage); + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; - static readonly typeName = "zetachain.zetacore.fungible.EventZRC20UnPaused"; + static readonly typeName = "zetachain.zetacore.fungible.EventZRC20Unpaused"; static readonly fields: FieldList; - static fromBinary(bytes: Uint8Array, options?: Partial): EventZRC20UnPaused; + static fromBinary(bytes: Uint8Array, options?: Partial): EventZRC20Unpaused; - static fromJson(jsonValue: JsonValue, options?: Partial): EventZRC20UnPaused; + static fromJson(jsonValue: JsonValue, options?: Partial): EventZRC20Unpaused; - static fromJsonString(jsonString: string, options?: Partial): EventZRC20UnPaused; + static fromJsonString(jsonString: string, options?: Partial): EventZRC20Unpaused; - static equals(a: EventZRC20UnPaused | PlainMessage | undefined, b: EventZRC20UnPaused | PlainMessage | undefined): boolean; + static equals(a: EventZRC20Unpaused | PlainMessage | undefined, b: EventZRC20Unpaused | PlainMessage | undefined): boolean; } /** diff --git a/x/fungible/client/cli/tx_update_zrc20_paused_status.go b/x/fungible/client/cli/tx_update_zrc20_paused_status.go index 1c11d9bc3c..553cf68545 100644 --- a/x/fungible/client/cli/tx_update_zrc20_paused_status.go +++ b/x/fungible/client/cli/tx_update_zrc20_paused_status.go @@ -1,14 +1,11 @@ package cli import ( - "strconv" "strings" - cosmoserrors "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/x/fungible/types" @@ -28,14 +25,6 @@ func CmdPauseZRC20() *cobra.Command { contractAddressList := strings.Split(strings.TrimSpace(args[0]), ",") - action, err := strconv.ParseUint(args[1], 10, 32) - if err != nil { - return err - } - if (action != 0) && (action != 1) { - return cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid action (%d)", action) - } - msg := types.NewMsgPauseZRC20( clientCtx.GetFromAddress().String(), contractAddressList, @@ -64,14 +53,6 @@ func CmdUnpauseZRC20() *cobra.Command { contractAddressList := strings.Split(strings.TrimSpace(args[0]), ",") - action, err := strconv.ParseUint(args[1], 10, 32) - if err != nil { - return err - } - if (action != 0) && (action != 1) { - return cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid action (%d)", action) - } - msg := types.NewMsgUnpauseZRC20( clientCtx.GetFromAddress().String(), contractAddressList, diff --git a/x/fungible/keeper/msg_server_unpause_zrc20.go b/x/fungible/keeper/msg_server_unpause_zrc20.go index 9d9aa56b5a..f00afd6909 100644 --- a/x/fungible/keeper/msg_server_unpause_zrc20.go +++ b/x/fungible/keeper/msg_server_unpause_zrc20.go @@ -37,7 +37,7 @@ func (k msgServer) UnpauseZRC20( } err := ctx.EventManager().EmitTypedEvent( - &types.EventZRC20UnPaused{ + &types.EventZRC20Unpaused{ MsgTypeUrl: sdk.MsgTypeURL(&types.MsgUnpauseZRC20{}), Zrc20Addresses: msg.Zrc20Addresses, Signer: msg.Creator, @@ -45,7 +45,7 @@ func (k msgServer) UnpauseZRC20( ) if err != nil { k.Logger(ctx).Error("failed to emit event", - "event", "EventZRC20UnPaused", + "event", "EventZRC20Unpaused", "error", err.Error(), ) return nil, cosmoserrors.Wrapf(types.ErrEmitEvent, "failed to emit event (%s)", err.Error()) diff --git a/x/fungible/types/events.pb.go b/x/fungible/types/events.pb.go index 683f9fa793..41795a24b7 100644 --- a/x/fungible/types/events.pb.go +++ b/x/fungible/types/events.pb.go @@ -368,24 +368,24 @@ func (m *EventZRC20Paused) GetSigner() string { return "" } -type EventZRC20UnPaused struct { +type EventZRC20Unpaused struct { MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` Zrc20Addresses []string `protobuf:"bytes,2,rep,name=zrc20_addresses,json=zrc20Addresses,proto3" json:"zrc20_addresses,omitempty"` Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` } -func (m *EventZRC20UnPaused) Reset() { *m = EventZRC20UnPaused{} } -func (m *EventZRC20UnPaused) String() string { return proto.CompactTextString(m) } -func (*EventZRC20UnPaused) ProtoMessage() {} -func (*EventZRC20UnPaused) Descriptor() ([]byte, []int) { +func (m *EventZRC20Unpaused) Reset() { *m = EventZRC20Unpaused{} } +func (m *EventZRC20Unpaused) String() string { return proto.CompactTextString(m) } +func (*EventZRC20Unpaused) ProtoMessage() {} +func (*EventZRC20Unpaused) Descriptor() ([]byte, []int) { return fileDescriptor_1e6611815bc2713b, []int{4} } -func (m *EventZRC20UnPaused) XXX_Unmarshal(b []byte) error { +func (m *EventZRC20Unpaused) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventZRC20UnPaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventZRC20Unpaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventZRC20UnPaused.Marshal(b, m, deterministic) + return xxx_messageInfo_EventZRC20Unpaused.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -395,33 +395,33 @@ func (m *EventZRC20UnPaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *EventZRC20UnPaused) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventZRC20UnPaused.Merge(m, src) +func (m *EventZRC20Unpaused) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventZRC20Unpaused.Merge(m, src) } -func (m *EventZRC20UnPaused) XXX_Size() int { +func (m *EventZRC20Unpaused) XXX_Size() int { return m.Size() } -func (m *EventZRC20UnPaused) XXX_DiscardUnknown() { - xxx_messageInfo_EventZRC20UnPaused.DiscardUnknown(m) +func (m *EventZRC20Unpaused) XXX_DiscardUnknown() { + xxx_messageInfo_EventZRC20Unpaused.DiscardUnknown(m) } -var xxx_messageInfo_EventZRC20UnPaused proto.InternalMessageInfo +var xxx_messageInfo_EventZRC20Unpaused proto.InternalMessageInfo -func (m *EventZRC20UnPaused) GetMsgTypeUrl() string { +func (m *EventZRC20Unpaused) GetMsgTypeUrl() string { if m != nil { return m.MsgTypeUrl } return "" } -func (m *EventZRC20UnPaused) GetZrc20Addresses() []string { +func (m *EventZRC20Unpaused) GetZrc20Addresses() []string { if m != nil { return m.Zrc20Addresses } return nil } -func (m *EventZRC20UnPaused) GetSigner() string { +func (m *EventZRC20Unpaused) GetSigner() string { if m != nil { return m.Signer } @@ -601,7 +601,7 @@ func init() { proto.RegisterType((*EventZRC20Deployed)(nil), "zetachain.zetacore.fungible.EventZRC20Deployed") proto.RegisterType((*EventZRC20WithdrawFeeUpdated)(nil), "zetachain.zetacore.fungible.EventZRC20WithdrawFeeUpdated") proto.RegisterType((*EventZRC20Paused)(nil), "zetachain.zetacore.fungible.EventZRC20Paused") - proto.RegisterType((*EventZRC20UnPaused)(nil), "zetachain.zetacore.fungible.EventZRC20UnPaused") + proto.RegisterType((*EventZRC20Unpaused)(nil), "zetachain.zetacore.fungible.EventZRC20Unpaused") proto.RegisterType((*EventSystemContractsDeployed)(nil), "zetachain.zetacore.fungible.EventSystemContractsDeployed") proto.RegisterType((*EventBytecodeUpdated)(nil), "zetachain.zetacore.fungible.EventBytecodeUpdated") } @@ -645,20 +645,20 @@ var fileDescriptor_1e6611815bc2713b = []byte{ 0xe7, 0x99, 0x96, 0x55, 0x62, 0x64, 0x95, 0xb2, 0xee, 0xb5, 0xe1, 0x0a, 0x85, 0x38, 0xc3, 0x74, 0x26, 0xa8, 0x31, 0x53, 0xfe, 0x25, 0x99, 0xf0, 0x7b, 0xa9, 0xfd, 0x0f, 0xaa, 0x97, 0xe4, 0x00, 0x39, 0x56, 0x15, 0x49, 0xbf, 0x28, 0x08, 0x14, 0x07, 0xa4, 0x52, 0x1a, 0x90, 0xb8, 0x38, 0x1f, - 0x47, 0xf4, 0xd7, 0x15, 0x7e, 0x9f, 0x59, 0xad, 0x7c, 0xad, 0xf0, 0x07, 0xcc, 0xe8, 0x7f, 0x08, - 0x4f, 0xa8, 0xc7, 0x63, 0x12, 0x5a, 0xd3, 0x81, 0x75, 0x42, 0x6c, 0xc1, 0xa2, 0x44, 0x5f, 0x2b, - 0x0d, 0xfd, 0xcf, 0x9b, 0xc1, 0x41, 0xba, 0x2f, 0xc7, 0x21, 0x96, 0x16, 0xd3, 0x3c, 0xd2, 0x00, - 0xef, 0xa0, 0x8d, 0x42, 0x8e, 0x88, 0x4d, 0x44, 0x7e, 0x87, 0xd4, 0xf3, 0x14, 0x43, 0xb5, 0x8d, - 0xb7, 0xd1, 0xba, 0xcd, 0x28, 0x05, 0x99, 0xcf, 0x3a, 0x87, 0x69, 0xa0, 0x4d, 0xb5, 0x96, 0xef, - 0x1e, 0xc3, 0x34, 0x90, 0xd2, 0x70, 0xd5, 0x53, 0x7e, 0x81, 0x65, 0x96, 0xe2, 0xa5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, 0x90, 0x23, 0x62, 0x13, 0x91, 0xdf, 0x21, 0xf5, 0x3c, 0xc5, 0x50, 0x6d, + 0xe3, 0x6d, 0xb4, 0x6e, 0x33, 0x4a, 0x41, 0xe6, 0xb3, 0xce, 0x61, 0x1a, 0x68, 0x53, 0xad, 0xe5, + 0xbb, 0xc7, 0x30, 0x0d, 0xa4, 0x34, 0x5c, 0xf5, 0x94, 0x5f, 0x60, 0x99, 0xa5, 0x78, 0xa9, 0xd5, + 0xdb, 0x2c, 0xd5, 0xf9, 0x6c, 0xa0, 0xa6, 0x92, 0x66, 0x2f, 0x11, 0x60, 0x33, 0xe7, 0x01, 0xd3, + 0xf7, 0x2f, 0x6a, 0xdc, 0x72, 0xcf, 0xd6, 0xed, 0x6b, 0x57, 0xe6, 0x0e, 0xda, 0x90, 0xa6, 0x1c, + 0xe9, 0x1a, 0xd6, 0x98, 0xf0, 0xb1, 0xd6, 0xa6, 0x4e, 0x21, 0xce, 0x6a, 0x3f, 0x27, 0x7c, 0x2c, + 0xb1, 0xd2, 0xe4, 0x65, 0xac, 0x56, 0x89, 0xf9, 0x4e, 0x09, 0x3b, 0xeb, 0x6a, 0xb1, 0xd8, 0xd5, + 0xde, 0xe1, 0xa7, 0xcb, 0xb6, 0x71, 0x71, 0xd9, 0x36, 0xbe, 0x5e, 0xb6, 0x8d, 0x77, 0x57, 0xed, + 0xb9, 0x8b, 0xab, 0xf6, 0xdc, 0x97, 0xab, 0xf6, 0xdc, 0x71, 0xdf, 0xf5, 0xc4, 0x78, 0x32, 0xea, + 0xd9, 0x2c, 0x50, 0x4f, 0xd1, 0xff, 0xd7, 0x5e, 0xa5, 0xb3, 0xc2, 0x9b, 0x96, 0x84, 0xc0, 0x47, + 0x55, 0xf5, 0x32, 0x3d, 0xfa, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x55, 0x3b, 0x93, 0x8b, 0x46, 0x07, 0x00, 0x00, } @@ -919,7 +919,7 @@ func (m *EventZRC20Paused) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventZRC20UnPaused) Marshal() (dAtA []byte, err error) { +func (m *EventZRC20Unpaused) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -929,12 +929,12 @@ func (m *EventZRC20UnPaused) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventZRC20UnPaused) MarshalTo(dAtA []byte) (int, error) { +func (m *EventZRC20Unpaused) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventZRC20UnPaused) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventZRC20Unpaused) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1238,7 +1238,7 @@ func (m *EventZRC20Paused) Size() (n int) { return n } -func (m *EventZRC20UnPaused) Size() (n int) { +func (m *EventZRC20Unpaused) Size() (n int) { if m == nil { return 0 } @@ -2255,7 +2255,7 @@ func (m *EventZRC20Paused) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventZRC20UnPaused) Unmarshal(dAtA []byte) error { +func (m *EventZRC20Unpaused) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2278,10 +2278,10 @@ func (m *EventZRC20UnPaused) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventZRC20UnPaused: wiretype end group for non-group") + return fmt.Errorf("proto: EventZRC20Unpaused: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventZRC20UnPaused: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventZRC20Unpaused: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: