diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index a7ddb5fd..6488a52c 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -79879,9 +79879,11 @@ definitions: MsgUpdateParamsResponse defines the Msg/UpdateParams response type. Since: cosmos-sdk 0.47 - side.btcbridge.MsgWithdrawResponse: + side.btcbridge.MsgWithdrawToBitcoinResponse: type: object - description: MsgWithdrawResponse defines the Msg/Withdraw response type. + description: >- + MsgWithdrawToBitcoinResponse defines the Msg/WithdrawToBitcoin response + type. side.btcbridge.Params: type: object properties: diff --git a/proto/side/btcbridge/tx.proto b/proto/side/btcbridge/tx.proto index 2bbf1a1f..d858a6f0 100644 --- a/proto/side/btcbridge/tx.proto +++ b/proto/side/btcbridge/tx.proto @@ -16,8 +16,8 @@ service Msg { rpc SubmitDepositTransaction (MsgSubmitDepositTransaction) returns (MsgSubmitDepositTransactionResponse); // SubmitWithdrawalTransaction submits bitcoin transaction to the side chain. rpc SubmitWithdrawTransaction (MsgSubmitWithdrawTransaction) returns (MsgSubmitWithdrawTransactionResponse); - // Withdraw withdraws the asset from the side chain. - rpc Withdraw (MsgWithdraw) returns (MsgWithdrawResponse); + // WithdrawToBitcoin withdraws the asset to bitcoin. + rpc WithdrawToBitcoin (MsgWithdrawToBitcoin) returns (MsgWithdrawToBitcoinResponse); // SubmitWithdrawStatus submits the status of the withdraw transaction. rpc SubmitWithdrawStatus (MsgSubmitWithdrawStatus) returns (MsgSubmitWithdrawStatusResponse); // UpdateParams defines a governance operation for updating the x/btcbridge module @@ -80,15 +80,15 @@ message MsgSubmitWithdrawTransaction { message MsgSubmitWithdrawTransactionResponse { } -// MsgWithdraw defines the Msg/Withdraw request type. -message MsgWithdraw { +// MsgWithdrawToBitcoin defines the Msg/WithdrawToBitcoin request type. +message MsgWithdrawToBitcoin { string sender = 1; // withdraw amount in satoshi, etc: 100000000sat = 1btc string amount = 2; } -// MsgWithdrawResponse defines the Msg/Withdraw response type. -message MsgWithdrawResponse { +// MsgWithdrawToBitcoinResponse defines the Msg/WithdrawToBitcoin response type. +message MsgWithdrawToBitcoinResponse { } // MsgUpdateParams is the Msg/UpdateParams request type. diff --git a/x/btcbridge/client/cli/tx.go b/x/btcbridge/client/cli/tx.go index e12feda1..51b688ed 100644 --- a/x/btcbridge/client/cli/tx.go +++ b/x/btcbridge/client/cli/tx.go @@ -35,7 +35,7 @@ func GetTxCmd() *cobra.Command { } cmd.AddCommand(CmdSubmitBlocks()) - cmd.AddCommand(CmdWithdraw()) + cmd.AddCommand(CmdWithdrawToBitcoin()) return cmd } @@ -73,8 +73,8 @@ func CmdSubmitBlocks() *cobra.Command { return cmd } -// Withdraw -func CmdWithdraw() *cobra.Command { +// Withdraw To Bitcoin +func CmdWithdrawToBitcoin() *cobra.Command { cmd := &cobra.Command{ Use: "withdraw [amount]", Short: "Withdraw asset to the given sender", @@ -90,7 +90,7 @@ func CmdWithdraw() *cobra.Command { return fmt.Errorf("invalid amount") } - msg := types.NewMsgWithdraw( + msg := types.NewMsgWithdrawToBitcoin( clientCtx.GetFromAddress().String(), args[0], ) diff --git a/x/btcbridge/keeper/msg_server.go b/x/btcbridge/keeper/msg_server.go index ffe2045f..799a147d 100644 --- a/x/btcbridge/keeper/msg_server.go +++ b/x/btcbridge/keeper/msg_server.go @@ -97,7 +97,7 @@ func (m msgServer) SubmitWithdrawTransaction(goCtx context.Context, msg *types.M return &types.MsgSubmitWithdrawTransactionResponse{}, nil } -func (m msgServer) Withdraw(goCtx context.Context, msg *types.MsgWithdraw) (*types.MsgWithdrawResponse, error) { +func (m msgServer) WithdrawToBitcoin(goCtx context.Context, msg *types.MsgWithdrawToBitcoin) (*types.MsgWithdrawToBitcoinResponse, error) { if err := msg.ValidateBasic(); err != nil { return nil, err } @@ -151,7 +151,7 @@ func (m msgServer) Withdraw(goCtx context.Context, msg *types.MsgWithdraw) (*typ sdk.NewAttribute("amount", msg.Amount), ) - return &types.MsgWithdrawResponse{}, nil + return &types.MsgWithdrawToBitcoinResponse{}, nil } func (m msgServer) SubmitWithdrawStatus(goCtx context.Context, msg *types.MsgSubmitWithdrawStatus) (*types.MsgSubmitWithdrawStatusResponse, error) { diff --git a/x/btcbridge/types/message_withdraw.go b/x/btcbridge/types/message_withdraw_to_bitcoin.go similarity index 60% rename from x/btcbridge/types/message_withdraw.go rename to x/btcbridge/types/message_withdraw_to_bitcoin.go index 363cba6c..5a128f64 100644 --- a/x/btcbridge/types/message_withdraw.go +++ b/x/btcbridge/types/message_withdraw_to_bitcoin.go @@ -5,27 +5,27 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -const TypeMsgWithdraw = "withdraw" +const TypeMsgWithdrawToBitcoin = "withdraw_to_bitcoin" -func NewMsgWithdraw( +func NewMsgWithdrawToBitcoin( sender string, amount string, -) *MsgWithdraw { - return &MsgWithdraw{ +) *MsgWithdrawToBitcoin { + return &MsgWithdrawToBitcoin{ Sender: sender, Amount: amount, } } -func (msg *MsgWithdraw) Route() string { +func (msg *MsgWithdrawToBitcoin) Route() string { return RouterKey } -func (msg *MsgWithdraw) Type() string { - return TypeMsgWithdraw +func (msg *MsgWithdrawToBitcoin) Type() string { + return TypeMsgWithdrawToBitcoin } -func (msg *MsgWithdraw) GetSigners() []sdk.AccAddress { +func (msg *MsgWithdrawToBitcoin) GetSigners() []sdk.AccAddress { Sender, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { panic(err) @@ -33,12 +33,12 @@ func (msg *MsgWithdraw) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{Sender} } -func (msg *MsgWithdraw) GetSignBytes() []byte { +func (msg *MsgWithdrawToBitcoin) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(msg) return sdk.MustSortJSON(bz) } -func (msg *MsgWithdraw) ValidateBasic() error { +func (msg *MsgWithdrawToBitcoin) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Sender) if err != nil { return sdkerrors.Wrapf(err, "invalid Sender address (%s)", err) diff --git a/x/btcbridge/types/tx.pb.go b/x/btcbridge/types/tx.pb.go index 0b4f30a0..baba6ddc 100644 --- a/x/btcbridge/types/tx.pb.go +++ b/x/btcbridge/types/tx.pb.go @@ -450,25 +450,25 @@ func (m *MsgSubmitWithdrawTransactionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitWithdrawTransactionResponse proto.InternalMessageInfo -// MsgWithdraw defines the Msg/Withdraw request type. -type MsgWithdraw struct { +// MsgWithdrawToBitcoin defines the Msg/WithdrawToBitcoin request type. +type MsgWithdrawToBitcoin struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // withdraw amount in satoshi, etc: 100000000sat = 1btc Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` } -func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } -func (m *MsgWithdraw) String() string { return proto.CompactTextString(m) } -func (*MsgWithdraw) ProtoMessage() {} -func (*MsgWithdraw) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawToBitcoin) Reset() { *m = MsgWithdrawToBitcoin{} } +func (m *MsgWithdrawToBitcoin) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawToBitcoin) ProtoMessage() {} +func (*MsgWithdrawToBitcoin) Descriptor() ([]byte, []int) { return fileDescriptor_785ca8e1e4227068, []int{8} } -func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawToBitcoin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawToBitcoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdraw.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawToBitcoin.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -478,48 +478,48 @@ func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *MsgWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdraw.Merge(m, src) +func (m *MsgWithdrawToBitcoin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawToBitcoin.Merge(m, src) } -func (m *MsgWithdraw) XXX_Size() int { +func (m *MsgWithdrawToBitcoin) XXX_Size() int { return m.Size() } -func (m *MsgWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdraw.DiscardUnknown(m) +func (m *MsgWithdrawToBitcoin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawToBitcoin.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdraw proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawToBitcoin proto.InternalMessageInfo -func (m *MsgWithdraw) GetSender() string { +func (m *MsgWithdrawToBitcoin) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *MsgWithdraw) GetAmount() string { +func (m *MsgWithdrawToBitcoin) GetAmount() string { if m != nil { return m.Amount } return "" } -// MsgWithdrawResponse defines the Msg/Withdraw response type. -type MsgWithdrawResponse struct { +// MsgWithdrawToBitcoinResponse defines the Msg/WithdrawToBitcoin response type. +type MsgWithdrawToBitcoinResponse struct { } -func (m *MsgWithdrawResponse) Reset() { *m = MsgWithdrawResponse{} } -func (m *MsgWithdrawResponse) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawResponse) ProtoMessage() {} -func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawToBitcoinResponse) Reset() { *m = MsgWithdrawToBitcoinResponse{} } +func (m *MsgWithdrawToBitcoinResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawToBitcoinResponse) ProtoMessage() {} +func (*MsgWithdrawToBitcoinResponse) Descriptor() ([]byte, []int) { return fileDescriptor_785ca8e1e4227068, []int{9} } -func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawToBitcoinResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawToBitcoinResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawToBitcoinResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -529,17 +529,17 @@ func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawResponse.Merge(m, src) +func (m *MsgWithdrawToBitcoinResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawToBitcoinResponse.Merge(m, src) } -func (m *MsgWithdrawResponse) XXX_Size() int { +func (m *MsgWithdrawToBitcoinResponse) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawResponse.DiscardUnknown(m) +func (m *MsgWithdrawToBitcoinResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawToBitcoinResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawToBitcoinResponse proto.InternalMessageInfo // MsgUpdateParams is the Msg/UpdateParams request type. // @@ -648,8 +648,8 @@ func init() { proto.RegisterType((*MsgSubmitDepositTransactionResponse)(nil), "side.btcbridge.MsgSubmitDepositTransactionResponse") proto.RegisterType((*MsgSubmitWithdrawTransaction)(nil), "side.btcbridge.MsgSubmitWithdrawTransaction") proto.RegisterType((*MsgSubmitWithdrawTransactionResponse)(nil), "side.btcbridge.MsgSubmitWithdrawTransactionResponse") - proto.RegisterType((*MsgWithdraw)(nil), "side.btcbridge.MsgWithdraw") - proto.RegisterType((*MsgWithdrawResponse)(nil), "side.btcbridge.MsgWithdrawResponse") + proto.RegisterType((*MsgWithdrawToBitcoin)(nil), "side.btcbridge.MsgWithdrawToBitcoin") + proto.RegisterType((*MsgWithdrawToBitcoinResponse)(nil), "side.btcbridge.MsgWithdrawToBitcoinResponse") proto.RegisterType((*MsgUpdateParams)(nil), "side.btcbridge.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "side.btcbridge.MsgUpdateParamsResponse") } @@ -657,48 +657,48 @@ func init() { func init() { proto.RegisterFile("side/btcbridge/tx.proto", fileDescriptor_785ca8e1e4227068) } var fileDescriptor_785ca8e1e4227068 = []byte{ - // 642 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x6e, 0xd3, 0x4e, - 0x14, 0xc5, 0xe3, 0x26, 0xcd, 0xbf, 0xb9, 0x69, 0xfb, 0x97, 0x86, 0x7e, 0xb8, 0x4e, 0x71, 0x82, - 0x4b, 0x69, 0x24, 0x20, 0x91, 0xd2, 0x8a, 0x1d, 0x12, 0x8a, 0x58, 0x74, 0x41, 0x24, 0xe4, 0x16, - 0x81, 0xd8, 0x54, 0xfe, 0x18, 0x6c, 0x43, 0xe3, 0x71, 0x3d, 0x63, 0x48, 0x25, 0x24, 0x56, 0x6c, - 0x58, 0xb1, 0xe5, 0x0d, 0x78, 0x94, 0x2e, 0xbb, 0x64, 0x85, 0x50, 0xfb, 0x22, 0xc8, 0x63, 0x67, - 0xea, 0xa6, 0x76, 0xdb, 0x88, 0x9d, 0xef, 0x9c, 0xdf, 0x9c, 0x7b, 0xc6, 0xb9, 0x13, 0xc3, 0x2a, - 0xf5, 0x6c, 0xdc, 0x35, 0x99, 0x65, 0x86, 0x9e, 0xed, 0xe0, 0x2e, 0x1b, 0x75, 0x82, 0x90, 0x30, - 0x82, 0x16, 0x63, 0xa1, 0x23, 0x04, 0x65, 0xc9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0x19, 0xf9, 0xcd, 0x49, 0xfb, 0xdc, 0x31, 0x55, 0x1e, 0xdf, 0x0a, 0x1b, - 0xf7, 0x44, 0x9f, 0x41, 0x2e, 0x9c, 0xe4, 0x87, 0x85, 0x56, 0x57, 0x61, 0x65, 0x7b, 0x0a, 0x58, - 0x74, 0xff, 0x02, 0x6b, 0xc5, 0x53, 0xf7, 0xa8, 0xd0, 0x31, 0x87, 0x56, 0x76, 0xa6, 0xa1, 0x45, - 0x80, 0x17, 0x30, 0x27, 0xe6, 0xa8, 0x91, 0xe3, 0x30, 0x16, 0x95, 0x8d, 0x6b, 0x44, 0xe1, 0x16, - 0xc0, 0x52, 0xee, 0x3f, 0xed, 0xd6, 0x8d, 0xd9, 0x12, 0x50, 0xe9, 0xde, 0x12, 0x14, 0x1d, 0xdf, - 0xc0, 0xfc, 0xa5, 0x89, 0x6d, 0xe6, 0x18, 0x64, 0x01, 0x65, 0xeb, 0x06, 0x60, 0xec, 0xdc, 0xdf, - 0x3d, 0x39, 0x53, 0xa5, 0xd3, 0x33, 0x55, 0xfa, 0x73, 0xa6, 0x4a, 0xdf, 0xcf, 0xd5, 0xd2, 0xe9, - 0xb9, 0x5a, 0xfa, 0x75, 0xae, 0x96, 0xde, 0x76, 0x1c, 0x8f, 0xb9, 0x91, 0xd9, 0xb1, 0xc8, 0xb0, - 0x1b, 0x9b, 0xf1, 0x2f, 0x8d, 0x45, 0x0e, 0x79, 0xd1, 0x1d, 0x65, 0xbf, 0x73, 0xc7, 0x01, 0xa6, - 0x66, 0x95, 0x03, 0xdb, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x84, 0xde, 0x85, 0x11, 0x06, 0x07, - 0x00, 0x00, + // 643 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0x86, 0xe3, 0x26, 0x0d, 0xcd, 0x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 0xa3, 0x80, 0xb2, 0x71, 0x0d, 0x70, 0xae, + 0xdc, 0xdb, 0x39, 0x3e, 0x55, 0xa5, 0x93, 0x53, 0x55, 0xfa, 0x7b, 0xaa, 0x4a, 0xdf, 0xcf, 0xd4, + 0xca, 0xc9, 0x99, 0x5a, 0xf9, 0x7d, 0xa6, 0x56, 0xde, 0xe9, 0x5e, 0xc0, 0xfc, 0xc4, 0xd6, 0x1d, + 0x32, 0x30, 0x52, 0x31, 0x7e, 0x2d, 0x39, 0xe4, 0x80, 0x2f, 0x8c, 0xe1, 0xe8, 0xa5, 0x78, 0x14, + 0x61, 0x6a, 0xd7, 0x39, 0xb0, 0xf5, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xe6, 0x76, 0xc4, 0x33, + 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -719,8 +719,8 @@ type MsgClient interface { SubmitDepositTransaction(ctx context.Context, in *MsgSubmitDepositTransaction, opts ...grpc.CallOption) (*MsgSubmitDepositTransactionResponse, error) // SubmitWithdrawalTransaction submits bitcoin transaction to the side chain. SubmitWithdrawTransaction(ctx context.Context, in *MsgSubmitWithdrawTransaction, opts ...grpc.CallOption) (*MsgSubmitWithdrawTransactionResponse, error) - // Withdraw withdraws the asset from the side chain. - Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) + // WithdrawToBitcoin withdraws the asset to bitcoin. + WithdrawToBitcoin(ctx context.Context, in *MsgWithdrawToBitcoin, opts ...grpc.CallOption) (*MsgWithdrawToBitcoinResponse, error) // SubmitWithdrawStatus submits the status of the withdraw transaction. SubmitWithdrawStatus(ctx context.Context, in *MsgSubmitWithdrawStatus, opts ...grpc.CallOption) (*MsgSubmitWithdrawStatusResponse, error) // UpdateParams defines a governance operation for updating the x/btcbridge module @@ -765,9 +765,9 @@ func (c *msgClient) SubmitWithdrawTransaction(ctx context.Context, in *MsgSubmit return out, nil } -func (c *msgClient) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) { - out := new(MsgWithdrawResponse) - err := c.cc.Invoke(ctx, "/side.btcbridge.Msg/Withdraw", in, out, opts...) +func (c *msgClient) WithdrawToBitcoin(ctx context.Context, in *MsgWithdrawToBitcoin, opts ...grpc.CallOption) (*MsgWithdrawToBitcoinResponse, error) { + out := new(MsgWithdrawToBitcoinResponse) + err := c.cc.Invoke(ctx, "/side.btcbridge.Msg/WithdrawToBitcoin", in, out, opts...) if err != nil { return nil, err } @@ -800,8 +800,8 @@ type MsgServer interface { SubmitDepositTransaction(context.Context, *MsgSubmitDepositTransaction) (*MsgSubmitDepositTransactionResponse, error) // SubmitWithdrawalTransaction submits bitcoin transaction to the side chain. SubmitWithdrawTransaction(context.Context, *MsgSubmitWithdrawTransaction) (*MsgSubmitWithdrawTransactionResponse, error) - // Withdraw withdraws the asset from the side chain. - Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) + // WithdrawToBitcoin withdraws the asset to bitcoin. + WithdrawToBitcoin(context.Context, *MsgWithdrawToBitcoin) (*MsgWithdrawToBitcoinResponse, error) // SubmitWithdrawStatus submits the status of the withdraw transaction. SubmitWithdrawStatus(context.Context, *MsgSubmitWithdrawStatus) (*MsgSubmitWithdrawStatusResponse, error) // UpdateParams defines a governance operation for updating the x/btcbridge module @@ -824,8 +824,8 @@ func (*UnimplementedMsgServer) SubmitDepositTransaction(ctx context.Context, req func (*UnimplementedMsgServer) SubmitWithdrawTransaction(ctx context.Context, req *MsgSubmitWithdrawTransaction) (*MsgSubmitWithdrawTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitWithdrawTransaction not implemented") } -func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") +func (*UnimplementedMsgServer) WithdrawToBitcoin(ctx context.Context, req *MsgWithdrawToBitcoin) (*MsgWithdrawToBitcoinResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawToBitcoin not implemented") } func (*UnimplementedMsgServer) SubmitWithdrawStatus(ctx context.Context, req *MsgSubmitWithdrawStatus) (*MsgSubmitWithdrawStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitWithdrawStatus not implemented") @@ -892,20 +892,20 @@ func _Msg_SubmitWithdrawTransaction_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } -func _Msg_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdraw) +func _Msg_WithdrawToBitcoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawToBitcoin) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Withdraw(ctx, in) + return srv.(MsgServer).WithdrawToBitcoin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/side.btcbridge.Msg/Withdraw", + FullMethod: "/side.btcbridge.Msg/WithdrawToBitcoin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Withdraw(ctx, req.(*MsgWithdraw)) + return srv.(MsgServer).WithdrawToBitcoin(ctx, req.(*MsgWithdrawToBitcoin)) } return interceptor(ctx, in, info, handler) } @@ -963,8 +963,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_SubmitWithdrawTransaction_Handler, }, { - MethodName: "Withdraw", - Handler: _Msg_Withdraw_Handler, + MethodName: "WithdrawToBitcoin", + Handler: _Msg_WithdrawToBitcoin_Handler, }, { MethodName: "SubmitWithdrawStatus", @@ -1275,7 +1275,7 @@ func (m *MsgSubmitWithdrawTransactionResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *MsgWithdraw) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawToBitcoin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1285,12 +1285,12 @@ func (m *MsgWithdraw) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawToBitcoin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawToBitcoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1312,7 +1312,7 @@ func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawToBitcoinResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1322,12 +1322,12 @@ func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawToBitcoinResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawToBitcoinResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1545,7 +1545,7 @@ func (m *MsgSubmitWithdrawTransactionResponse) Size() (n int) { return n } -func (m *MsgWithdraw) Size() (n int) { +func (m *MsgWithdrawToBitcoin) Size() (n int) { if m == nil { return 0 } @@ -1562,7 +1562,7 @@ func (m *MsgWithdraw) Size() (n int) { return n } -func (m *MsgWithdrawResponse) Size() (n int) { +func (m *MsgWithdrawToBitcoinResponse) Size() (n int) { if m == nil { return 0 } @@ -2457,7 +2457,7 @@ func (m *MsgSubmitWithdrawTransactionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawToBitcoin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2480,10 +2480,10 @@ func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawToBitcoin: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawToBitcoin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2571,7 +2571,7 @@ func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawToBitcoinResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2594,10 +2594,10 @@ func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawToBitcoinResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawToBitcoinResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: