From 2c7697348d30a833634069df9392bd0d2618a597 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Thu, 9 Jun 2022 14:18:26 +0200 Subject: [PATCH] feat: adding Payee grpc query and CLI (#1493) * [WIP] adding RegisterDistributionAddress rpc endpoint and implementation. Store funcs, keys.. * updating tests * adding registered distribution addresses to genesis state * refactor and update validate genesis tests * adding grpc query and cli for distribution address rpc endpoint * adding cli for register distribution address rpc * renaming RegisterDistributionAddress rpc to RegisterPayee * renaming RegisterDistributionAddress to RegisterPayee * updating godocs and field ordering * updating inline comment * renaming to regsitered payees and propagating changes in genesis * updating godoc in keeper.go * Update modules/apps/29-fee/keeper/keeper_test.go Co-authored-by: Aditya * renaming query and types to align with payee address naming convention Co-authored-by: Aditya --- docs/client/swagger-ui/swagger.yaml | 225 +++++++ docs/ibc/proto-docs.md | 34 + modules/apps/29-fee/client/cli/cli.go | 1 + modules/apps/29-fee/client/cli/query.go | 39 ++ modules/apps/29-fee/keeper/grpc_query.go | 18 + modules/apps/29-fee/keeper/grpc_query_test.go | 63 ++ modules/apps/29-fee/types/query.pb.go | 614 +++++++++++++++--- modules/apps/29-fee/types/query.pb.gw.go | 120 ++++ proto/ibc/applications/fee/v1/query.proto | 19 + 9 files changed, 1045 insertions(+), 88 deletions(-) diff --git a/docs/client/swagger-ui/swagger.yaml b/docs/client/swagger-ui/swagger.yaml index 084cc498a5d..5299015bfff 100644 --- a/docs/client/swagger-ui/swagger.yaml +++ b/docs/client/swagger-ui/swagger.yaml @@ -1266,6 +1266,224 @@ paths: type: string tags: - Query + '/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/payee': + get: + summary: >- + Payee returns the registered payee address for a specific channel given + the relayer address + operationId: Payee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + payee_address: + type: string + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer_address + description: the relayer address to which the distribution address is registered + in: path + required: true + type: string + tags: + - Query '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet': get: summary: >- @@ -13682,6 +13900,13 @@ definitions: title: >- QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc + ibc.applications.fee.v1.QueryPayeeResponse: + type: object + properties: + payee_address: + type: string + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc ibc.applications.fee.v1.QueryTotalAckFeesResponse: type: object properties: diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index fe55e9c32be..396b5d37f9d 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -57,6 +57,8 @@ - [QueryIncentivizedPacketsForChannelResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) - [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) - [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) + - [QueryPayeeRequest](#ibc.applications.fee.v1.QueryPayeeRequest) + - [QueryPayeeResponse](#ibc.applications.fee.v1.QueryPayeeResponse) - [QueryTotalAckFeesRequest](#ibc.applications.fee.v1.QueryTotalAckFeesRequest) - [QueryTotalAckFeesResponse](#ibc.applications.fee.v1.QueryTotalAckFeesResponse) - [QueryTotalRecvFeesRequest](#ibc.applications.fee.v1.QueryTotalRecvFeesRequest) @@ -1126,6 +1128,37 @@ QueryIncentivizedPacketsResponse defines the response type for the IncentivizedP + + +### QueryPayeeRequest +QueryPayeeRequest defines the request type for the Payee rpc + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channel_id` | [string](#string) | | unique channel identifier | +| `relayer_address` | [string](#string) | | the relayer address to which the distribution address is registered | + + + + + + + + +### QueryPayeeResponse +QueryPayeeResponse defines the response type for the Payee rpc + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `payee_address` | [string](#string) | | the payee address to which packet fees are paid out | + + + + + + ### QueryTotalAckFeesRequest @@ -1235,6 +1268,7 @@ Query defines the ICS29 gRPC querier service. | `TotalRecvFees` | [QueryTotalRecvFeesRequest](#ibc.applications.fee.v1.QueryTotalRecvFeesRequest) | [QueryTotalRecvFeesResponse](#ibc.applications.fee.v1.QueryTotalRecvFeesResponse) | TotalRecvFees returns the total receive fees for a packet given its identifier | GET|/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees| | `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/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees| | `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/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees| +| `Payee` | [QueryPayeeRequest](#ibc.applications.fee.v1.QueryPayeeRequest) | [QueryPayeeResponse](#ibc.applications.fee.v1.QueryPayeeResponse) | Payee returns the registered payee address for a specific channel given the relayer address | GET|/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/payee| | `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/channels/{channel_id}/relayers/{relayer_address}/counterparty_address| | `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/channels/{channel_id}/ports/{port_id}/fee_enabled| diff --git a/modules/apps/29-fee/client/cli/cli.go b/modules/apps/29-fee/client/cli/cli.go index 1306efa84b9..fdf5d3ffbb9 100644 --- a/modules/apps/29-fee/client/cli/cli.go +++ b/modules/apps/29-fee/client/cli/cli.go @@ -21,6 +21,7 @@ func GetQueryCmd() *cobra.Command { GetCmdTotalAckFees(), GetCmdTotalTimeoutFees(), GetCmdIncentivizedPacketsForChannel(), + GetCmdPayee(), GetCmdCounterpartyAddress(), GetCmdFeeEnabledChannel(), GetCmdFeeEnabledChannels(), diff --git a/modules/apps/29-fee/client/cli/query.go b/modules/apps/29-fee/client/cli/query.go index ccf05b61b23..3cfdcb27b33 100644 --- a/modules/apps/29-fee/client/cli/query.go +++ b/modules/apps/29-fee/client/cli/query.go @@ -239,6 +239,45 @@ func GetCmdTotalTimeoutFees() *cobra.Command { return cmd } +// GetCmdPayee returns the command handler for the Query/Payee rpc. +func GetCmdPayee() *cobra.Command { + cmd := &cobra.Command{ + Use: "payee [channel-id] [relayer-address]", + Short: "Query the relayer payee address on a given channel", + Long: "Query the relayer payee address on a given channel", + Args: cobra.ExactArgs(2), + Example: fmt.Sprintf("%s query ibc-fee payee channel-5 cosmos1layxcsmyye0dc0har9sdfzwckaz8sjwlfsj8zs", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + if _, err := sdk.AccAddressFromBech32(args[1]); err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + req := &types.QueryPayeeRequest{ + ChannelId: args[0], + RelayerAddress: args[1], + } + + res, err := queryClient.Payee(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetCmdCounterpartyAddress returns the command handler for the Query/CounterpartyAddress rpc. func GetCmdCounterpartyAddress() *cobra.Command { cmd := &cobra.Command{ diff --git a/modules/apps/29-fee/keeper/grpc_query.go b/modules/apps/29-fee/keeper/grpc_query.go index 9b95753f25c..2df2b1823c9 100644 --- a/modules/apps/29-fee/keeper/grpc_query.go +++ b/modules/apps/29-fee/keeper/grpc_query.go @@ -171,6 +171,24 @@ func (k Keeper) TotalTimeoutFees(goCtx context.Context, req *types.QueryTotalTim }, nil } +// Payee implements the Query/Payee gRPC method and returns the registered payee address to which packet fees are paid out +func (k Keeper) Payee(goCtx context.Context, req *types.QueryPayeeRequest) (*types.QueryPayeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + payeeAddr, found := k.GetPayeeAddress(ctx, req.RelayerAddress, req.ChannelId) + if !found { + return nil, status.Errorf(codes.NotFound, "payee address not found for address: %s on channel: %s", req.RelayerAddress, req.ChannelId) + } + + return &types.QueryPayeeResponse{ + PayeeAddress: payeeAddr, + }, nil +} + // CounterpartyAddress implements the Query/CounterpartyAddress gRPC method and returns the registered counterparty address for forward relaying func (k Keeper) CounterpartyAddress(goCtx context.Context, req *types.QueryCounterpartyAddressRequest) (*types.QueryCounterpartyAddressResponse, error) { if req == nil { diff --git a/modules/apps/29-fee/keeper/grpc_query_test.go b/modules/apps/29-fee/keeper/grpc_query_test.go index 5850a3be3ba..dc345fa06eb 100644 --- a/modules/apps/29-fee/keeper/grpc_query_test.go +++ b/modules/apps/29-fee/keeper/grpc_query_test.go @@ -409,6 +409,69 @@ func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() { } } +func (suite *KeeperTestSuite) TestQueryPayee() { + var req *types.QueryPayeeRequest + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success", + func() {}, + true, + }, + { + "payee address not found: invalid channel", + func() { + req.ChannelId = "invalid-channel-id" + }, + false, + }, + { + "payee address not found: invalid relayer address", + func() { + req.RelayerAddress = "invalid-addr" + }, + false, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + suite.SetupTest() // reset + + pk := secp256k1.GenPrivKey().PubKey() + expPayeeAddr := sdk.AccAddress(pk.Address()) + + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + expPayeeAddr.String(), + suite.path.EndpointA.ChannelID, + ) + + req = &types.QueryPayeeRequest{ + ChannelId: suite.path.EndpointA.ChannelID, + RelayerAddress: suite.chainA.SenderAccount.GetAddress().String(), + } + + tc.malleate() + + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + res, err := suite.queryClient.Payee(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expPayeeAddr.String(), res.PayeeAddress) + } else { + suite.Require().Error(err) + } + }) + } +} + func (suite *KeeperTestSuite) TestQueryCounterpartyAddress() { var req *types.QueryCounterpartyAddressRequest diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 1a9eba1927f..9d0de9110a5 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -637,6 +637,107 @@ func (m *QueryTotalTimeoutFeesResponse) GetTimeoutFees() github_com_cosmos_cosmo return nil } +// QueryPayeeRequest defines the request type for the Payee rpc +type QueryPayeeRequest struct { + // unique channel identifier + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // the relayer address to which the distribution address is registered + RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` +} + +func (m *QueryPayeeRequest) Reset() { *m = QueryPayeeRequest{} } +func (m *QueryPayeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPayeeRequest) ProtoMessage() {} +func (*QueryPayeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0638a8a78ca2503c, []int{12} +} +func (m *QueryPayeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPayeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPayeeRequest.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 *QueryPayeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPayeeRequest.Merge(m, src) +} +func (m *QueryPayeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPayeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPayeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPayeeRequest proto.InternalMessageInfo + +func (m *QueryPayeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryPayeeRequest) GetRelayerAddress() string { + if m != nil { + return m.RelayerAddress + } + return "" +} + +// QueryPayeeResponse defines the response type for the Payee rpc +type QueryPayeeResponse struct { + // the payee address to which packet fees are paid out + PayeeAddress string `protobuf:"bytes,1,opt,name=payee_address,json=payeeAddress,proto3" json:"payee_address,omitempty" yaml:"payee_address"` +} + +func (m *QueryPayeeResponse) Reset() { *m = QueryPayeeResponse{} } +func (m *QueryPayeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPayeeResponse) ProtoMessage() {} +func (*QueryPayeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0638a8a78ca2503c, []int{13} +} +func (m *QueryPayeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPayeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPayeeResponse.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 *QueryPayeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPayeeResponse.Merge(m, src) +} +func (m *QueryPayeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPayeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPayeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPayeeResponse proto.InternalMessageInfo + +func (m *QueryPayeeResponse) GetPayeeAddress() string { + if m != nil { + return m.PayeeAddress + } + return "" +} + // QueryCounterpartyAddressRequest defines the request type for the CounterpartyAddress rpc type QueryCounterpartyAddressRequest struct { // unique channel identifier @@ -649,7 +750,7 @@ func (m *QueryCounterpartyAddressRequest) Reset() { *m = QueryCounterpar func (m *QueryCounterpartyAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryCounterpartyAddressRequest) ProtoMessage() {} func (*QueryCounterpartyAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{12} + return fileDescriptor_0638a8a78ca2503c, []int{14} } func (m *QueryCounterpartyAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,7 +803,7 @@ func (m *QueryCounterpartyAddressResponse) Reset() { *m = QueryCounterpa func (m *QueryCounterpartyAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryCounterpartyAddressResponse) ProtoMessage() {} func (*QueryCounterpartyAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{13} + return fileDescriptor_0638a8a78ca2503c, []int{15} } func (m *QueryCounterpartyAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -750,7 +851,7 @@ func (m *QueryFeeEnabledChannelsRequest) Reset() { *m = QueryFeeEnabledC func (m *QueryFeeEnabledChannelsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelsRequest) ProtoMessage() {} func (*QueryFeeEnabledChannelsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{14} + return fileDescriptor_0638a8a78ca2503c, []int{16} } func (m *QueryFeeEnabledChannelsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,7 +904,7 @@ func (m *QueryFeeEnabledChannelsResponse) Reset() { *m = QueryFeeEnabled func (m *QueryFeeEnabledChannelsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelsResponse) ProtoMessage() {} func (*QueryFeeEnabledChannelsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{15} + return fileDescriptor_0638a8a78ca2503c, []int{17} } func (m *QueryFeeEnabledChannelsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,7 +952,7 @@ func (m *QueryFeeEnabledChannelRequest) Reset() { *m = QueryFeeEnabledCh func (m *QueryFeeEnabledChannelRequest) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelRequest) ProtoMessage() {} func (*QueryFeeEnabledChannelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{16} + return fileDescriptor_0638a8a78ca2503c, []int{18} } func (m *QueryFeeEnabledChannelRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -904,7 +1005,7 @@ func (m *QueryFeeEnabledChannelResponse) Reset() { *m = QueryFeeEnabledC func (m *QueryFeeEnabledChannelResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelResponse) ProtoMessage() {} func (*QueryFeeEnabledChannelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{17} + return fileDescriptor_0638a8a78ca2503c, []int{19} } func (m *QueryFeeEnabledChannelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -953,6 +1054,8 @@ func init() { proto.RegisterType((*QueryTotalAckFeesResponse)(nil), "ibc.applications.fee.v1.QueryTotalAckFeesResponse") proto.RegisterType((*QueryTotalTimeoutFeesRequest)(nil), "ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest") proto.RegisterType((*QueryTotalTimeoutFeesResponse)(nil), "ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse") + proto.RegisterType((*QueryPayeeRequest)(nil), "ibc.applications.fee.v1.QueryPayeeRequest") + proto.RegisterType((*QueryPayeeResponse)(nil), "ibc.applications.fee.v1.QueryPayeeResponse") 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") @@ -966,88 +1069,92 @@ func init() { } var fileDescriptor_0638a8a78ca2503c = []byte{ - // 1285 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x1c, 0xcd, 0xa4, 0xa1, 0x4d, 0x26, 0xa1, 0x4d, 0xc7, 0xa1, 0x4d, 0x4d, 0x62, 0xa7, 0x53, 0x0a, - 0x21, 0x28, 0xbb, 0x8a, 0x43, 0x9b, 0x96, 0x13, 0xb5, 0x4b, 0x20, 0x20, 0x44, 0x59, 0x2a, 0x04, - 0x08, 0x70, 0xd7, 0xbb, 0x63, 0x67, 0x15, 0x67, 0x67, 0xbb, 0xbb, 0xb6, 0x70, 0xd3, 0x00, 0xad, - 0x88, 0x40, 0x80, 0x00, 0x09, 0x89, 0x03, 0xe2, 0x8a, 0x90, 0x90, 0xf8, 0x00, 0x7c, 0x83, 0x8a, - 0x03, 0x8a, 0xc4, 0x85, 0x93, 0x41, 0x09, 0x27, 0x8e, 0x3e, 0x71, 0x00, 0x09, 0xed, 0xcc, 0xec, - 0x7a, 0xdd, 0xdd, 0x4d, 0xec, 0x60, 0x85, 0x53, 0xec, 0xf9, 0xfd, 0x99, 0xf7, 0xde, 0xfc, 0x3c, - 0xf3, 0x14, 0x78, 0xce, 0x28, 0x69, 0xb2, 0x6a, 0x59, 0x55, 0x43, 0x53, 0x5d, 0x83, 0x9a, 0x8e, - 0x5c, 0x26, 0x44, 0xae, 0x2f, 0xc8, 0x37, 0x6b, 0xc4, 0x6e, 0x48, 0x96, 0x4d, 0x5d, 0x8a, 0x4e, - 0x1b, 0x25, 0x4d, 0x0a, 0x27, 0x49, 0x65, 0x42, 0xa4, 0xfa, 0x42, 0x7a, 0xa2, 0x42, 0x2b, 0x94, - 0xe5, 0xc8, 0xde, 0x27, 0x9e, 0x9e, 0x9e, 0xaa, 0x50, 0x5a, 0xa9, 0x12, 0x59, 0xb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xca, 0xfe, 0xc1, 0xb4, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x32, 0x7d, - 0x07, 0x8d, 0x13, 0x00, 0x00, + // 1358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x1c, 0xcd, 0xa4, 0x5f, 0xc9, 0x24, 0xfd, 0xc8, 0x38, 0xb4, 0xa9, 0x49, 0xec, 0x74, 0x4a, 0x21, + 0xa4, 0xca, 0xae, 0xe2, 0xd0, 0xa6, 0x45, 0x42, 0xa2, 0x76, 0x49, 0x09, 0x08, 0x35, 0x6c, 0x2b, + 0x04, 0x08, 0x70, 0xd7, 0xbb, 0x63, 0x67, 0x15, 0x67, 0x67, 0xbb, 0xbb, 0xb6, 0x70, 0xd3, 0x00, + 0xad, 0x88, 0x40, 0x80, 0x00, 0x09, 0x89, 0x03, 0xe2, 0x8a, 0x90, 0x90, 0x38, 0x70, 0xe4, 0x3f, + 0xe8, 0x09, 0x45, 0xe2, 0xc2, 0xc9, 0xa0, 0x84, 0x13, 0x47, 0x9f, 0x38, 0x00, 0x42, 0x3b, 0x33, + 0x6b, 0xaf, 0xb3, 0xbb, 0x89, 0x9d, 0x46, 0x81, 0x53, 0xec, 0xf9, 0x7d, 0xcc, 0x7b, 0x6f, 0x7e, + 0xbb, 0xf3, 0x1c, 0x78, 0xd6, 0x28, 0x68, 0xb2, 0x6a, 0x59, 0x65, 0x43, 0x53, 0x5d, 0x83, 0x9a, + 0x8e, 0x5c, 0x24, 0x44, 0xae, 0x4e, 0xcb, 0xb7, 0x2b, 0xc4, 0xae, 0x49, 0x96, 0x4d, 0x5d, 0x8a, + 0x4e, 0x19, 0x05, 0x4d, 0x0a, 0x26, 0x49, 0x45, 0x42, 0xa4, 0xea, 0x74, 0x72, 0xb8, 0x44, 0x4b, + 0x94, 0xe5, 0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75, 0x40, 0xeb, 0x00, 0x0e, 0x85, 0x9a, 0xa0, 0x8b, + 0x5d, 0xee, 0xea, 0xa3, 0x9d, 0xed, 0xba, 0x4e, 0x80, 0x7d, 0x81, 0x81, 0xbd, 0x8a, 0xb2, 0xbb, + 0xbc, 0x31, 0x02, 0x94, 0xb2, 0xd7, 0x1f, 0x6c, 0xa4, 0xc0, 0xfa, 0x46, 0x0a, 0xfc, 0xb6, 0x91, + 0x02, 0x9f, 0x6f, 0xa6, 0x7a, 0xd6, 0x37, 0x53, 0x3d, 0xbf, 0x6c, 0xa6, 0x7a, 0x5e, 0xbf, 0x10, + 0xfe, 0x91, 0x65, 0x14, 0xb4, 0xa9, 0x12, 0x95, 0xab, 0x33, 0xf2, 0x32, 0xd5, 0x2b, 0x65, 0xe2, + 0xf0, 0xcd, 0x33, 0x97, 0xa7, 0xbc, 0xfd, 0xd9, 0xef, 0xae, 0xc2, 0x61, 0xf6, 0xaf, 0xbf, 0x99, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x64, 0x8c, 0x96, 0x8a, 0x27, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1074,6 +1181,8 @@ type QueryClient interface { TotalAckFees(ctx context.Context, in *QueryTotalAckFeesRequest, opts ...grpc.CallOption) (*QueryTotalAckFeesResponse, error) // TotalTimeoutFees returns the total timeout fees for a packet given its identifier TotalTimeoutFees(ctx context.Context, in *QueryTotalTimeoutFeesRequest, opts ...grpc.CallOption) (*QueryTotalTimeoutFeesResponse, error) + // Payee returns the registered payee address for a specific channel given the relayer address + Payee(ctx context.Context, in *QueryPayeeRequest, opts ...grpc.CallOption) (*QueryPayeeResponse, 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 @@ -1144,6 +1253,15 @@ func (c *queryClient) TotalTimeoutFees(ctx context.Context, in *QueryTotalTimeou return out, nil } +func (c *queryClient) Payee(ctx context.Context, in *QueryPayeeRequest, opts ...grpc.CallOption) (*QueryPayeeResponse, error) { + out := new(QueryPayeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/Payee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) CounterpartyAddress(ctx context.Context, in *QueryCounterpartyAddressRequest, opts ...grpc.CallOption) (*QueryCounterpartyAddressResponse, error) { out := new(QueryCounterpartyAddressResponse) err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/CounterpartyAddress", in, out, opts...) @@ -1185,6 +1303,8 @@ type QueryServer interface { TotalAckFees(context.Context, *QueryTotalAckFeesRequest) (*QueryTotalAckFeesResponse, error) // TotalTimeoutFees returns the total timeout fees for a packet given its identifier TotalTimeoutFees(context.Context, *QueryTotalTimeoutFeesRequest) (*QueryTotalTimeoutFeesResponse, error) + // Payee returns the registered payee address for a specific channel given the relayer address + Payee(context.Context, *QueryPayeeRequest) (*QueryPayeeResponse, 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 @@ -1215,6 +1335,9 @@ func (*UnimplementedQueryServer) TotalAckFees(ctx context.Context, req *QueryTot func (*UnimplementedQueryServer) TotalTimeoutFees(ctx context.Context, req *QueryTotalTimeoutFeesRequest) (*QueryTotalTimeoutFeesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalTimeoutFees not implemented") } +func (*UnimplementedQueryServer) Payee(ctx context.Context, req *QueryPayeeRequest) (*QueryPayeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Payee not implemented") +} func (*UnimplementedQueryServer) CounterpartyAddress(ctx context.Context, req *QueryCounterpartyAddressRequest) (*QueryCounterpartyAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CounterpartyAddress not implemented") } @@ -1337,6 +1460,24 @@ func _Query_TotalTimeoutFees_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_Payee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPayeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Payee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.fee.v1.Query/Payee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Payee(ctx, req.(*QueryPayeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_CounterpartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryCounterpartyAddressRequest) if err := dec(in); err != nil { @@ -1419,6 +1560,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TotalTimeoutFees", Handler: _Query_TotalTimeoutFees_Handler, }, + { + MethodName: "Payee", + Handler: _Query_Payee_Handler, + }, { MethodName: "CounterpartyAddress", Handler: _Query_CounterpartyAddress_Handler, @@ -1885,6 +2030,73 @@ func (m *QueryTotalTimeoutFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QueryPayeeRequest) 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 *QueryPayeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPayeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x12 + } + 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPayeeResponse) 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 *QueryPayeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPayeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PayeeAddress) > 0 { + i -= len(m.PayeeAddress) + copy(dAtA[i:], m.PayeeAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PayeeAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryCounterpartyAddressRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2283,6 +2495,36 @@ func (m *QueryTotalTimeoutFeesResponse) Size() (n int) { return n } +func (m *QueryPayeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPayeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PayeeAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryCounterpartyAddressRequest) Size() (n int) { if m == nil { return 0 @@ -3507,6 +3749,202 @@ func (m *QueryTotalTimeoutFeesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryPayeeRequest) 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: QueryPayeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPayeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", 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.RelayerAddress = 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 *QueryPayeeResponse) 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: QueryPayeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPayeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PayeeAddress", 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.PayeeAddress = 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 *QueryCounterpartyAddressRequest) Unmarshal(dAtA []byte) 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 712c7f32727..309fab4da17 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -625,6 +625,82 @@ func local_request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runti } +func request_Query_Payee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPayeeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = 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) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + msg, err := client.Payee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Payee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPayeeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = 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) + } + + val, ok = pathParams["relayer_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + } + + protoReq.RelayerAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + } + + msg, err := server.Payee(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_CounterpartyAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCounterpartyAddressRequest var metadata runtime.ServerMetadata @@ -939,6 +1015,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Payee_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_Payee_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_Payee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_CounterpartyAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1160,6 +1256,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Payee_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_Payee_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_Payee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_CounterpartyAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1236,6 +1352,8 @@ var ( pattern_Query_TotalTimeoutFees_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, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "apps", "fee", "v1", "channels", "packet_id.channel_id", "ports", "packet_id.port_id", "sequences", "packet_id.sequence", "total_timeout_fees"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Payee_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, 2, 8}, []string{"ibc", "apps", "fee", "v1", "channels", "channel_id", "relayers", "relayer_address", "payee"}, "", 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, 2, 8}, []string{"ibc", "apps", "fee", "v1", "channels", "channel_id", "relayers", "relayer_address", "counterparty_address"}, "", 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))) @@ -1256,6 +1374,8 @@ var ( forward_Query_TotalTimeoutFees_0 = runtime.ForwardResponseMessage + forward_Query_Payee_0 = runtime.ForwardResponseMessage + forward_Query_CounterpartyAddress_0 = runtime.ForwardResponseMessage forward_Query_FeeEnabledChannels_0 = runtime.ForwardResponseMessage diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index 5f648107323..e08eee99816 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -50,6 +50,11 @@ service Query { "sequences/{packet_id.sequence}/total_timeout_fees"; } + // Payee returns the registered payee address for a specific channel given the relayer address + rpc Payee(QueryPayeeRequest) returns (QueryPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/payee"; + } + // CounterpartyAddress returns the registered counterparty address for forward relaying rpc CounterpartyAddress(QueryCounterpartyAddressRequest) returns (QueryCounterpartyAddressResponse) { option (google.api.http).get = @@ -160,6 +165,20 @@ message QueryTotalTimeoutFeesResponse { ]; } +// QueryPayeeRequest defines the request type for the Payee rpc +message QueryPayeeRequest { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address to which the distribution address is registered + string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; +} + +// QueryPayeeResponse defines the response type for the Payee rpc +message QueryPayeeResponse { + // the payee address to which packet fees are paid out + string payee_address = 1 [(gogoproto.moretags) = "yaml:\"payee_address\""]; +} + // QueryCounterpartyAddressRequest defines the request type for the CounterpartyAddress rpc message QueryCounterpartyAddressRequest { // unique channel identifier