From 4b52bb953ef23f8aa954ac7b3cb878eb7e20db6b Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 13 Nov 2024 14:39:19 +0200 Subject: [PATCH] chore: add channels rpc --- modules/core/04-channel/v2/client/cli/cli.go | 1 + .../core/04-channel/v2/client/cli/query.go | 39 + .../core/04-channel/v2/keeper/grpc_query.go | 36 + modules/core/04-channel/v2/types/query.pb.go | 787 +++++++++++++++--- .../core/04-channel/v2/types/query.pb.gw.go | 83 ++ proto/ibc/core/channel/v2/query.proto | 23 +- 6 files changed, 835 insertions(+), 134 deletions(-) diff --git a/modules/core/04-channel/v2/client/cli/cli.go b/modules/core/04-channel/v2/client/cli/cli.go index c9a0d954287..cdbb0b635d7 100644 --- a/modules/core/04-channel/v2/client/cli/cli.go +++ b/modules/core/04-channel/v2/client/cli/cli.go @@ -20,6 +20,7 @@ func GetQueryCmd() *cobra.Command { queryCmd.AddCommand( getCmdQueryChannel(), + getCmdQueryChannels(), getCmdQueryNextSequenceSend(), getCmdQueryPacketCommitment(), getCmdQueryPacketCommitments(), diff --git a/modules/core/04-channel/v2/client/cli/query.go b/modules/core/04-channel/v2/client/cli/query.go index 2be1a004d3e..56c8f888999 100644 --- a/modules/core/04-channel/v2/client/cli/query.go +++ b/modules/core/04-channel/v2/client/cli/query.go @@ -49,6 +49,45 @@ func getCmdQueryChannel() *cobra.Command { return cmd } +// getCmdQueryChannels defines the command to query all the v2 channels that this chain maintains. +func getCmdQueryChannels() *cobra.Command { + cmd := &cobra.Command{ + Use: "channels", + Short: "Query all channels", + Long: "Query all channels from a chain", + Example: fmt.Sprintf("%s query %s %s channels", version.AppName, exported.ModuleName, types.SubModuleName), + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + req := &types.QueryChannelsRequest{ + Pagination: pageReq, + } + + res, err := queryClient.Channels(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "channels") + + return cmd +} + // getCmdQueryNextSequenceSend defines the command to query a next send sequence for a given channel func getCmdQueryNextSequenceSend() *cobra.Command { cmd := &cobra.Command{ diff --git a/modules/core/04-channel/v2/keeper/grpc_query.go b/modules/core/04-channel/v2/keeper/grpc_query.go index 3f5c7b1e59d..308fde949af 100644 --- a/modules/core/04-channel/v2/keeper/grpc_query.go +++ b/modules/core/04-channel/v2/keeper/grpc_query.go @@ -51,6 +51,42 @@ func (q *queryServer) Channel(ctx context.Context, req *types.QueryChannelReques return types.NewQueryChannelResponse(channel), nil } +// Channels implements the Query/Channels gRPC method +func (q *queryServer) Channels(ctx context.Context, req *types.QueryChannelsRequest) (*types.QueryChannelsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + var channels []*types.IdentifiedChannel + store := prefix.NewStore(runtime.KVStoreAdapter(q.storeService.OpenKVStore(ctx)), []byte(types.ChannelKey)) + + pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { + var channel types.Channel + if err := q.cdc.Unmarshal(value, &channel); err != nil { + return err + } + + _, channelID, err := host.ParseChannelPath(string(key)) + if err != nil { + return err + } + + identifiedChannel := types.NewIdentifiedChannel(channelID, channel) + channels = append(channels, &identifiedChannel) + return nil + }) + if err != nil { + return nil, err + } + + selfHeight := clienttypes.GetSelfHeight(ctx) + return &types.QueryChannelsResponse{ + Channels: channels, + Pagination: pageRes, + Height: selfHeight, + }, nil +} + // NextSequenceSend implements the Query/NextSequenceSend gRPC method func (q *queryServer) NextSequenceSend(ctx context.Context, req *types.QueryNextSequenceSendRequest) (*types.QueryNextSequenceSendResponse, error) { if req == nil { diff --git a/modules/core/04-channel/v2/types/query.pb.go b/modules/core/04-channel/v2/types/query.pb.go index 5ae8436bd9b..0d921bcf6b6 100644 --- a/modules/core/04-channel/v2/types/query.pb.go +++ b/modules/core/04-channel/v2/types/query.pb.go @@ -76,7 +76,7 @@ func (m *QueryChannelRequest) GetChannelId() string { return "" } -// QueryChannelRequest is the response type for the Query/Channel RPC method +// QueryChannelResponse is the response type for the Query/Channel RPC method type QueryChannelResponse struct { // the channel associated with the provided channel id Channel Channel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"` @@ -122,6 +122,116 @@ func (m *QueryChannelResponse) GetChannel() Channel { return Channel{} } +// QueryChannelsRequest is the request type for the Query/Channels RPC method +type QueryChannelsRequest struct { + // pagination request + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryChannelsRequest) Reset() { *m = QueryChannelsRequest{} } +func (m *QueryChannelsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryChannelsRequest) ProtoMessage() {} +func (*QueryChannelsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a328cba4986edcab, []int{2} +} +func (m *QueryChannelsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryChannelsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryChannelsRequest.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 *QueryChannelsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryChannelsRequest.Merge(m, src) +} +func (m *QueryChannelsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryChannelsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryChannelsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryChannelsRequest proto.InternalMessageInfo + +func (m *QueryChannelsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryChannelsResponse is the response type for the Query/Channels RPC method. +type QueryChannelsResponse struct { + // list of stored channels of the chain. + Channels []*IdentifiedChannel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` + // pagination response + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // query block height + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` +} + +func (m *QueryChannelsResponse) Reset() { *m = QueryChannelsResponse{} } +func (m *QueryChannelsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryChannelsResponse) ProtoMessage() {} +func (*QueryChannelsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a328cba4986edcab, []int{3} +} +func (m *QueryChannelsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryChannelsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryChannelsResponse.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 *QueryChannelsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryChannelsResponse.Merge(m, src) +} +func (m *QueryChannelsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryChannelsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryChannelsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryChannelsResponse proto.InternalMessageInfo + +func (m *QueryChannelsResponse) GetChannels() []*IdentifiedChannel { + if m != nil { + return m.Channels + } + return nil +} + +func (m *QueryChannelsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func (m *QueryChannelsResponse) GetHeight() types.Height { + if m != nil { + return m.Height + } + return types.Height{} +} + // QueryNextSequenceSendRequest is the request type for the Query/QueryNextSequenceSend RPC method type QueryNextSequenceSendRequest struct { // channel unique identifier @@ -132,7 +242,7 @@ func (m *QueryNextSequenceSendRequest) Reset() { *m = QueryNextSequenceS func (m *QueryNextSequenceSendRequest) String() string { return proto.CompactTextString(m) } func (*QueryNextSequenceSendRequest) ProtoMessage() {} func (*QueryNextSequenceSendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{2} + return fileDescriptor_a328cba4986edcab, []int{4} } func (m *QueryNextSequenceSendRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,7 +292,7 @@ func (m *QueryNextSequenceSendResponse) Reset() { *m = QueryNextSequence func (m *QueryNextSequenceSendResponse) String() string { return proto.CompactTextString(m) } func (*QueryNextSequenceSendResponse) ProtoMessage() {} func (*QueryNextSequenceSendResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{3} + return fileDescriptor_a328cba4986edcab, []int{5} } func (m *QueryNextSequenceSendResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +354,7 @@ func (m *QueryPacketCommitmentRequest) Reset() { *m = QueryPacketCommitm func (m *QueryPacketCommitmentRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketCommitmentRequest) ProtoMessage() {} func (*QueryPacketCommitmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{4} + return fileDescriptor_a328cba4986edcab, []int{6} } func (m *QueryPacketCommitmentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +411,7 @@ func (m *QueryPacketCommitmentResponse) Reset() { *m = QueryPacketCommit func (m *QueryPacketCommitmentResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketCommitmentResponse) ProtoMessage() {} func (*QueryPacketCommitmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{5} + return fileDescriptor_a328cba4986edcab, []int{7} } func (m *QueryPacketCommitmentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -363,7 +473,7 @@ func (m *QueryPacketCommitmentsRequest) Reset() { *m = QueryPacketCommit func (m *QueryPacketCommitmentsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketCommitmentsRequest) ProtoMessage() {} func (*QueryPacketCommitmentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{6} + return fileDescriptor_a328cba4986edcab, []int{8} } func (m *QueryPacketCommitmentsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -420,7 +530,7 @@ func (m *QueryPacketCommitmentsResponse) Reset() { *m = QueryPacketCommi func (m *QueryPacketCommitmentsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketCommitmentsResponse) ProtoMessage() {} func (*QueryPacketCommitmentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{7} + return fileDescriptor_a328cba4986edcab, []int{9} } func (m *QueryPacketCommitmentsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -482,7 +592,7 @@ func (m *QueryPacketAcknowledgementRequest) Reset() { *m = QueryPacketAc func (m *QueryPacketAcknowledgementRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketAcknowledgementRequest) ProtoMessage() {} func (*QueryPacketAcknowledgementRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{8} + return fileDescriptor_a328cba4986edcab, []int{10} } func (m *QueryPacketAcknowledgementRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -539,7 +649,7 @@ func (m *QueryPacketAcknowledgementResponse) Reset() { *m = QueryPacketA func (m *QueryPacketAcknowledgementResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketAcknowledgementResponse) ProtoMessage() {} func (*QueryPacketAcknowledgementResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{9} + return fileDescriptor_a328cba4986edcab, []int{11} } func (m *QueryPacketAcknowledgementResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -604,7 +714,7 @@ func (m *QueryPacketAcknowledgementsRequest) Reset() { *m = QueryPacketA func (m *QueryPacketAcknowledgementsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketAcknowledgementsRequest) ProtoMessage() {} func (*QueryPacketAcknowledgementsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{10} + return fileDescriptor_a328cba4986edcab, []int{12} } func (m *QueryPacketAcknowledgementsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +778,7 @@ func (m *QueryPacketAcknowledgementsResponse) Reset() { *m = QueryPacket func (m *QueryPacketAcknowledgementsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketAcknowledgementsResponse) ProtoMessage() {} func (*QueryPacketAcknowledgementsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{11} + return fileDescriptor_a328cba4986edcab, []int{13} } func (m *QueryPacketAcknowledgementsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,7 +842,7 @@ func (m *QueryPacketReceiptRequest) Reset() { *m = QueryPacketReceiptReq func (m *QueryPacketReceiptRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketReceiptRequest) ProtoMessage() {} func (*QueryPacketReceiptRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{12} + return fileDescriptor_a328cba4986edcab, []int{14} } func (m *QueryPacketReceiptRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -796,7 +906,7 @@ func (m *QueryPacketReceiptResponse) Reset() { *m = QueryPacketReceiptRe func (m *QueryPacketReceiptResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketReceiptResponse) ProtoMessage() {} func (*QueryPacketReceiptResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{13} + return fileDescriptor_a328cba4986edcab, []int{15} } func (m *QueryPacketReceiptResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -858,7 +968,7 @@ func (m *QueryUnreceivedPacketsRequest) Reset() { *m = QueryUnreceivedPa func (m *QueryUnreceivedPacketsRequest) String() string { return proto.CompactTextString(m) } func (*QueryUnreceivedPacketsRequest) ProtoMessage() {} func (*QueryUnreceivedPacketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{14} + return fileDescriptor_a328cba4986edcab, []int{16} } func (m *QueryUnreceivedPacketsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -913,7 +1023,7 @@ func (m *QueryUnreceivedPacketsResponse) Reset() { *m = QueryUnreceivedP func (m *QueryUnreceivedPacketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryUnreceivedPacketsResponse) ProtoMessage() {} func (*QueryUnreceivedPacketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{15} + return fileDescriptor_a328cba4986edcab, []int{17} } func (m *QueryUnreceivedPacketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -969,7 +1079,7 @@ func (m *QueryUnreceivedAcksRequest) Reset() { *m = QueryUnreceivedAcksR func (m *QueryUnreceivedAcksRequest) String() string { return proto.CompactTextString(m) } func (*QueryUnreceivedAcksRequest) ProtoMessage() {} func (*QueryUnreceivedAcksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{16} + return fileDescriptor_a328cba4986edcab, []int{18} } func (m *QueryUnreceivedAcksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1025,7 +1135,7 @@ func (m *QueryUnreceivedAcksResponse) Reset() { *m = QueryUnreceivedAcks func (m *QueryUnreceivedAcksResponse) String() string { return proto.CompactTextString(m) } func (*QueryUnreceivedAcksResponse) ProtoMessage() {} func (*QueryUnreceivedAcksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a328cba4986edcab, []int{17} + return fileDescriptor_a328cba4986edcab, []int{19} } func (m *QueryUnreceivedAcksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1071,6 +1181,8 @@ func (m *QueryUnreceivedAcksResponse) GetHeight() types.Height { func init() { proto.RegisterType((*QueryChannelRequest)(nil), "ibc.core.channel.v2.QueryChannelRequest") proto.RegisterType((*QueryChannelResponse)(nil), "ibc.core.channel.v2.QueryChannelResponse") + proto.RegisterType((*QueryChannelsRequest)(nil), "ibc.core.channel.v2.QueryChannelsRequest") + proto.RegisterType((*QueryChannelsResponse)(nil), "ibc.core.channel.v2.QueryChannelsResponse") proto.RegisterType((*QueryNextSequenceSendRequest)(nil), "ibc.core.channel.v2.QueryNextSequenceSendRequest") proto.RegisterType((*QueryNextSequenceSendResponse)(nil), "ibc.core.channel.v2.QueryNextSequenceSendResponse") proto.RegisterType((*QueryPacketCommitmentRequest)(nil), "ibc.core.channel.v2.QueryPacketCommitmentRequest") @@ -1092,77 +1204,81 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v2/query.proto", fileDescriptor_a328cba4986edcab) } var fileDescriptor_a328cba4986edcab = []byte{ - // 1113 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x5f, 0x6f, 0xdb, 0x54, - 0x14, 0xef, 0x6d, 0xba, 0xb5, 0x3d, 0x29, 0xa3, 0xbb, 0x2b, 0x90, 0x79, 0x5d, 0x96, 0x19, 0x09, - 0xc2, 0xb4, 0xf9, 0x36, 0xd9, 0x04, 0x43, 0xda, 0x40, 0x6d, 0x19, 0x5b, 0x27, 0x40, 0xc5, 0x05, - 0x24, 0xd0, 0xb4, 0xc8, 0x71, 0xee, 0x5c, 0x2b, 0x89, 0xaf, 0x17, 0x3b, 0xa1, 0xd3, 0xd4, 0x17, - 0x1e, 0x78, 0x46, 0xec, 0x8d, 0x4f, 0x00, 0x2f, 0x7c, 0x05, 0x90, 0x78, 0x99, 0xb4, 0x97, 0x49, - 0x7b, 0x80, 0x27, 0x04, 0x2d, 0x12, 0xdf, 0x80, 0x67, 0x94, 0xeb, 0xeb, 0xf8, 0x4f, 0x1c, 0xd7, - 0xde, 0x56, 0xc4, 0x9b, 0x7d, 0x73, 0xfe, 0xfc, 0x7e, 0xe7, 0xfe, 0x8e, 0xcf, 0x51, 0xe0, 0x8c, - 0xd9, 0xd4, 0x89, 0xce, 0x7a, 0x94, 0xe8, 0xdb, 0x9a, 0x65, 0xd1, 0x0e, 0x19, 0xd4, 0xc9, 0xdd, - 0x3e, 0xed, 0xdd, 0x53, 0xec, 0x1e, 0x73, 0x19, 0x3e, 0x61, 0x36, 0x75, 0x65, 0x68, 0xa0, 0x08, - 0x03, 0x65, 0x50, 0x97, 0xce, 0xe9, 0xcc, 0xe9, 0x32, 0x87, 0x34, 0x35, 0x87, 0x7a, 0xd6, 0x64, - 0x50, 0x6b, 0x52, 0x57, 0xab, 0x11, 0x5b, 0x33, 0x4c, 0x4b, 0x73, 0x4d, 0x66, 0x79, 0x01, 0xa4, - 0xb3, 0x49, 0x19, 0xfc, 0x58, 0x29, 0x26, 0x06, 0xb5, 0xa8, 0x63, 0x3a, 0xc2, 0x24, 0x84, 0xb3, - 0x63, 0x52, 0xcb, 0x25, 0x83, 0x9a, 0x78, 0x12, 0x06, 0xcb, 0x06, 0x63, 0x46, 0x87, 0x12, 0xcd, - 0x36, 0x89, 0x66, 0x59, 0xcc, 0xe5, 0x18, 0x7c, 0xf7, 0x25, 0x83, 0x19, 0x8c, 0x3f, 0x92, 0xe1, - 0x93, 0x77, 0x2a, 0x5f, 0x82, 0x13, 0x1f, 0x0f, 0xc1, 0xaf, 0x7b, 0x59, 0x55, 0x7a, 0xb7, 0x4f, - 0x1d, 0x17, 0x9f, 0x06, 0x10, 0x38, 0x1a, 0x66, 0xab, 0x84, 0x2a, 0xa8, 0x3a, 0xaf, 0xce, 0x8b, - 0x93, 0x8d, 0x96, 0xfc, 0x09, 0x2c, 0x45, 0xbd, 0x1c, 0x9b, 0x59, 0x0e, 0xc5, 0x57, 0x60, 0x56, - 0x18, 0x71, 0x9f, 0x62, 0x7d, 0x59, 0x49, 0xa8, 0x9d, 0x22,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 0x86, 0x06, 0xab, - 0xb4, 0x92, 0xdd, 0x41, 0x70, 0xeb, 0x70, 0x6e, 0x77, 0x70, 0xeb, 0x19, 0xb9, 0x25, 0x0d, 0xec, - 0x08, 0xcd, 0x61, 0xbf, 0xad, 0x7d, 0xf6, 0x70, 0xaf, 0x8c, 0x1e, 0xef, 0x95, 0xd1, 0x1f, 0x7b, - 0x65, 0xf4, 0xcd, 0x7e, 0x79, 0xea, 0xf1, 0x7e, 0x79, 0xea, 0xb7, 0xfd, 0xf2, 0xd4, 0x17, 0x57, - 0x0c, 0xd3, 0xdd, 0xee, 0x37, 0x15, 0x9d, 0x75, 0x89, 0xf8, 0x57, 0xc6, 0x6c, 0xea, 0x17, 0x0c, - 0x46, 0x06, 0x6f, 0x93, 0x2e, 0x6b, 0xf5, 0x3b, 0xd4, 0xf1, 0xe0, 0xad, 0x5c, 0xba, 0x10, 0x42, - 0xe8, 0xde, 0xb3, 0xa9, 0xd3, 0x3c, 0xca, 0xff, 0x08, 0xb9, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xd2, 0x18, 0x54, 0x2c, 0x07, 0x12, 0x00, 0x00, + // 1177 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0xdc, 0x54, + 0x14, 0xce, 0xcd, 0xa4, 0x79, 0x9c, 0x04, 0x9a, 0xde, 0xa6, 0x90, 0xba, 0xc9, 0x24, 0x35, 0x02, + 0x42, 0xd4, 0xfa, 0x26, 0xd3, 0x0a, 0x8a, 0xd4, 0x82, 0x92, 0xd0, 0x47, 0x2a, 0x40, 0xc1, 0x01, + 0x24, 0x50, 0x95, 0x91, 0xc7, 0x73, 0xe3, 0x58, 0x33, 0xe3, 0xeb, 0x8e, 0x3d, 0x43, 0xaa, 0x2a, + 0x1b, 0x16, 0x88, 0x25, 0xa2, 0x3b, 0x7e, 0x01, 0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0x5d, 0xfa, 0x2f, 0x00, 0x00, 0xff, + 0xff, 0xa5, 0x66, 0xe3, 0xf5, 0xd3, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1179,6 +1295,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Channel queries the counterparty of an IBC client. Channel(ctx context.Context, in *QueryChannelRequest, opts ...grpc.CallOption) (*QueryChannelResponse, error) + // Channels queries all the IBC channels of a chain. + Channels(ctx context.Context, in *QueryChannelsRequest, opts ...grpc.CallOption) (*QueryChannelsResponse, error) // NextSequenceSend returns the next send sequence for a given channel. NextSequenceSend(ctx context.Context, in *QueryNextSequenceSendRequest, opts ...grpc.CallOption) (*QueryNextSequenceSendResponse, error) // PacketCommitment queries a stored packet commitment hash. @@ -1214,6 +1332,15 @@ func (c *queryClient) Channel(ctx context.Context, in *QueryChannelRequest, opts return out, nil } +func (c *queryClient) Channels(ctx context.Context, in *QueryChannelsRequest, opts ...grpc.CallOption) (*QueryChannelsResponse, error) { + out := new(QueryChannelsResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v2.Query/Channels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) NextSequenceSend(ctx context.Context, in *QueryNextSequenceSendRequest, opts ...grpc.CallOption) (*QueryNextSequenceSendResponse, error) { out := new(QueryNextSequenceSendResponse) err := c.cc.Invoke(ctx, "/ibc.core.channel.v2.Query/NextSequenceSend", in, out, opts...) @@ -1290,6 +1417,8 @@ func (c *queryClient) UnreceivedAcks(ctx context.Context, in *QueryUnreceivedAck type QueryServer interface { // Channel queries the counterparty of an IBC client. Channel(context.Context, *QueryChannelRequest) (*QueryChannelResponse, error) + // Channels queries all the IBC channels of a chain. + Channels(context.Context, *QueryChannelsRequest) (*QueryChannelsResponse, error) // NextSequenceSend returns the next send sequence for a given channel. NextSequenceSend(context.Context, *QueryNextSequenceSendRequest) (*QueryNextSequenceSendResponse, error) // PacketCommitment queries a stored packet commitment hash. @@ -1315,6 +1444,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Channel(ctx context.Context, req *QueryChannelRequest) (*QueryChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Channel not implemented") } +func (*UnimplementedQueryServer) Channels(ctx context.Context, req *QueryChannelsRequest) (*QueryChannelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Channels not implemented") +} func (*UnimplementedQueryServer) NextSequenceSend(ctx context.Context, req *QueryNextSequenceSendRequest) (*QueryNextSequenceSendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NextSequenceSend not implemented") } @@ -1362,6 +1494,24 @@ func _Query_Channel_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_Channels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryChannelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Channels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.channel.v2.Query/Channels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Channels(ctx, req.(*QueryChannelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_NextSequenceSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryNextSequenceSendRequest) if err := dec(in); err != nil { @@ -1514,6 +1664,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Channel", Handler: _Query_Channel_Handler, }, + { + MethodName: "Channels", + Handler: _Query_Channels_Handler, + }, { MethodName: "NextSequenceSend", Handler: _Query_NextSequenceSend_Handler, @@ -1614,6 +1768,100 @@ func (m *QueryChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryChannelsRequest) 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 *QueryChannelsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryChannelsRequest) 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryChannelsResponse) 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 *QueryChannelsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + 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.Channels) > 0 { + for iNdEx := len(m.Channels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Channels[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 *QueryNextSequenceSendRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1975,20 +2223,20 @@ func (m *QueryPacketAcknowledgementsRequest) MarshalToSizedBuffer(dAtA []byte) ( var l int _ = l if len(m.PacketCommitmentSequences) > 0 { - dAtA9 := make([]byte, len(m.PacketCommitmentSequences)*10) - var j8 int + dAtA12 := make([]byte, len(m.PacketCommitmentSequences)*10) + var j11 int for _, num := range m.PacketCommitmentSequences { for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j8++ + j11++ } - dAtA9[j8] = uint8(num) - j8++ + dAtA12[j11] = uint8(num) + j11++ } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintQuery(dAtA, i, uint64(j8)) + i -= j11 + copy(dAtA[i:], dAtA12[:j11]) + i = encodeVarintQuery(dAtA, i, uint64(j11)) i-- dAtA[i] = 0x1a } @@ -2186,20 +2434,20 @@ func (m *QueryUnreceivedPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, var l int _ = l if len(m.Sequences) > 0 { - dAtA15 := make([]byte, len(m.Sequences)*10) - var j14 int + dAtA18 := make([]byte, len(m.Sequences)*10) + var j17 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j14++ + j17++ } - dAtA15[j14] = uint8(num) - j14++ + dAtA18[j17] = uint8(num) + j17++ } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintQuery(dAtA, i, uint64(j14)) + i -= j17 + copy(dAtA[i:], dAtA18[:j17]) + i = encodeVarintQuery(dAtA, i, uint64(j17)) i-- dAtA[i] = 0x12 } @@ -2244,20 +2492,20 @@ func (m *QueryUnreceivedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i-- dAtA[i] = 0x12 if len(m.Sequences) > 0 { - dAtA18 := make([]byte, len(m.Sequences)*10) - var j17 int + dAtA21 := make([]byte, len(m.Sequences)*10) + var j20 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + dAtA21[j20] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j17++ + j20++ } - dAtA18[j17] = uint8(num) - j17++ + dAtA21[j20] = uint8(num) + j20++ } - i -= j17 - copy(dAtA[i:], dAtA18[:j17]) - i = encodeVarintQuery(dAtA, i, uint64(j17)) + i -= j20 + copy(dAtA[i:], dAtA21[:j20]) + i = encodeVarintQuery(dAtA, i, uint64(j20)) i-- dAtA[i] = 0xa } @@ -2285,20 +2533,20 @@ func (m *QueryUnreceivedAcksRequest) MarshalToSizedBuffer(dAtA []byte) (int, err var l int _ = l if len(m.PacketAckSequences) > 0 { - dAtA20 := make([]byte, len(m.PacketAckSequences)*10) - var j19 int + dAtA23 := make([]byte, len(m.PacketAckSequences)*10) + var j22 int for _, num := range m.PacketAckSequences { for num >= 1<<7 { - dAtA20[j19] = uint8(uint64(num)&0x7f | 0x80) + dAtA23[j22] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j19++ + j22++ } - dAtA20[j19] = uint8(num) - j19++ + dAtA23[j22] = uint8(num) + j22++ } - i -= j19 - copy(dAtA[i:], dAtA20[:j19]) - i = encodeVarintQuery(dAtA, i, uint64(j19)) + i -= j22 + copy(dAtA[i:], dAtA23[:j22]) + i = encodeVarintQuery(dAtA, i, uint64(j22)) i-- dAtA[i] = 0x12 } @@ -2343,20 +2591,20 @@ func (m *QueryUnreceivedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, er i-- dAtA[i] = 0x12 if len(m.Sequences) > 0 { - dAtA23 := make([]byte, len(m.Sequences)*10) - var j22 int + dAtA26 := make([]byte, len(m.Sequences)*10) + var j25 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA23[j22] = uint8(uint64(num)&0x7f | 0x80) + dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j22++ + j25++ } - dAtA23[j22] = uint8(num) - j22++ + dAtA26[j25] = uint8(num) + j25++ } - i -= j22 - copy(dAtA[i:], dAtA23[:j22]) - i = encodeVarintQuery(dAtA, i, uint64(j22)) + i -= j25 + copy(dAtA[i:], dAtA26[:j25]) + i = encodeVarintQuery(dAtA, i, uint64(j25)) i-- dAtA[i] = 0xa } @@ -2398,6 +2646,40 @@ func (m *QueryChannelResponse) Size() (n int) { return n } +func (m *QueryChannelsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryChannelsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Channels) > 0 { + for _, e := range m.Channels { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryNextSequenceSendRequest) Size() (n int) { if m == nil { return 0 @@ -2867,6 +3149,245 @@ func (m *QueryChannelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryChannelsRequest) 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: QueryChannelsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryChannelsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 *QueryChannelsResponse) 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: QueryChannelsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryChannelsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channels", 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.Channels = append(m.Channels, &IdentifiedChannel{}) + if err := m.Channels[len(m.Channels)-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 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", 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 err := m.Height.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 *QueryNextSequenceSendRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/04-channel/v2/types/query.pb.gw.go b/modules/core/04-channel/v2/types/query.pb.gw.go index 2f03fdadfd5..20a9195f964 100644 --- a/modules/core/04-channel/v2/types/query.pb.gw.go +++ b/modules/core/04-channel/v2/types/query.pb.gw.go @@ -87,6 +87,42 @@ func local_request_Query_Channel_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Query_Channels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Channels_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryChannelsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Channels_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Channels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Channels_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryChannelsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Channels_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Channels(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_NextSequenceSend_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryNextSequenceSendRequest var metadata runtime.ServerMetadata @@ -712,6 +748,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Channels_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_Channels_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_Channels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_NextSequenceSend_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -957,6 +1016,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Channels_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_Channels_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_Channels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_NextSequenceSend_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1123,6 +1202,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Channel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "channel", "v2", "channels", "channel_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Channels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "core", "channel", "v2", "channels"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_NextSequenceSend_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"ibc", "core", "channel", "v2", "channels", "channel_id", "next_sequence_send"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_PacketCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"ibc", "core", "channel", "v2", "channels", "channel_id", "packet_commitments", "sequence"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1143,6 +1224,8 @@ var ( var ( forward_Query_Channel_0 = runtime.ForwardResponseMessage + forward_Query_Channels_0 = runtime.ForwardResponseMessage + forward_Query_NextSequenceSend_0 = runtime.ForwardResponseMessage forward_Query_PacketCommitment_0 = runtime.ForwardResponseMessage diff --git a/proto/ibc/core/channel/v2/query.proto b/proto/ibc/core/channel/v2/query.proto index 40d1cdc31eb..83cb491ba5b 100644 --- a/proto/ibc/core/channel/v2/query.proto +++ b/proto/ibc/core/channel/v2/query.proto @@ -18,6 +18,11 @@ service Query { option (google.api.http).get = "/ibc/core/channel/v2/channels/{channel_id}"; } + // Channels queries all the IBC channels of a chain. + rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { + option (google.api.http).get = "/ibc/core/channel/v2/channels"; + } + // NextSequenceSend returns the next send sequence for a given channel. rpc NextSequenceSend(QueryNextSequenceSendRequest) returns (QueryNextSequenceSendResponse) { option (google.api.http).get = "/ibc/core/channel/v2/channels/{channel_id}/next_sequence_send"; @@ -66,12 +71,28 @@ message QueryChannelRequest { string channel_id = 1; } -// QueryChannelRequest is the response type for the Query/Channel RPC method +// QueryChannelResponse is the response type for the Query/Channel RPC method message QueryChannelResponse { // the channel associated with the provided channel id Channel channel = 1 [(gogoproto.nullable) = false]; } +// QueryChannelsRequest is the request type for the Query/Channels RPC method +message QueryChannelsRequest { + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryChannelsResponse is the response type for the Query/Channels RPC method. +message QueryChannelsResponse { + // list of stored channels of the chain. + repeated ibc.core.channel.v2.IdentifiedChannel channels = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + // QueryNextSequenceSendRequest is the request type for the Query/QueryNextSequenceSend RPC method message QueryNextSequenceSendRequest { // channel unique identifier