From 123b94b2c9b6c87d136072a433bea60d36309376 Mon Sep 17 00:00:00 2001 From: zengyuexing <1736782823@qq.com> Date: Mon, 5 Feb 2024 22:01:32 +0800 Subject: [PATCH] feat: get withdraw records by status --- proto/ethermint/bridge/v1/query.proto | 20 + x/bridge/client/cli/query.go | 1 + x/bridge/client/cli/query_withdraw.go | 38 ++ x/bridge/keeper/deposit.go | 2 +- x/bridge/keeper/msg_server_withdraw.go | 8 + x/bridge/keeper/msg_server_withdraw_test.go | 2 + x/bridge/keeper/query_withdraw.go | 52 +- x/bridge/keeper/withdraw.go | 43 +- x/bridge/types/key_withdraw.go | 12 + x/bridge/types/query.pb.go | 631 ++++++++++++++++++-- x/bridge/types/query.pb.gw.go | 125 ++++ 11 files changed, 868 insertions(+), 66 deletions(-) diff --git a/proto/ethermint/bridge/v1/query.proto b/proto/ethermint/bridge/v1/query.proto index 4e612584ca..81c6fd36c8 100644 --- a/proto/ethermint/bridge/v1/query.proto +++ b/proto/ethermint/bridge/v1/query.proto @@ -35,6 +35,10 @@ service Query { rpc WithdrawAll(QueryAllWithdrawRequest) returns (QueryAllWithdrawResponse) { option (google.api.http).get = "/ethermint/bridge/v1/withdraw"; } + // WithdrawsByStatus queries withdraw records by status. + rpc WithdrawsByStatus(QueryWithdrawsByStatusRequest) returns (QueryWithdrawsByStatusResponse) { + option (google.api.http).get = "/ethermint/bridge/v1/withdraws_by_status/{status}"; + } // CallerGroup queries a caller group by group name. rpc CallerGroup(QueryGetCallerGroupRequest) returns (QueryGetCallerGroupResponse) { option (google.api.http).get = "/ethermint/bridge/v1/caller_group/{name}"; @@ -113,6 +117,22 @@ message QueryAllWithdrawResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryWithdrawsByStatusRequest is request type for the Query/WithdrawsByStatus RPC method. +message QueryWithdrawsByStatusRequest { + // status is the status of the withdrawals to query. + WithdrawStatus status = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryWithdrawsByStatusResponse is response type for the Query/WithdrawsByStatus RPC method. +message QueryWithdrawsByStatusResponse { + // withdraw is all withdraw records. + repeated Withdraw withdraw = 1 [(gogoproto.nullable) = false]; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // QueryGetCallerGroupRequest is request type for the Query/CallerGroup RPC method. message QueryGetCallerGroupRequest { // name is the unique name of the caller group. diff --git a/x/bridge/client/cli/query.go b/x/bridge/client/cli/query.go index 8bf1318186..61c5c2c76a 100644 --- a/x/bridge/client/cli/query.go +++ b/x/bridge/client/cli/query.go @@ -32,6 +32,7 @@ func GetQueryCmd(_ string) *cobra.Command { cmd.AddCommand(CmdListDeposit()) cmd.AddCommand(CmdShowDeposit()) cmd.AddCommand(CmdListWithdraw()) + cmd.AddCommand(CmdListWithdrawByStatus()) cmd.AddCommand(CmdShowWithdraw()) // this line is used by starport scaffolding # 1 diff --git a/x/bridge/client/cli/query_withdraw.go b/x/bridge/client/cli/query_withdraw.go index 8a0d2b7426..5dcf6dbe6f 100644 --- a/x/bridge/client/cli/query_withdraw.go +++ b/x/bridge/client/cli/query_withdraw.go @@ -42,6 +42,44 @@ func CmdListWithdraw() *cobra.Command { return cmd } +func CmdListWithdrawByStatus() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-withdraw-by-status [status]", + Short: "list withdraws by status", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + argStatus, err := types.WithdrawStatusFromString(args[0]) + if err != nil { + return err + } + params := &types.QueryWithdrawsByStatusRequest{ + Status: argStatus, + Pagination: pageReq, + } + + res, err := queryClient.WithdrawsByStatus(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + func CmdShowWithdraw() *cobra.Command { cmd := &cobra.Command{ Use: "show-withdraw [tx-hash]", diff --git a/x/bridge/keeper/deposit.go b/x/bridge/keeper/deposit.go index 95a7e868cf..0ef7d4e892 100644 --- a/x/bridge/keeper/deposit.go +++ b/x/bridge/keeper/deposit.go @@ -1,4 +1,4 @@ -package keeper //nolint:dupl +package keeper import ( "github.com/cosmos/cosmos-sdk/store/prefix" diff --git a/x/bridge/keeper/msg_server_withdraw.go b/x/bridge/keeper/msg_server_withdraw.go index 29037ed3ba..a8f6ef3650 100644 --- a/x/bridge/keeper/msg_server_withdraw.go +++ b/x/bridge/keeper/msg_server_withdraw.go @@ -41,6 +41,8 @@ func (k msgServer) CreateWithdraw(goCtx context.Context, msg *types.MsgCreateWit withdraw, ) + k.SetStatusIndex(ctx, withdraw.Status.String(), withdraw.TxHash) + if err := ctx.EventManager().EmitTypedEvent(&types.EventCreateWithdraw{TxHash: msg.TxHash}); err != nil { return nil, err } @@ -82,6 +84,8 @@ func (k msgServer) UpdateWithdraw(goCtx context.Context, msg *types.MsgUpdateWit } k.SetWithdraw(ctx, withdraw) + k.RemoveStatusIndex(ctx, valFound.GetStatus().String(), valFound.TxHash) + k.SetStatusIndex(ctx, withdraw.Status.String(), withdraw.TxHash) if err := ctx.EventManager().EmitTypedEvent(&types.EventUpdateWithdraw{TxHash: msg.TxHash}); err != nil { return nil, err @@ -151,6 +155,8 @@ func (k msgServer) SignWithdraw(goCtx context.Context, msg *types.MsgSignWithdra if err := ctx.EventManager().EmitTypedEvent(&types.EventSignWithdraw{TxHash: msg.TxHash}); err != nil { return nil, err } + k.RemoveStatusIndex(ctx, valFound.GetStatus().String(), valFound.TxHash) + k.SetStatusIndex(ctx, withdraw.Status.String(), withdraw.TxHash) } return &types.MsgSignWithdrawResponse{}, nil } @@ -177,6 +183,8 @@ func (k msgServer) DeleteWithdraw(goCtx context.Context, msg *types.MsgDeleteWit msg.TxHash, ) + k.RemoveStatusIndex(ctx, valFound.GetStatus().String(), valFound.TxHash) + if err := ctx.EventManager().EmitTypedEvent(&types.EventDeleteWithdraw{TxHash: msg.TxHash}); err != nil { return nil, err } diff --git a/x/bridge/keeper/msg_server_withdraw_test.go b/x/bridge/keeper/msg_server_withdraw_test.go index c0342c14d6..2d20f5deb8 100644 --- a/x/bridge/keeper/msg_server_withdraw_test.go +++ b/x/bridge/keeper/msg_server_withdraw_test.go @@ -44,6 +44,8 @@ func TestWithdrawMsgServerCreate(t *testing.T) { require.True(t, found) require.Equal(t, expected.Creator, rst.Creator) } + list := k.GetAllWithdrawByStatus(ctx, types.WithdrawStatus_WITHDRAW_STATUS_PENDING.String()) + require.Equal(t, 5, len(list)) } func TestWithdrawMsgServerUpdate(t *testing.T) { diff --git a/x/bridge/keeper/query_withdraw.go b/x/bridge/keeper/query_withdraw.go index 12b3ced703..3ec8efa835 100644 --- a/x/bridge/keeper/query_withdraw.go +++ b/x/bridge/keeper/query_withdraw.go @@ -1,7 +1,8 @@ -package keeper //nolint:dupl +package keeper import ( "context" + "fmt" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" @@ -54,3 +55,52 @@ func (k Keeper) Withdraw(goCtx context.Context, req *types.QueryGetWithdrawReque return &types.QueryGetWithdrawResponse{Withdraw: val}, nil } + +func (k Keeper) WithdrawsByStatus(goCtx context.Context, req *types.QueryWithdrawsByStatusRequest) (*types.QueryWithdrawsByStatusResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + withdraws := k.GetAllWithdrawByStatus(ctx, req.Status.String()) + paginatedWithdraws, pageRes, err := PaginateWithdraws(withdraws, req.Pagination) + if err != nil { + return nil, err + } + + return &types.QueryWithdrawsByStatusResponse{ + Withdraw: paginatedWithdraws, + Pagination: pageRes, + }, nil +} + +// PaginateWithdraws is a helper function to do pagination of withdraws. +func PaginateWithdraws(withdraws []types.Withdraw, pageReq *query.PageRequest) ([]types.Withdraw, *query.PageResponse, error) { + if pageReq == nil { + pageReq = &query.PageRequest{ + Limit: 100, // 设定一个默认值或者根据具体情况处理 + Offset: 0, + } + } + + start, end := int(pageReq.Offset), int(pageReq.Offset+pageReq.Limit) + if end > len(withdraws) || end < 0 { // -ve end means that the end has overflown + end = len(withdraws) + } + if start > len(withdraws) || start < 0 { + return []types.Withdraw{}, nil, status.Errorf(codes.InvalidArgument, "invalid request") + } + + paginatedWithdraws := withdraws[start:end] + + var nextPageToken []byte + if end < len(withdraws) { + nextPageToken = []byte(fmt.Sprintf("%v", end)) // Serialize the end cursor + } + + return paginatedWithdraws, &query.PageResponse{ + NextKey: nextPageToken, + Total: uint64(len(withdraws)), + }, nil +} diff --git a/x/bridge/keeper/withdraw.go b/x/bridge/keeper/withdraw.go index 88b5205182..2f1c516ae6 100644 --- a/x/bridge/keeper/withdraw.go +++ b/x/bridge/keeper/withdraw.go @@ -1,4 +1,4 @@ -package keeper //nolint:dupl +package keeper import ( "github.com/cosmos/cosmos-sdk/store/prefix" @@ -59,3 +59,44 @@ func (k Keeper) GetAllWithdraw(ctx sdk.Context) (list []types.Withdraw) { return } + +// SetStatusIndex use status and txHash composite key +func (k Keeper) SetStatusIndex(ctx sdk.Context, status string, txHash string) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.WithdrawStatusKeyPrefix)) + store.Set(types.WithdrawStatusKey( + status, + txHash, + ), []byte(txHash)) +} + +// RemoveStatusIndex removes a status index +func (k Keeper) RemoveStatusIndex( + ctx sdk.Context, + status string, + txHash string, +) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.WithdrawStatusKeyPrefix)) + store.Delete(types.WithdrawStatusKey( + status, + txHash, + )) +} + +// GetAllWithdrawByStatus returns all withdraw which have the same status +func (k Keeper) GetAllWithdrawByStatus(ctx sdk.Context, status string) (list []types.Withdraw) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.WithdrawStatusKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte(status)) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + txHash := string(iterator.Value()) + val, found := k.GetWithdraw(ctx, txHash) + if !found { + continue + } + list = append(list, val) + } + + return +} diff --git a/x/bridge/types/key_withdraw.go b/x/bridge/types/key_withdraw.go index ee5e7a5ea0..68d369058d 100644 --- a/x/bridge/types/key_withdraw.go +++ b/x/bridge/types/key_withdraw.go @@ -7,6 +7,8 @@ var _ binary.ByteOrder const ( // WithdrawKeyPrefix is the prefix to retrieve all Withdraw WithdrawKeyPrefix = "Withdraw/value/" + // WithdrawStatusKeyPrefix is the prefix to retrieve all Withdraw by status + WithdrawStatusKeyPrefix = "Withdraw/status/" ) // WithdrawKey returns the store key to retrieve a Withdraw from the index fields @@ -21,3 +23,13 @@ func WithdrawKey( return key } + +// WithdrawStatusKey returns the store key to retrieve a Withdraw from it's status and txHash +func WithdrawStatusKey(status string, txHash string) []byte { + var key []byte + key = append(key, []byte(status)...) + key = append(key, []byte("/")...) + key = append(key, []byte(txHash)...) + key = append(key, []byte("/")...) + return key +} diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index eba207f9b5..fac05cc096 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -499,6 +499,116 @@ func (m *QueryAllWithdrawResponse) GetPagination() *query.PageResponse { return nil } +// QueryWithdrawsByStatusRequest is request type for the Query/WithdrawsByStatus RPC method. +type QueryWithdrawsByStatusRequest struct { + // status is the status of the withdrawals to query. + Status WithdrawStatus `protobuf:"varint,1,opt,name=status,proto3,enum=ethermint.bridge.v1.WithdrawStatus" json:"status,omitempty"` + // pagination defines an pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryWithdrawsByStatusRequest) Reset() { *m = QueryWithdrawsByStatusRequest{} } +func (m *QueryWithdrawsByStatusRequest) String() string { return proto.CompactTextString(m) } +func (*QueryWithdrawsByStatusRequest) ProtoMessage() {} +func (*QueryWithdrawsByStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_bebca28dc1ac28cd, []int{10} +} +func (m *QueryWithdrawsByStatusRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWithdrawsByStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWithdrawsByStatusRequest.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 *QueryWithdrawsByStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWithdrawsByStatusRequest.Merge(m, src) +} +func (m *QueryWithdrawsByStatusRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryWithdrawsByStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWithdrawsByStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWithdrawsByStatusRequest proto.InternalMessageInfo + +func (m *QueryWithdrawsByStatusRequest) GetStatus() WithdrawStatus { + if m != nil { + return m.Status + } + return WithdrawStatus_WITHDRAW_STATUS_UNSPECIFIED +} + +func (m *QueryWithdrawsByStatusRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryWithdrawsByStatusResponse is response type for the Query/WithdrawsByStatus RPC method. +type QueryWithdrawsByStatusResponse struct { + // withdraw is all withdraw records. + Withdraw []Withdraw `protobuf:"bytes,1,rep,name=withdraw,proto3" json:"withdraw"` + // pagination defines an pagination for the request. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryWithdrawsByStatusResponse) Reset() { *m = QueryWithdrawsByStatusResponse{} } +func (m *QueryWithdrawsByStatusResponse) String() string { return proto.CompactTextString(m) } +func (*QueryWithdrawsByStatusResponse) ProtoMessage() {} +func (*QueryWithdrawsByStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bebca28dc1ac28cd, []int{11} +} +func (m *QueryWithdrawsByStatusResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWithdrawsByStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWithdrawsByStatusResponse.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 *QueryWithdrawsByStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWithdrawsByStatusResponse.Merge(m, src) +} +func (m *QueryWithdrawsByStatusResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryWithdrawsByStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWithdrawsByStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWithdrawsByStatusResponse proto.InternalMessageInfo + +func (m *QueryWithdrawsByStatusResponse) GetWithdraw() []Withdraw { + if m != nil { + return m.Withdraw + } + return nil +} + +func (m *QueryWithdrawsByStatusResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // QueryGetCallerGroupRequest is request type for the Query/CallerGroup RPC method. type QueryGetCallerGroupRequest struct { // name is the unique name of the caller group. @@ -509,7 +619,7 @@ func (m *QueryGetCallerGroupRequest) Reset() { *m = QueryGetCallerGroupR func (m *QueryGetCallerGroupRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCallerGroupRequest) ProtoMessage() {} func (*QueryGetCallerGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{10} + return fileDescriptor_bebca28dc1ac28cd, []int{12} } func (m *QueryGetCallerGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +665,7 @@ func (m *QueryGetCallerGroupResponse) Reset() { *m = QueryGetCallerGroup func (m *QueryGetCallerGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetCallerGroupResponse) ProtoMessage() {} func (*QueryGetCallerGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{11} + return fileDescriptor_bebca28dc1ac28cd, []int{13} } func (m *QueryGetCallerGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -601,7 +711,7 @@ func (m *QueryAllCallerGroupRequest) Reset() { *m = QueryAllCallerGroupR func (m *QueryAllCallerGroupRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllCallerGroupRequest) ProtoMessage() {} func (*QueryAllCallerGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{12} + return fileDescriptor_bebca28dc1ac28cd, []int{14} } func (m *QueryAllCallerGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -649,7 +759,7 @@ func (m *QueryAllCallerGroupResponse) Reset() { *m = QueryAllCallerGroup func (m *QueryAllCallerGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllCallerGroupResponse) ProtoMessage() {} func (*QueryAllCallerGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{13} + return fileDescriptor_bebca28dc1ac28cd, []int{15} } func (m *QueryAllCallerGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,7 +812,7 @@ func (m *QueryGetSignerGroupRequest) Reset() { *m = QueryGetSignerGroupR func (m *QueryGetSignerGroupRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetSignerGroupRequest) ProtoMessage() {} func (*QueryGetSignerGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{14} + return fileDescriptor_bebca28dc1ac28cd, []int{16} } func (m *QueryGetSignerGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -748,7 +858,7 @@ func (m *QueryGetSignerGroupResponse) Reset() { *m = QueryGetSignerGroup func (m *QueryGetSignerGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetSignerGroupResponse) ProtoMessage() {} func (*QueryGetSignerGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{15} + return fileDescriptor_bebca28dc1ac28cd, []int{17} } func (m *QueryGetSignerGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -794,7 +904,7 @@ func (m *QueryAllSignerGroupRequest) Reset() { *m = QueryAllSignerGroupR func (m *QueryAllSignerGroupRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllSignerGroupRequest) ProtoMessage() {} func (*QueryAllSignerGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{16} + return fileDescriptor_bebca28dc1ac28cd, []int{18} } func (m *QueryAllSignerGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -842,7 +952,7 @@ func (m *QueryAllSignerGroupResponse) Reset() { *m = QueryAllSignerGroup func (m *QueryAllSignerGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllSignerGroupResponse) ProtoMessage() {} func (*QueryAllSignerGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bebca28dc1ac28cd, []int{17} + return fileDescriptor_bebca28dc1ac28cd, []int{19} } func (m *QueryAllSignerGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -896,6 +1006,8 @@ func init() { proto.RegisterType((*QueryGetWithdrawResponse)(nil), "ethermint.bridge.v1.QueryGetWithdrawResponse") proto.RegisterType((*QueryAllWithdrawRequest)(nil), "ethermint.bridge.v1.QueryAllWithdrawRequest") proto.RegisterType((*QueryAllWithdrawResponse)(nil), "ethermint.bridge.v1.QueryAllWithdrawResponse") + proto.RegisterType((*QueryWithdrawsByStatusRequest)(nil), "ethermint.bridge.v1.QueryWithdrawsByStatusRequest") + proto.RegisterType((*QueryWithdrawsByStatusResponse)(nil), "ethermint.bridge.v1.QueryWithdrawsByStatusResponse") proto.RegisterType((*QueryGetCallerGroupRequest)(nil), "ethermint.bridge.v1.QueryGetCallerGroupRequest") proto.RegisterType((*QueryGetCallerGroupResponse)(nil), "ethermint.bridge.v1.QueryGetCallerGroupResponse") proto.RegisterType((*QueryAllCallerGroupRequest)(nil), "ethermint.bridge.v1.QueryAllCallerGroupRequest") @@ -909,61 +1021,67 @@ func init() { func init() { proto.RegisterFile("ethermint/bridge/v1/query.proto", fileDescriptor_bebca28dc1ac28cd) } var fileDescriptor_bebca28dc1ac28cd = []byte{ - // 864 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0x41, 0x4f, 0xdb, 0x48, - 0x14, 0xc7, 0x63, 0xc2, 0x06, 0x76, 0xb2, 0xda, 0xc3, 0x80, 0x16, 0x14, 0x20, 0x80, 0xd9, 0x85, - 0xc0, 0xee, 0x7a, 0x08, 0x7b, 0x5a, 0x69, 0xa5, 0x15, 0x50, 0x95, 0xf6, 0x46, 0xd3, 0x03, 0x52, - 0x7b, 0xa0, 0x93, 0x64, 0xe4, 0x58, 0x72, 0x6c, 0x63, 0x3b, 0x01, 0x84, 0x90, 0xaa, 0xde, 0x2b, - 0xb5, 0x6a, 0x0f, 0x3d, 0x55, 0x55, 0xd5, 0x2f, 0xd0, 0x6f, 0xc1, 0x11, 0xa9, 0x97, 0x9e, 0xaa, - 0x0a, 0x7a, 0xec, 0x87, 0xa8, 0x3c, 0x7e, 0x26, 0x93, 0x78, 0xb0, 0x13, 0x14, 0x6e, 0x96, 0xf5, - 0xde, 0x9b, 0xdf, 0xff, 0xff, 0x46, 0xef, 0xd9, 0x68, 0x9e, 0xf9, 0x0d, 0xe6, 0x36, 0x0d, 0xcb, - 0x27, 0x55, 0xd7, 0xa8, 0xeb, 0x8c, 0xb4, 0xcb, 0xe4, 0xa0, 0xc5, 0xdc, 0x63, 0xcd, 0x71, 0x6d, - 0xdf, 0xc6, 0x13, 0x57, 0x01, 0x5a, 0x18, 0xa0, 0xb5, 0xcb, 0x85, 0xb5, 0x9a, 0xed, 0x35, 0x6d, - 0x8f, 0x54, 0xa9, 0xc7, 0xc2, 0x68, 0xd2, 0x2e, 0x57, 0x99, 0x4f, 0xcb, 0xc4, 0xa1, 0xba, 0x61, - 0x51, 0xdf, 0xb0, 0xad, 0xb0, 0x40, 0x61, 0x59, 0x76, 0x42, 0x8d, 0x9a, 0x26, 0x73, 0xf7, 0x75, - 0xd7, 0x6e, 0x39, 0x10, 0xb7, 0x28, 0x8b, 0xab, 0x33, 0xc7, 0xf6, 0x0c, 0x1f, 0x42, 0x16, 0x64, - 0x21, 0x0e, 0x75, 0x69, 0xd3, 0x4b, 0x3a, 0xcc, 0x33, 0x74, 0xab, 0xe7, 0x30, 0x55, 0x16, 0x77, - 0x68, 0xf8, 0x8d, 0xba, 0x4b, 0x0f, 0x21, 0x66, 0x52, 0xb7, 0x75, 0x9b, 0x3f, 0x92, 0xe0, 0x09, - 0xde, 0xce, 0xea, 0xb6, 0xad, 0x9b, 0x8c, 0x50, 0xc7, 0x20, 0xd4, 0xb2, 0x6c, 0x9f, 0x6b, 0x85, - 0xf3, 0xd5, 0x49, 0x84, 0x1f, 0x04, 0x76, 0xec, 0x72, 0xa8, 0x0a, 0x3b, 0x68, 0x31, 0xcf, 0x57, - 0x77, 0xd1, 0x44, 0xd7, 0x5b, 0xcf, 0xb1, 0x2d, 0x8f, 0xe1, 0x7f, 0x51, 0x2e, 0x84, 0x9f, 0x56, - 0x16, 0x94, 0x52, 0x7e, 0x63, 0x46, 0x93, 0x78, 0xad, 0x85, 0x49, 0x5b, 0xa3, 0x67, 0x5f, 0xe6, - 0x33, 0x15, 0x48, 0x50, 0xcb, 0xe8, 0x37, 0x5e, 0x71, 0x87, 0xf9, 0x77, 0x42, 0x8b, 0xe0, 0x2c, - 0x3c, 0x85, 0xc6, 0xfc, 0xa3, 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0x81, 0x87, 0x70, 0x9e, 0x55, 0xbc, 0x42, 0x92, 0x3e, 0xbf, 0x04, 0xab, 0x5e, 0x2a, 0x28, - 0x1f, 0x55, 0x09, 0xbc, 0x4a, 0x96, 0x3f, 0x00, 0x9d, 0x64, 0x63, 0xa9, 0x7f, 0x70, 0xba, 0x79, - 0x3c, 0x97, 0x48, 0x87, 0xdf, 0x2b, 0x28, 0x2f, 0x0c, 0x41, 0x4c, 0x12, 0x3d, 0x88, 0x4f, 0xf5, - 0xc2, 0x7a, 0xff, 0x09, 0x40, 0xb6, 0xce, 0xc9, 0xd6, 0x70, 0x89, 0xa4, 0x7d, 0x4b, 0x93, 0x93, - 0x60, 0x14, 0x9e, 0xe2, 0xb7, 0x0a, 0xfa, 0x55, 0xa8, 0x14, 0x78, 0x47, 0x12, 0xdd, 0x18, 0x8c, - 0x53, 0xbe, 0x47, 0xd4, 0x55, 0xce, 0xb9, 0x84, 0x17, 0x53, 0x39, 0xb9, 0x8b, 0xc2, 0x50, 0x4a, - 0x71, 0x31, 0x3e, 0x65, 0x53, 0x5c, 0x94, 0xcc, 0xcb, 0x14, 0x17, 0xc5, 0x51, 0x2a, 0xba, 0x28, - 0x54, 0x4a, 0x77, 0x71, 0x30, 0x4e, 0xf9, 0x5c, 0x4f, 0x71, 0x51, 0xe4, 0xdc, 0xda, 0x3e, 0xbb, - 0x28, 0x2a, 0xe7, 0x17, 0x45, 0xe5, 0xeb, 0x45, 0x51, 0x79, 0x71, 0x59, 0xcc, 0x9c, 0x5f, 0x16, - 0x33, 0x9f, 0x2f, 0x8b, 0x99, 0x47, 0xab, 0xba, 0xe1, 0x37, 0x5a, 0x55, 0xad, 0x66, 0x37, 0x09, - 0x6b, 0x07, 0xff, 0x6a, 0x9d, 0x62, 0x47, 0x51, 0x39, 0xff, 0xd8, 0x61, 0x5e, 0x35, 0xc7, 0x7f, - 0x5d, 0xfe, 0xf9, 0x11, 0x00, 0x00, 0xff, 0xff, 0x93, 0x2e, 0x9a, 0x13, 0x0b, 0x0e, 0x00, 0x00, + // 957 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x97, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0x33, 0x49, 0x71, 0xca, 0xa4, 0xaa, 0xc4, 0xb4, 0xa2, 0xd5, 0x26, 0xd9, 0xa4, 0x1b, + 0xc8, 0x8f, 0x02, 0x3b, 0xb1, 0x73, 0xaa, 0x40, 0x42, 0x49, 0x11, 0x81, 0x5b, 0x70, 0x0f, 0x95, + 0xe0, 0x60, 0xc6, 0xf6, 0x68, 0xbd, 0xd2, 0x7a, 0x77, 0xbb, 0x33, 0x76, 0x63, 0x45, 0x91, 0x10, + 0x77, 0x24, 0x10, 0x1c, 0x38, 0x21, 0x84, 0x2a, 0x0e, 0xdc, 0x38, 0xf1, 0x2f, 0xf4, 0x58, 0x89, + 0x0b, 0x27, 0x84, 0x12, 0xfe, 0x10, 0xb4, 0xb3, 0x6f, 0xeb, 0xb5, 0x77, 0xbc, 0x6b, 0x47, 0xae, + 0xc4, 0x29, 0xd6, 0xe8, 0xfd, 0xf8, 0xbc, 0xef, 0x7b, 0x99, 0x37, 0x8b, 0x37, 0xb8, 0xec, 0xf0, + 0xa8, 0xeb, 0xfa, 0x92, 0x36, 0x23, 0xb7, 0xed, 0x70, 0xda, 0xaf, 0xd2, 0x27, 0x3d, 0x1e, 0x0d, + 0xec, 0x30, 0x0a, 0x64, 0x40, 0x6e, 0xbd, 0x34, 0xb0, 0x13, 0x03, 0xbb, 0x5f, 0x35, 0xee, 0xb7, + 0x02, 0xd1, 0x0d, 0x04, 0x6d, 0x32, 0xc1, 0x13, 0x6b, 0xda, 0xaf, 0x36, 0xb9, 0x64, 0x55, 0x1a, + 0x32, 0xc7, 0xf5, 0x99, 0x74, 0x03, 0x3f, 0x09, 0x60, 0x6c, 0xeb, 0x32, 0xb4, 0x98, 0xe7, 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xbe, 0xbd, 0x34, 0x17, 0x5e, 0x5c, 0x9a, 0x0b, 0x7f, 0x5d, + 0x9a, 0x0b, 0x9f, 0xef, 0x39, 0xae, 0xec, 0xf4, 0x9a, 0x76, 0x2b, 0xe8, 0x52, 0xde, 0x8f, 0xbf, + 0xdc, 0x87, 0xc1, 0x4e, 0xd3, 0x70, 0x72, 0x10, 0x72, 0xd1, 0xac, 0xa8, 0x0f, 0xd9, 0x83, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xfc, 0x4d, 0x88, 0x19, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -988,6 +1106,8 @@ type QueryClient interface { Withdraw(ctx context.Context, in *QueryGetWithdrawRequest, opts ...grpc.CallOption) (*QueryGetWithdrawResponse, error) // WithdrawAll queries all withdraw records. WithdrawAll(ctx context.Context, in *QueryAllWithdrawRequest, opts ...grpc.CallOption) (*QueryAllWithdrawResponse, error) + // WithdrawsByStatus queries withdraw records by status. + WithdrawsByStatus(ctx context.Context, in *QueryWithdrawsByStatusRequest, opts ...grpc.CallOption) (*QueryWithdrawsByStatusResponse, error) // CallerGroup queries a caller group by group name. CallerGroup(ctx context.Context, in *QueryGetCallerGroupRequest, opts ...grpc.CallOption) (*QueryGetCallerGroupResponse, error) // CallerGroupAll queries all caller groups. @@ -1051,6 +1171,15 @@ func (c *queryClient) WithdrawAll(ctx context.Context, in *QueryAllWithdrawReque return out, nil } +func (c *queryClient) WithdrawsByStatus(ctx context.Context, in *QueryWithdrawsByStatusRequest, opts ...grpc.CallOption) (*QueryWithdrawsByStatusResponse, error) { + out := new(QueryWithdrawsByStatusResponse) + err := c.cc.Invoke(ctx, "/ethermint.bridge.v1.Query/WithdrawsByStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) CallerGroup(ctx context.Context, in *QueryGetCallerGroupRequest, opts ...grpc.CallOption) (*QueryGetCallerGroupResponse, error) { out := new(QueryGetCallerGroupResponse) err := c.cc.Invoke(ctx, "/ethermint.bridge.v1.Query/CallerGroup", in, out, opts...) @@ -1099,6 +1228,8 @@ type QueryServer interface { Withdraw(context.Context, *QueryGetWithdrawRequest) (*QueryGetWithdrawResponse, error) // WithdrawAll queries all withdraw records. WithdrawAll(context.Context, *QueryAllWithdrawRequest) (*QueryAllWithdrawResponse, error) + // WithdrawsByStatus queries withdraw records by status. + WithdrawsByStatus(context.Context, *QueryWithdrawsByStatusRequest) (*QueryWithdrawsByStatusResponse, error) // CallerGroup queries a caller group by group name. CallerGroup(context.Context, *QueryGetCallerGroupRequest) (*QueryGetCallerGroupResponse, error) // CallerGroupAll queries all caller groups. @@ -1128,6 +1259,9 @@ func (*UnimplementedQueryServer) Withdraw(ctx context.Context, req *QueryGetWith func (*UnimplementedQueryServer) WithdrawAll(ctx context.Context, req *QueryAllWithdrawRequest) (*QueryAllWithdrawResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawAll not implemented") } +func (*UnimplementedQueryServer) WithdrawsByStatus(ctx context.Context, req *QueryWithdrawsByStatusRequest) (*QueryWithdrawsByStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawsByStatus not implemented") +} func (*UnimplementedQueryServer) CallerGroup(ctx context.Context, req *QueryGetCallerGroupRequest) (*QueryGetCallerGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CallerGroup not implemented") } @@ -1235,6 +1369,24 @@ func _Query_WithdrawAll_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_WithdrawsByStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWithdrawsByStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).WithdrawsByStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.bridge.v1.Query/WithdrawsByStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).WithdrawsByStatus(ctx, req.(*QueryWithdrawsByStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_CallerGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGetCallerGroupRequest) if err := dec(in); err != nil { @@ -1331,6 +1483,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "WithdrawAll", Handler: _Query_WithdrawAll_Handler, }, + { + MethodName: "WithdrawsByStatus", + Handler: _Query_WithdrawsByStatus_Handler, + }, { MethodName: "CallerGroup", Handler: _Query_CallerGroup_Handler, @@ -1702,6 +1858,95 @@ func (m *QueryAllWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryWithdrawsByStatusRequest) 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 *QueryWithdrawsByStatusRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWithdrawsByStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryWithdrawsByStatusResponse) 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 *QueryWithdrawsByStatusResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWithdrawsByStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Withdraw) > 0 { + for iNdEx := len(m.Withdraw) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Withdraw[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryGetCallerGroupRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2139,6 +2384,41 @@ func (m *QueryAllWithdrawResponse) Size() (n int) { return n } +func (m *QueryWithdrawsByStatusRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuery(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryWithdrawsByStatusResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Withdraw) > 0 { + for _, e := range m.Withdraw { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryGetCallerGroupRequest) Size() (n int) { if m == nil { return 0 @@ -3132,6 +3412,231 @@ func (m *QueryAllWithdrawResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryWithdrawsByStatusRequest) 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 ErrIntOverflowQuery + } + 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: QueryWithdrawsByStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWithdrawsByStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= WithdrawStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWithdrawsByStatusResponse) 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 ErrIntOverflowQuery + } + 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: QueryWithdrawsByStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWithdrawsByStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdraw", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Withdraw = append(m.Withdraw, Withdraw{}) + if err := m.Withdraw[len(m.Withdraw)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryGetCallerGroupRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/bridge/types/query.pb.gw.go b/x/bridge/types/query.pb.gw.go index a5dfbaf867..a2bced0c55 100644 --- a/x/bridge/types/query.pb.gw.go +++ b/x/bridge/types/query.pb.gw.go @@ -231,6 +231,84 @@ func local_request_Query_WithdrawAll_0(ctx context.Context, marshaler runtime.Ma } +var ( + filter_Query_WithdrawsByStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{"status": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_WithdrawsByStatus_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWithdrawsByStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, WithdrawStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = WithdrawStatus(e) + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_WithdrawsByStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.WithdrawsByStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_WithdrawsByStatus_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWithdrawsByStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, WithdrawStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = WithdrawStatus(e) + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_WithdrawsByStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.WithdrawsByStatus(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_CallerGroup_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetCallerGroupRequest var metadata runtime.ServerMetadata @@ -532,6 +610,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_WithdrawsByStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_WithdrawsByStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_WithdrawsByStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_CallerGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -765,6 +866,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_WithdrawsByStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_WithdrawsByStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_WithdrawsByStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_CallerGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -859,6 +980,8 @@ var ( pattern_Query_WithdrawAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "bridge", "v1", "withdraw"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_WithdrawsByStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "bridge", "v1", "withdraws_by_status", "status"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_CallerGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "bridge", "v1", "caller_group", "name"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_CallerGroupAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "bridge", "v1", "caller_group"}, "", runtime.AssumeColonVerbOpt(false))) @@ -879,6 +1002,8 @@ var ( forward_Query_WithdrawAll_0 = runtime.ForwardResponseMessage + forward_Query_WithdrawsByStatus_0 = runtime.ForwardResponseMessage + forward_Query_CallerGroup_0 = runtime.ForwardResponseMessage forward_Query_CallerGroupAll_0 = runtime.ForwardResponseMessage