diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7b86ca8d39..75ea3755d85 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,6 +51,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (apps/29-fee) [\#1224](https://github.com/cosmos/ibc-go/pull/1224) Adding Query/CounterpartyAddress and CLI to ICS29 fee middleware
+* (apps/29-fee) [\#1225](https://github.com/cosmos/ibc-go/pull/1225) Adding Query/FeeEnabledChannel and Query/FeeEnabledChannels with CLIs to ICS29 fee middleware.
+
### Bug Fixes
* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output
diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md
index ad54c1cf9d6..267feaeb581 100644
--- a/docs/ibc/proto-docs.md
+++ b/docs/ibc/proto-docs.md
@@ -46,6 +46,10 @@
- [ibc/applications/fee/v1/query.proto](#ibc/applications/fee/v1/query.proto)
- [QueryCounterpartyAddressRequest](#ibc.applications.fee.v1.QueryCounterpartyAddressRequest)
- [QueryCounterpartyAddressResponse](#ibc.applications.fee.v1.QueryCounterpartyAddressResponse)
+ - [QueryFeeEnabledChannelRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelRequest)
+ - [QueryFeeEnabledChannelResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelResponse)
+ - [QueryFeeEnabledChannelsRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest)
+ - [QueryFeeEnabledChannelsResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse)
- [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest)
- [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse)
- [QueryIncentivizedPacketsForChannelRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest)
@@ -939,6 +943,68 @@ QueryCounterpartyAddressResponse defines the response type for the CounterpartyA
+
+
+### QueryFeeEnabledChannelRequest
+QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `port_id` | [string](#string) | | unique port identifier |
+| `channel_id` | [string](#string) | | unique channel identifier |
+
+
+
+
+
+
+
+
+### QueryFeeEnabledChannelResponse
+QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `fee_enabled` | [bool](#bool) | | boolean flag representing the fee enabled channel status |
+
+
+
+
+
+
+
+
+### QueryFeeEnabledChannelsRequest
+QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
+| `query_height` | [uint64](#uint64) | | block height at which to query |
+
+
+
+
+
+
+
+
+### QueryFeeEnabledChannelsResponse
+QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `fee_enabled_channels` | [FeeEnabledChannel](#ibc.applications.fee.v1.FeeEnabledChannel) | repeated | list of fee enabled channels |
+
+
+
+
+
+
### QueryIncentivizedPacketRequest
@@ -1145,6 +1211,8 @@ Query defines the ICS29 gRPC querier service.
| `TotalAckFees` | [QueryTotalAckFeesRequest](#ibc.applications.fee.v1.QueryTotalAckFeesRequest) | [QueryTotalAckFeesResponse](#ibc.applications.fee.v1.QueryTotalAckFeesResponse) | TotalAckFees returns the total acknowledgement fees for a packet given its identifier | GET|/ibc/apps/fee/v1/total_ack_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}|
| `TotalTimeoutFees` | [QueryTotalTimeoutFeesRequest](#ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest) | [QueryTotalTimeoutFeesResponse](#ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse) | TotalTimeoutFees returns the total timeout fees for a packet given its identifier | GET|/ibc/apps/fee/v1/total_timeout_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}|
| `CounterpartyAddress` | [QueryCounterpartyAddressRequest](#ibc.applications.fee.v1.QueryCounterpartyAddressRequest) | [QueryCounterpartyAddressResponse](#ibc.applications.fee.v1.QueryCounterpartyAddressResponse) | CounterpartyAddress returns the registered counterparty address for forward relaying | GET|/ibc/apps/fee/v1/counterparty_address/{relayer_address}/channel/{channel_id}|
+| `FeeEnabledChannels` | [QueryFeeEnabledChannelsRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest) | [QueryFeeEnabledChannelsResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse) | FeeEnabledChannels returns a list of all fee enabled channels | GET|/ibc/apps/fee/v1/fee_enabled|
+| `FeeEnabledChannel` | [QueryFeeEnabledChannelRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelRequest) | [QueryFeeEnabledChannelResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) | FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel | GET|/ibc/apps/fee/v1/fee_enabled/port/{port_id}/channel/{channel_id}|
diff --git a/modules/apps/29-fee/client/cli/cli.go b/modules/apps/29-fee/client/cli/cli.go
index 2279e741556..c2afc6e25ed 100644
--- a/modules/apps/29-fee/client/cli/cli.go
+++ b/modules/apps/29-fee/client/cli/cli.go
@@ -21,6 +21,8 @@ func GetQueryCmd() *cobra.Command {
GetCmdTotalAckFees(),
GetCmdTotalTimeoutFees(),
GetCmdCounterpartyAddress(),
+ GetCmdFeeEnabledChannel(),
+ GetCmdFeeEnabledChannels(),
)
return queryCmd
diff --git a/modules/apps/29-fee/client/cli/query.go b/modules/apps/29-fee/client/cli/query.go
index 9c96afc9478..9eca35cae48 100644
--- a/modules/apps/29-fee/client/cli/query.go
+++ b/modules/apps/29-fee/client/cli/query.go
@@ -274,3 +274,79 @@ func GetCmdCounterpartyAddress() *cobra.Command {
return cmd
}
+
+// GetCmdFeeEnabledChannels returns the command handler for the Query/FeeEnabledChannels rpc.
+func GetCmdFeeEnabledChannels() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "channels",
+ Short: "Query the ibc-fee enabled channels",
+ Long: "Query the ibc-fee enabled channels",
+ Args: cobra.NoArgs,
+ Example: fmt.Sprintf("%s query ibc-fee channels", version.AppName),
+ RunE: func(cmd *cobra.Command, args []string) error {
+ clientCtx, err := client.GetClientQueryContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ pageReq, err := client.ReadPageRequest(cmd.Flags())
+ if err != nil {
+ return err
+ }
+
+ req := &types.QueryFeeEnabledChannelsRequest{
+ Pagination: pageReq,
+ QueryHeight: uint64(clientCtx.Height),
+ }
+
+ queryClient := types.NewQueryClient(clientCtx)
+
+ res, err := queryClient.FeeEnabledChannels(cmd.Context(), req)
+ if err != nil {
+ return err
+ }
+
+ return clientCtx.PrintProto(res)
+ },
+ }
+
+ flags.AddQueryFlagsToCmd(cmd)
+ flags.AddPaginationFlagsToCmd(cmd, "channels")
+
+ return cmd
+}
+
+// GetCmdFeeEnabledChannel returns the command handler for the Query/FeeEnabledChannel rpc.
+func GetCmdFeeEnabledChannel() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "channel [port-id] [channel-id]",
+ Short: "Query the ibc-fee enabled status of a channel",
+ Long: "Query the ibc-fee enabled status of a channel",
+ Args: cobra.ExactArgs(2),
+ Example: fmt.Sprintf("%s query ibc-fee channel transfer channel-6", version.AppName),
+ RunE: func(cmd *cobra.Command, args []string) error {
+ clientCtx, err := client.GetClientQueryContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ req := &types.QueryFeeEnabledChannelRequest{
+ PortId: args[0],
+ ChannelId: args[1],
+ }
+
+ queryClient := types.NewQueryClient(clientCtx)
+
+ res, err := queryClient.FeeEnabledChannel(cmd.Context(), req)
+ if err != nil {
+ return err
+ }
+
+ return clientCtx.PrintProto(res)
+ },
+ }
+
+ flags.AddQueryFlagsToCmd(cmd)
+
+ return cmd
+}
diff --git a/modules/apps/29-fee/keeper/grpc_query.go b/modules/apps/29-fee/keeper/grpc_query.go
index ea893db61c3..10da5bc5595 100644
--- a/modules/apps/29-fee/keeper/grpc_query.go
+++ b/modules/apps/29-fee/keeper/grpc_query.go
@@ -191,3 +191,54 @@ func (k Keeper) CounterpartyAddress(goCtx context.Context, req *types.QueryCount
CounterpartyAddress: counterpartyAddr,
}, nil
}
+
+// FeeEnabledChannels implements the Query/FeeEnabledChannels gRPC method and returns a list of fee enabled channels
+func (k Keeper) FeeEnabledChannels(goCtx context.Context, req *types.QueryFeeEnabledChannelsRequest) (*types.QueryFeeEnabledChannelsResponse, error) {
+ if req == nil {
+ return nil, status.Error(codes.InvalidArgument, "empty request")
+ }
+
+ ctx := sdk.UnwrapSDKContext(goCtx).WithBlockHeight(int64(req.QueryHeight))
+
+ var feeEnabledChannels []types.FeeEnabledChannel
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.FeeEnabledKeyPrefix))
+ _, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
+ portID, channelID, err := types.ParseKeyFeeEnabled(types.FeeEnabledKeyPrefix + string(key))
+ if err != nil {
+ return err
+ }
+
+ feeEnabledChannel := types.FeeEnabledChannel{
+ PortId: portID,
+ ChannelId: channelID,
+ }
+
+ feeEnabledChannels = append(feeEnabledChannels, feeEnabledChannel)
+
+ return nil
+ })
+
+ if err != nil {
+ return nil, status.Error(codes.NotFound, err.Error())
+ }
+
+ return &types.QueryFeeEnabledChannelsResponse{
+ FeeEnabledChannels: feeEnabledChannels,
+ }, nil
+}
+
+// FeeEnabledChannel implements the Query/FeeEnabledChannel gRPC method and returns true if the provided
+// port and channel identifiers belong to a fee enabled channel
+func (k Keeper) FeeEnabledChannel(goCtx context.Context, req *types.QueryFeeEnabledChannelRequest) (*types.QueryFeeEnabledChannelResponse, error) {
+ if req == nil {
+ return nil, status.Error(codes.InvalidArgument, "empty request")
+ }
+
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ isFeeEnabled := k.IsFeeEnabled(ctx, req.PortId, req.ChannelId)
+
+ return &types.QueryFeeEnabledChannelResponse{
+ FeeEnabled: isFeeEnabled,
+ }, nil
+}
diff --git a/modules/apps/29-fee/keeper/grpc_query_test.go b/modules/apps/29-fee/keeper/grpc_query_test.go
index 9802dd9216c..516a31e87b2 100644
--- a/modules/apps/29-fee/keeper/grpc_query_test.go
+++ b/modules/apps/29-fee/keeper/grpc_query_test.go
@@ -493,3 +493,161 @@ func (suite *KeeperTestSuite) TestQueryCounterpartyAddress() {
})
}
}
+
+func (suite *KeeperTestSuite) TestQueryFeeEnabledChannels() {
+ var (
+ req *types.QueryFeeEnabledChannelsRequest
+ expFeeEnabledChannels []types.FeeEnabledChannel
+ )
+
+ testCases := []struct {
+ name string
+ malleate func()
+ expPass bool
+ }{
+ {
+ "success",
+ func() {},
+ true,
+ },
+ {
+ "success: empty pagination",
+ func() {
+ req = &types.QueryFeeEnabledChannelsRequest{}
+ },
+ true,
+ },
+ {
+ "success: with multiple fee enabled channels",
+ func() {
+ suite.coordinator.Setup(suite.pathAToC)
+
+ expChannel := types.FeeEnabledChannel{
+ PortId: suite.pathAToC.EndpointA.ChannelConfig.PortID,
+ ChannelId: suite.pathAToC.EndpointA.ChannelID,
+ }
+
+ expFeeEnabledChannels = append(expFeeEnabledChannels, expChannel)
+ },
+ true,
+ },
+ {
+ "success: pagination with multiple fee enabled channels",
+ func() {
+ // start at index 1, as channel-0 is already added to expFeeEnabledChannels below
+ for i := 1; i < 10; i++ {
+ channelID := channeltypes.FormatChannelIdentifier(uint64(i))
+ suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, channelID)
+
+ expChannel := types.FeeEnabledChannel{
+ PortId: ibctesting.MockFeePort,
+ ChannelId: channelID,
+ }
+
+ if i < 5 { // add only the first 5 channels, as our default pagination limit is 5
+ expFeeEnabledChannels = append(expFeeEnabledChannels, expChannel)
+ }
+ }
+
+ suite.chainA.NextBlock()
+ },
+ true,
+ },
+ {
+ "empty response",
+ func() {
+ suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)
+ expFeeEnabledChannels = nil
+
+ suite.chainA.NextBlock()
+ },
+ true,
+ },
+ }
+
+ for _, tc := range testCases {
+ suite.Run(tc.name, func() {
+ suite.SetupTest() // reset
+
+ suite.coordinator.Setup(suite.path)
+
+ expChannel := types.FeeEnabledChannel{
+ PortId: suite.path.EndpointA.ChannelConfig.PortID,
+ ChannelId: suite.path.EndpointA.ChannelID,
+ }
+
+ expFeeEnabledChannels = []types.FeeEnabledChannel{expChannel}
+
+ req = &types.QueryFeeEnabledChannelsRequest{
+ Pagination: &query.PageRequest{
+ Limit: 5,
+ CountTotal: false,
+ },
+ QueryHeight: 0,
+ }
+
+ tc.malleate()
+
+ ctx := sdk.WrapSDKContext(suite.chainA.GetContext())
+ res, err := suite.queryClient.FeeEnabledChannels(ctx, req)
+
+ if tc.expPass {
+ suite.Require().NoError(err)
+ suite.Require().Equal(expFeeEnabledChannels, res.FeeEnabledChannels)
+ } else {
+ suite.Require().Error(err)
+ }
+ })
+ }
+}
+
+func (suite *KeeperTestSuite) TestQueryFeeEnabledChannel() {
+ var (
+ req *types.QueryFeeEnabledChannelRequest
+ )
+
+ testCases := []struct {
+ name string
+ malleate func()
+ expPass bool
+ }{
+ {
+ "success",
+ func() {},
+ true,
+ },
+ {
+ "fee not enabled on channel",
+ func() {
+ req.ChannelId = "invalid-channel-id"
+ req.PortId = "invalid-port-id"
+ },
+ false,
+ },
+ }
+
+ for _, tc := range testCases {
+ suite.Run(tc.name, func() {
+ suite.SetupTest() // reset
+
+ suite.coordinator.Setup(suite.path)
+
+ req = &types.QueryFeeEnabledChannelRequest{
+ PortId: suite.path.EndpointA.ChannelConfig.PortID,
+ ChannelId: suite.path.EndpointA.ChannelID,
+ }
+
+ tc.malleate()
+
+ ctx := sdk.WrapSDKContext(suite.chainA.GetContext())
+ res, err := suite.queryClient.FeeEnabledChannel(ctx, req)
+
+ if tc.expPass {
+ suite.Require().NoError(err)
+ suite.Require().True(res.FeeEnabled)
+ } else {
+ suite.Require().False(res.FeeEnabled)
+ }
+ })
+ }
+}
diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go
index 850bb1eb19a..2d2231f85be 100644
--- a/modules/apps/29-fee/types/query.pb.go
+++ b/modules/apps/29-fee/types/query.pb.go
@@ -738,6 +738,208 @@ func (m *QueryCounterpartyAddressResponse) GetCounterpartyAddress() string {
return ""
}
+// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc
+type QueryFeeEnabledChannelsRequest struct {
+ // pagination defines an optional pagination for the request.
+ Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
+ // block height at which to query
+ QueryHeight uint64 `protobuf:"varint,2,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"`
+}
+
+func (m *QueryFeeEnabledChannelsRequest) Reset() { *m = QueryFeeEnabledChannelsRequest{} }
+func (m *QueryFeeEnabledChannelsRequest) String() string { return proto.CompactTextString(m) }
+func (*QueryFeeEnabledChannelsRequest) ProtoMessage() {}
+func (*QueryFeeEnabledChannelsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0638a8a78ca2503c, []int{14}
+}
+func (m *QueryFeeEnabledChannelsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryFeeEnabledChannelsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryFeeEnabledChannelsRequest.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 *QueryFeeEnabledChannelsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryFeeEnabledChannelsRequest.Merge(m, src)
+}
+func (m *QueryFeeEnabledChannelsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryFeeEnabledChannelsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryFeeEnabledChannelsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryFeeEnabledChannelsRequest proto.InternalMessageInfo
+
+func (m *QueryFeeEnabledChannelsRequest) GetPagination() *query.PageRequest {
+ if m != nil {
+ return m.Pagination
+ }
+ return nil
+}
+
+func (m *QueryFeeEnabledChannelsRequest) GetQueryHeight() uint64 {
+ if m != nil {
+ return m.QueryHeight
+ }
+ return 0
+}
+
+// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc
+type QueryFeeEnabledChannelsResponse struct {
+ // list of fee enabled channels
+ FeeEnabledChannels []FeeEnabledChannel `protobuf:"bytes,1,rep,name=fee_enabled_channels,json=feeEnabledChannels,proto3" json:"fee_enabled_channels" yaml:"fee_enabled_channels"`
+}
+
+func (m *QueryFeeEnabledChannelsResponse) Reset() { *m = QueryFeeEnabledChannelsResponse{} }
+func (m *QueryFeeEnabledChannelsResponse) String() string { return proto.CompactTextString(m) }
+func (*QueryFeeEnabledChannelsResponse) ProtoMessage() {}
+func (*QueryFeeEnabledChannelsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0638a8a78ca2503c, []int{15}
+}
+func (m *QueryFeeEnabledChannelsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryFeeEnabledChannelsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryFeeEnabledChannelsResponse.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 *QueryFeeEnabledChannelsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryFeeEnabledChannelsResponse.Merge(m, src)
+}
+func (m *QueryFeeEnabledChannelsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryFeeEnabledChannelsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryFeeEnabledChannelsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryFeeEnabledChannelsResponse proto.InternalMessageInfo
+
+func (m *QueryFeeEnabledChannelsResponse) GetFeeEnabledChannels() []FeeEnabledChannel {
+ if m != nil {
+ return m.FeeEnabledChannels
+ }
+ return nil
+}
+
+// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc
+type QueryFeeEnabledChannelRequest struct {
+ // unique port identifier
+ PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
+ // unique channel identifier
+ ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
+}
+
+func (m *QueryFeeEnabledChannelRequest) Reset() { *m = QueryFeeEnabledChannelRequest{} }
+func (m *QueryFeeEnabledChannelRequest) String() string { return proto.CompactTextString(m) }
+func (*QueryFeeEnabledChannelRequest) ProtoMessage() {}
+func (*QueryFeeEnabledChannelRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0638a8a78ca2503c, []int{16}
+}
+func (m *QueryFeeEnabledChannelRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryFeeEnabledChannelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryFeeEnabledChannelRequest.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 *QueryFeeEnabledChannelRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryFeeEnabledChannelRequest.Merge(m, src)
+}
+func (m *QueryFeeEnabledChannelRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryFeeEnabledChannelRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryFeeEnabledChannelRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryFeeEnabledChannelRequest proto.InternalMessageInfo
+
+func (m *QueryFeeEnabledChannelRequest) GetPortId() string {
+ if m != nil {
+ return m.PortId
+ }
+ return ""
+}
+
+func (m *QueryFeeEnabledChannelRequest) GetChannelId() string {
+ if m != nil {
+ return m.ChannelId
+ }
+ return ""
+}
+
+// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc
+type QueryFeeEnabledChannelResponse struct {
+ // boolean flag representing the fee enabled channel status
+ FeeEnabled bool `protobuf:"varint,1,opt,name=fee_enabled,json=feeEnabled,proto3" json:"fee_enabled,omitempty" yaml:"fee_enabled"`
+}
+
+func (m *QueryFeeEnabledChannelResponse) Reset() { *m = QueryFeeEnabledChannelResponse{} }
+func (m *QueryFeeEnabledChannelResponse) String() string { return proto.CompactTextString(m) }
+func (*QueryFeeEnabledChannelResponse) ProtoMessage() {}
+func (*QueryFeeEnabledChannelResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0638a8a78ca2503c, []int{17}
+}
+func (m *QueryFeeEnabledChannelResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryFeeEnabledChannelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryFeeEnabledChannelResponse.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 *QueryFeeEnabledChannelResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryFeeEnabledChannelResponse.Merge(m, src)
+}
+func (m *QueryFeeEnabledChannelResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryFeeEnabledChannelResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryFeeEnabledChannelResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryFeeEnabledChannelResponse proto.InternalMessageInfo
+
+func (m *QueryFeeEnabledChannelResponse) GetFeeEnabled() bool {
+ if m != nil {
+ return m.FeeEnabled
+ }
+ return false
+}
+
func init() {
proto.RegisterType((*QueryIncentivizedPacketsRequest)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketsRequest")
proto.RegisterType((*QueryIncentivizedPacketsResponse)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketsResponse")
@@ -753,6 +955,10 @@ func init() {
proto.RegisterType((*QueryTotalTimeoutFeesResponse)(nil), "ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse")
proto.RegisterType((*QueryCounterpartyAddressRequest)(nil), "ibc.applications.fee.v1.QueryCounterpartyAddressRequest")
proto.RegisterType((*QueryCounterpartyAddressResponse)(nil), "ibc.applications.fee.v1.QueryCounterpartyAddressResponse")
+ proto.RegisterType((*QueryFeeEnabledChannelsRequest)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest")
+ proto.RegisterType((*QueryFeeEnabledChannelsResponse)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse")
+ proto.RegisterType((*QueryFeeEnabledChannelRequest)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelRequest")
+ proto.RegisterType((*QueryFeeEnabledChannelResponse)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelResponse")
}
func init() {
@@ -760,76 +966,88 @@ func init() {
}
var fileDescriptor_0638a8a78ca2503c = []byte{
- // 1097 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45,
- 0x1c, 0xcd, 0xa4, 0xa1, 0x8d, 0x27, 0x29, 0x2d, 0xe3, 0x40, 0x53, 0xd3, 0xd8, 0xe9, 0x22, 0x20,
- 0x54, 0xf2, 0x8e, 0xe2, 0x50, 0x68, 0x11, 0x42, 0xd4, 0xae, 0x02, 0x91, 0x10, 0x94, 0x55, 0x4e,
- 0x08, 0xe4, 0xae, 0x77, 0xc7, 0xce, 0x2a, 0xf6, 0xce, 0x76, 0x77, 0x6d, 0x70, 0xdd, 0x20, 0x51,
- 0x29, 0x42, 0x42, 0x15, 0x42, 0x42, 0xe2, 0x80, 0x38, 0x70, 0x43, 0xe2, 0x1b, 0xf0, 0x0d, 0x7a,
- 0x42, 0x95, 0xb8, 0x70, 0x32, 0x55, 0xc2, 0x99, 0x43, 0xc4, 0x81, 0x23, 0x9a, 0x3f, 0xbb, 0x5e,
- 0x77, 0x77, 0x13, 0x3b, 0x75, 0x4e, 0xb1, 0xe7, 0xf7, 0xef, 0xbd, 0x37, 0xe3, 0x79, 0x13, 0xf8,
- 0x92, 0x55, 0x33, 0xb0, 0xee, 0x38, 0x4d, 0xcb, 0xd0, 0x7d, 0x8b, 0xda, 0x1e, 0xae, 0x13, 0x82,
- 0x3b, 0xab, 0xf8, 0x4e, 0x9b, 0xb8, 0x5d, 0xd5, 0x71, 0xa9, 0x4f, 0xd1, 0x05, 0xab, 0x66, 0xa8,
- 0xd1, 0x24, 0xb5, 0x4e, 0x88, 0xda, 0x59, 0xcd, 0x2d, 0x34, 0x68, 0x83, 0xf2, 0x1c, 0xcc, 0x3e,
- 0x89, 0xf4, 0xdc, 0xa5, 0x06, 0xa5, 0x8d, 0x26, 0xc1, 0xba, 0x63, 0x61, 0xdd, 0xb6, 0xa9, 0x2f,
- 0x8b, 0x44, 0x34, 0x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xef, 0xe6, 0xc0, 0x93, 0xdd, 0x1c,
+ 0xf8, 0x6a, 0x2f, 0x37, 0xf0, 0x78, 0x2f, 0x37, 0xf0, 0xdb, 0x5e, 0x6e, 0xe0, 0x83, 0x4b, 0x51,
+ 0x87, 0x6e, 0x54, 0xb4, 0xf9, 0x1a, 0x95, 0x9b, 0x8b, 0xf2, 0x06, 0xd5, 0x1b, 0x75, 0xe2, 0xf0,
+ 0xa3, 0x0b, 0x57, 0xe7, 0xbd, 0xd3, 0x99, 0x69, 0xaf, 0x1c, 0x67, 0xff, 0x37, 0x5a, 0xfc, 0x27,
+ 0x00, 0x00, 0xff, 0xff, 0xac, 0x50, 0xbb, 0x05, 0x64, 0x13, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -858,6 +1076,10 @@ type QueryClient interface {
TotalTimeoutFees(ctx context.Context, in *QueryTotalTimeoutFeesRequest, opts ...grpc.CallOption) (*QueryTotalTimeoutFeesResponse, error)
// CounterpartyAddress returns the registered counterparty address for forward relaying
CounterpartyAddress(ctx context.Context, in *QueryCounterpartyAddressRequest, opts ...grpc.CallOption) (*QueryCounterpartyAddressResponse, error)
+ // FeeEnabledChannels returns a list of all fee enabled channels
+ FeeEnabledChannels(ctx context.Context, in *QueryFeeEnabledChannelsRequest, opts ...grpc.CallOption) (*QueryFeeEnabledChannelsResponse, error)
+ // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel
+ FeeEnabledChannel(ctx context.Context, in *QueryFeeEnabledChannelRequest, opts ...grpc.CallOption) (*QueryFeeEnabledChannelResponse, error)
}
type queryClient struct {
@@ -931,6 +1153,24 @@ func (c *queryClient) CounterpartyAddress(ctx context.Context, in *QueryCounterp
return out, nil
}
+func (c *queryClient) FeeEnabledChannels(ctx context.Context, in *QueryFeeEnabledChannelsRequest, opts ...grpc.CallOption) (*QueryFeeEnabledChannelsResponse, error) {
+ out := new(QueryFeeEnabledChannelsResponse)
+ err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/FeeEnabledChannels", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *queryClient) FeeEnabledChannel(ctx context.Context, in *QueryFeeEnabledChannelRequest, opts ...grpc.CallOption) (*QueryFeeEnabledChannelResponse, error) {
+ out := new(QueryFeeEnabledChannelResponse)
+ err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/FeeEnabledChannel", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// QueryServer is the server API for Query service.
type QueryServer interface {
// IncentivizedPackets returns all incentivized packets and their associated fees
@@ -947,6 +1187,10 @@ type QueryServer interface {
TotalTimeoutFees(context.Context, *QueryTotalTimeoutFeesRequest) (*QueryTotalTimeoutFeesResponse, error)
// CounterpartyAddress returns the registered counterparty address for forward relaying
CounterpartyAddress(context.Context, *QueryCounterpartyAddressRequest) (*QueryCounterpartyAddressResponse, error)
+ // FeeEnabledChannels returns a list of all fee enabled channels
+ FeeEnabledChannels(context.Context, *QueryFeeEnabledChannelsRequest) (*QueryFeeEnabledChannelsResponse, error)
+ // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel
+ FeeEnabledChannel(context.Context, *QueryFeeEnabledChannelRequest) (*QueryFeeEnabledChannelResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@@ -974,6 +1218,12 @@ func (*UnimplementedQueryServer) TotalTimeoutFees(ctx context.Context, req *Quer
func (*UnimplementedQueryServer) CounterpartyAddress(ctx context.Context, req *QueryCounterpartyAddressRequest) (*QueryCounterpartyAddressResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CounterpartyAddress not implemented")
}
+func (*UnimplementedQueryServer) FeeEnabledChannels(ctx context.Context, req *QueryFeeEnabledChannelsRequest) (*QueryFeeEnabledChannelsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method FeeEnabledChannels not implemented")
+}
+func (*UnimplementedQueryServer) FeeEnabledChannel(ctx context.Context, req *QueryFeeEnabledChannelRequest) (*QueryFeeEnabledChannelResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method FeeEnabledChannel not implemented")
+}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@@ -1105,6 +1355,42 @@ func _Query_CounterpartyAddress_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
+func _Query_FeeEnabledChannels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(QueryFeeEnabledChannelsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(QueryServer).FeeEnabledChannels(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ibc.applications.fee.v1.Query/FeeEnabledChannels",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(QueryServer).FeeEnabledChannels(ctx, req.(*QueryFeeEnabledChannelsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Query_FeeEnabledChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(QueryFeeEnabledChannelRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(QueryServer).FeeEnabledChannel(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ibc.applications.fee.v1.Query/FeeEnabledChannel",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(QueryServer).FeeEnabledChannel(ctx, req.(*QueryFeeEnabledChannelRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "ibc.applications.fee.v1.Query",
HandlerType: (*QueryServer)(nil),
@@ -1137,6 +1423,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "CounterpartyAddress",
Handler: _Query_CounterpartyAddress_Handler,
},
+ {
+ MethodName: "FeeEnabledChannels",
+ Handler: _Query_FeeEnabledChannels_Handler,
+ },
+ {
+ MethodName: "FeeEnabledChannel",
+ Handler: _Query_FeeEnabledChannel_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "ibc/applications/fee/v1/query.proto",
@@ -1658,54 +1952,201 @@ func (m *QueryCounterpartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (in
return len(dAtA) - i, nil
}
-func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
- offset -= sovQuery(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
+func (m *QueryFeeEnabledChannelsRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- dAtA[offset] = uint8(v)
- return base
+ return dAtA[:n], nil
}
-func (m *QueryIncentivizedPacketsRequest) Size() (n int) {
- if m == nil {
- return 0
- }
+
+func (m *QueryFeeEnabledChannelsRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryFeeEnabledChannelsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- if m.Pagination != nil {
- l = m.Pagination.Size()
- n += 1 + l + sovQuery(uint64(l))
- }
if m.QueryHeight != 0 {
- n += 1 + sovQuery(uint64(m.QueryHeight))
+ i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight))
+ i--
+ dAtA[i] = 0x10
}
- return n
+ 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 *QueryIncentivizedPacketsResponse) Size() (n int) {
- if m == nil {
- return 0
+func (m *QueryFeeEnabledChannelsResponse) 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 *QueryFeeEnabledChannelsResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryFeeEnabledChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- if len(m.IncentivizedPackets) > 0 {
- for _, e := range m.IncentivizedPackets {
- l = e.Size()
- n += 1 + l + sovQuery(uint64(l))
+ if len(m.FeeEnabledChannels) > 0 {
+ for iNdEx := len(m.FeeEnabledChannels) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.FeeEnabledChannels[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintQuery(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
}
}
- return n
+ return len(dAtA) - i, nil
}
-func (m *QueryIncentivizedPacketRequest) Size() (n int) {
- if m == nil {
- return 0
+func (m *QueryFeeEnabledChannelRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- var l int
- _ = l
+ return dAtA[:n], nil
+}
+
+func (m *QueryFeeEnabledChannelRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryFeeEnabledChannelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.ChannelId) > 0 {
+ i -= len(m.ChannelId)
+ copy(dAtA[i:], m.ChannelId)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.PortId) > 0 {
+ i -= len(m.PortId)
+ copy(dAtA[i:], m.PortId)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *QueryFeeEnabledChannelResponse) 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 *QueryFeeEnabledChannelResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryFeeEnabledChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.FeeEnabled {
+ i--
+ if m.FeeEnabled {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
+ offset -= sovQuery(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *QueryIncentivizedPacketsRequest) 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))
+ }
+ if m.QueryHeight != 0 {
+ n += 1 + sovQuery(uint64(m.QueryHeight))
+ }
+ return n
+}
+
+func (m *QueryIncentivizedPacketsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.IncentivizedPackets) > 0 {
+ for _, e := range m.IncentivizedPackets {
+ l = e.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *QueryIncentivizedPacketRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
l = m.PacketId.Size()
n += 1 + l + sovQuery(uint64(l))
if m.QueryHeight != 0 {
@@ -1872,6 +2313,66 @@ func (m *QueryCounterpartyAddressResponse) Size() (n int) {
return n
}
+func (m *QueryFeeEnabledChannelsRequest) 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))
+ }
+ if m.QueryHeight != 0 {
+ n += 1 + sovQuery(uint64(m.QueryHeight))
+ }
+ return n
+}
+
+func (m *QueryFeeEnabledChannelsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.FeeEnabledChannels) > 0 {
+ for _, e := range m.FeeEnabledChannels {
+ l = e.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *QueryFeeEnabledChannelRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.PortId)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ l = len(m.ChannelId)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func (m *QueryFeeEnabledChannelResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.FeeEnabled {
+ n += 2
+ }
+ return n
+}
+
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -3202,6 +3703,379 @@ func (m *QueryCounterpartyAddressResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *QueryFeeEnabledChannelsRequest) 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: QueryFeeEnabledChannelsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryFeeEnabledChannelsRequest: 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
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType)
+ }
+ m.QueryHeight = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.QueryHeight |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ 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 *QueryFeeEnabledChannelsResponse) 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: QueryFeeEnabledChannelsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryFeeEnabledChannelsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FeeEnabledChannels", 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.FeeEnabledChannels = append(m.FeeEnabledChannels, FeeEnabledChannel{})
+ if err := m.FeeEnabledChannels[len(m.FeeEnabledChannels)-1].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 *QueryFeeEnabledChannelRequest) 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: QueryFeeEnabledChannelRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryFeeEnabledChannelRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PortId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ChannelId = string(dAtA[iNdEx:postIndex])
+ 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 *QueryFeeEnabledChannelResponse) 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: QueryFeeEnabledChannelResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryFeeEnabledChannelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FeeEnabled", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.FeeEnabled = bool(v != 0)
+ 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 skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go
index 0210f400710..37c38769d20 100644
--- a/modules/apps/29-fee/types/query.pb.gw.go
+++ b/modules/apps/29-fee/types/query.pb.gw.go
@@ -701,6 +701,118 @@ func local_request_Query_CounterpartyAddress_0(ctx context.Context, marshaler ru
}
+var (
+ filter_Query_FeeEnabledChannels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_Query_FeeEnabledChannels_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryFeeEnabledChannelsRequest
+ 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_FeeEnabledChannels_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.FeeEnabledChannels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_Query_FeeEnabledChannels_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryFeeEnabledChannelsRequest
+ 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_FeeEnabledChannels_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.FeeEnabledChannels(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_Query_FeeEnabledChannel_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryFeeEnabledChannelRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["port_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
+ }
+
+ protoReq.PortId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
+ }
+
+ val, ok = pathParams["channel_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id")
+ }
+
+ protoReq.ChannelId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err)
+ }
+
+ msg, err := client.FeeEnabledChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_Query_FeeEnabledChannel_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryFeeEnabledChannelRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["port_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
+ }
+
+ protoReq.PortId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
+ }
+
+ val, ok = pathParams["channel_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id")
+ }
+
+ protoReq.ChannelId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err)
+ }
+
+ msg, err := server.FeeEnabledChannel(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -847,6 +959,46 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
+ mux.Handle("GET", pattern_Query_FeeEnabledChannels_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.AnnotateIncomingContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_Query_FeeEnabledChannels_0(rctx, inboundMarshaler, server, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_FeeEnabledChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_Query_FeeEnabledChannel_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.AnnotateIncomingContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_Query_FeeEnabledChannel_0(rctx, inboundMarshaler, server, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_FeeEnabledChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -1028,6 +1180,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
+ mux.Handle("GET", pattern_Query_FeeEnabledChannels_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_FeeEnabledChannels_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_FeeEnabledChannels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_Query_FeeEnabledChannel_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_FeeEnabledChannel_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_FeeEnabledChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -1045,6 +1237,10 @@ var (
pattern_Query_TotalTimeoutFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10}, []string{"ibc", "apps", "fee", "v1", "total_timeout_fees", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_CounterpartyAddress_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", "apps", "fee", "v1", "counterparty_address", "relayer_address", "channel", "channel_id"}, "", runtime.AssumeColonVerbOpt(true)))
+
+ pattern_Query_FeeEnabledChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "fee_enabled"}, "", runtime.AssumeColonVerbOpt(true)))
+
+ pattern_Query_FeeEnabledChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "apps", "fee", "v1", "fee_enabled", "port", "port_id", "channel", "channel_id"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
@@ -1061,4 +1257,8 @@ var (
forward_Query_TotalTimeoutFees_0 = runtime.ForwardResponseMessage
forward_Query_CounterpartyAddress_0 = runtime.ForwardResponseMessage
+
+ forward_Query_FeeEnabledChannels_0 = runtime.ForwardResponseMessage
+
+ forward_Query_FeeEnabledChannel_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto
index 689617e6ff5..f36a1414203 100644
--- a/proto/ibc/applications/fee/v1/query.proto
+++ b/proto/ibc/applications/fee/v1/query.proto
@@ -9,6 +9,7 @@ import "google/api/annotations.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "ibc/applications/fee/v1/fee.proto";
+import "ibc/applications/fee/v1/genesis.proto";
import "ibc/core/channel/v1/channel.proto";
// Query defines the ICS29 gRPC querier service.
@@ -53,6 +54,16 @@ service Query {
rpc CounterpartyAddress(QueryCounterpartyAddressRequest) returns (QueryCounterpartyAddressResponse) {
option (google.api.http).get = "/ibc/apps/fee/v1/counterparty_address/{relayer_address}/channel/{channel_id}";
}
+
+ // FeeEnabledChannels returns a list of all fee enabled channels
+ rpc FeeEnabledChannels(QueryFeeEnabledChannelsRequest) returns (QueryFeeEnabledChannelsResponse) {
+ option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled";
+ }
+
+ // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel
+ rpc FeeEnabledChannel(QueryFeeEnabledChannelRequest) returns (QueryFeeEnabledChannelResponse) {
+ option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled/port/{port_id}/channel/{channel_id}";
+ }
}
// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc
@@ -161,3 +172,32 @@ message QueryCounterpartyAddressResponse {
// the counterparty address used to compensate forward relaying
string counterparty_address = 1 [(gogoproto.moretags) = "yaml:\"counterparty_address\""];
}
+
+// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc
+message QueryFeeEnabledChannelsRequest {
+ // pagination defines an optional pagination for the request.
+ cosmos.base.query.v1beta1.PageRequest pagination = 1;
+ // block height at which to query
+ uint64 query_height = 2;
+}
+
+// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc
+message QueryFeeEnabledChannelsResponse {
+ // list of fee enabled channels
+ repeated ibc.applications.fee.v1.FeeEnabledChannel fee_enabled_channels = 1
+ [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false];
+}
+
+// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc
+message QueryFeeEnabledChannelRequest {
+ // unique port identifier
+ string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
+ // unique channel identifier
+ string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
+}
+
+// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc
+message QueryFeeEnabledChannelResponse {
+ // boolean flag representing the fee enabled channel status
+ bool fee_enabled = 1 [(gogoproto.moretags) = "yaml:\"fee_enabled\""];
+}