From 040f2eafc1f5943ec3816cc7e8a85a64873a8bd9 Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 8 Jun 2022 15:30:33 +0200 Subject: [PATCH] feat: adding RegisterPayee rpc to ics29 fee middleware (#1491) * [WIP] adding RegisterDistributionAddress rpc endpoint and implementation. Store funcs, keys.. * updating tests * adding cli for register distribution address rpc * renaming RegisterDistributionAddress rpc to RegisterPayee * renaming RegisterDistributionAddress to RegisterPayee * updating godocs and field ordering * updating inline comment --- docs/ibc/proto-docs.md | 47 +- modules/apps/29-fee/client/cli/cli.go | 3 +- modules/apps/29-fee/client/cli/tx.go | 29 +- modules/apps/29-fee/keeper/keeper.go | 18 + modules/apps/29-fee/keeper/keeper_test.go | 19 + modules/apps/29-fee/keeper/msg_server.go | 28 +- modules/apps/29-fee/keeper/msg_server_test.go | 64 ++ modules/apps/29-fee/types/keys.go | 20 + modules/apps/29-fee/types/keys_test.go | 36 ++ modules/apps/29-fee/types/msgs.go | 47 ++ modules/apps/29-fee/types/msgs_test.go | 75 +++ modules/apps/29-fee/types/query.pb.go | 160 ++--- modules/apps/29-fee/types/query.pb.gw.go | 248 ++++---- modules/apps/29-fee/types/tx.pb.go | 571 ++++++++++++++++-- proto/ibc/applications/fee/v1/query.proto | 3 +- proto/ibc/applications/fee/v1/tx.proto | 27 +- 16 files changed, 1125 insertions(+), 270 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 9bbf462a18f..577dad6af8d 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -72,6 +72,8 @@ - [MsgPayPacketFeeResponse](#ibc.applications.fee.v1.MsgPayPacketFeeResponse) - [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) - [MsgRegisterCounterpartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse) + - [MsgRegisterPayee](#ibc.applications.fee.v1.MsgRegisterPayee) + - [MsgRegisterPayeeResponse](#ibc.applications.fee.v1.MsgRegisterPayeeResponse) - [Msg](#ibc.applications.fee.v1.Msg) @@ -1209,14 +1211,14 @@ Query defines the ICS29 gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | IncentivizedPackets returns all incentivized packets and their associated fees | GET|/ibc/apps/fee/v1/incentivized_packets| -| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | IncentivizedPacket returns all packet fees for a packet given its identifier | GET|/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| -| `IncentivizedPacketsForChannel` | [QueryIncentivizedPacketsForChannelRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest) | [QueryIncentivizedPacketsForChannelResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) | Gets all incentivized packets for a specific channel | GET|/ibc/apps/fee/v1/incentivized_packets/port/{port_id}/channel/{channel_id}| -| `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/total_recv_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| -| `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}| +| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | IncentivizedPacket returns all packet 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}/incentivized_packet| +| `IncentivizedPacketsForChannel` | [QueryIncentivizedPacketsForChannelRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest) | [QueryIncentivizedPacketsForChannelResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) | Gets all incentivized packets for a specific channel | GET|/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets| +| `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| +| `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/fee_enabled/port/{port_id}/channel/{channel_id}| +| `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| @@ -1314,6 +1316,34 @@ MsgRegisterCounterpartyAddressResponse defines the response type for the Registe + + + +### MsgRegisterPayee +MsgRegisterPayee defines the request type for the RegisterPayee rpc + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | unique port identifier | +| `channel_id` | [string](#string) | | unique channel identifier | +| `relayer_address` | [string](#string) | | the relayer address | +| `payee` | [string](#string) | | the fee payee address | + + + + + + + + +### MsgRegisterPayeeResponse +MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc + + + + + @@ -1328,7 +1358,8 @@ Msg defines the ICS29 Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `RegisterCounterpartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterpartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying. This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | +| `RegisterPayee` | [MsgRegisterPayee](#ibc.applications.fee.v1.MsgRegisterPayee) | [MsgRegisterPayeeResponse](#ibc.applications.fee.v1.MsgRegisterPayeeResponse) | RegisterPayee defines a rpc handler method for MsgRegisterPayee RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional payee to which escrowed packet fees will be paid out. The payee should be registered on the source chain from which packets originate as this is where fee distribution takes place. This function may be called more than once by a relayer, in which case, the latest payee is always used. | | +| `RegisterCounterpartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterpartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying. This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function may be called more than once by a relayer, in which case, the latest counterparty address is always used. | | | `PayPacketFee` | [MsgPayPacketFee](#ibc.applications.fee.v1.MsgPayPacketFee) | [MsgPayPacketFeeResponse](#ibc.applications.fee.v1.MsgPayPacketFeeResponse) | PayPacketFee defines a rpc handler method for MsgPayPacketFee PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the packet at the next sequence NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows initiates the lifecycle of the incentivized packet | | | `PayPacketFeeAsync` | [MsgPayPacketFeeAsync](#ibc.applications.fee.v1.MsgPayPacketFeeAsync) | [MsgPayPacketFeeAsyncResponse](#ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse) | PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of a known packet (i.e. at a particular sequence) | | diff --git a/modules/apps/29-fee/client/cli/cli.go b/modules/apps/29-fee/client/cli/cli.go index a0141c20f9a..1306efa84b9 100644 --- a/modules/apps/29-fee/client/cli/cli.go +++ b/modules/apps/29-fee/client/cli/cli.go @@ -40,8 +40,9 @@ func NewTxCmd() *cobra.Command { } txCmd.AddCommand( + NewRegisterPayeeCmd(), NewPayPacketFeeAsyncTxCmd(), - NewRegisterCounterpartyAddress(), + NewRegisterCounterpartyAddressCmd(), ) return txCmd diff --git a/modules/apps/29-fee/client/cli/tx.go b/modules/apps/29-fee/client/cli/tx.go index 9c972316d91..24f84731d88 100644 --- a/modules/apps/29-fee/client/cli/tx.go +++ b/modules/apps/29-fee/client/cli/tx.go @@ -22,6 +22,31 @@ const ( flagTimeoutFee = "timeout-fee" ) +// NewRegisterPayeeCmd returns the command to create a MsgRegisterPayee +func NewRegisterPayeeCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "register-payee [port-id] [channel-id] [relayer-address] [payee-address] ", + Short: "Register a payee on a given channel.", + Long: strings.TrimSpace(`Register a payee address on a given channel.`), + Example: fmt.Sprintf("%s tx ibc-fee register-payee transfer channel-0 cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5", version.AppName), + Args: cobra.ExactArgs(4), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgRegisterPayee(args[0], args[1], args[2], args[3]) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + // NewPayPacketFeeAsyncTxCmd returns the command to create a MsgPayPacketFeeAsync func NewPayPacketFeeAsyncTxCmd() *cobra.Command { cmd := &cobra.Command{ @@ -98,8 +123,8 @@ func NewPayPacketFeeAsyncTxCmd() *cobra.Command { return cmd } -// NewRegisterCounterpartyAddress returns the command to create a MsgRegisterCounterpartyAddress -func NewRegisterCounterpartyAddress() *cobra.Command { +// NewRegisterCounterpartyAddressCmd returns the command to create a MsgRegisterCounterpartyAddress +func NewRegisterCounterpartyAddressCmd() *cobra.Command { cmd := &cobra.Command{ Use: "register-counterparty [port-id] [channel-id] [address] [counterparty-address] ", Short: "Register a counterparty relayer address on a given channel.", diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index a4b5a153c33..15e9eb86f82 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -147,6 +147,24 @@ func (k Keeper) GetAllFeeEnabledChannels(ctx sdk.Context) []types.FeeEnabledChan return enabledChArr } +// GetPayeeAddress retrieves the fee payee address stored in state given the provided channel identifier and relayer address +func (k Keeper) GetPayeeAddress(ctx sdk.Context, relayerAddr, channelID string) (string, bool) { + store := ctx.KVStore(k.storeKey) + key := types.KeyPayeeAddress(relayerAddr, channelID) + + if !store.Has(key) { + return "", false + } + + return string(store.Get(key)), true +} + +// SetPayeeAddress stores the fee payee address in state keyed by the provided channel identifier and relayer address +func (k Keeper) SetPayeeAddress(ctx sdk.Context, relayerAddr, payeeAddr, channelID string) { + store := ctx.KVStore(k.storeKey) + store.Set(types.KeyPayeeAddress(relayerAddr, channelID), []byte(payeeAddr)) +} + // SetCounterpartyAddress maps the destination chain relayer address to the source relayer address // The receiving chain must store the mapping from: address -> counterpartyAddress for the given channel func (k Keeper) SetCounterpartyAddress(ctx sdk.Context, address, counterpartyAddress, channelID string) { diff --git a/modules/apps/29-fee/keeper/keeper_test.go b/modules/apps/29-fee/keeper/keeper_test.go index 7446ecbab64..d66f1284fe6 100644 --- a/modules/apps/29-fee/keeper/keeper_test.go +++ b/modules/apps/29-fee/keeper/keeper_test.go @@ -91,6 +91,25 @@ func (suite *KeeperTestSuite) TestEscrowAccountHasBalance() { suite.Require().False(suite.chainA.GetSimApp().IBCFeeKeeper.EscrowAccountHasBalance(suite.chainA.GetContext(), fee.Total())) } +func (suite *KeeperTestSuite) TestGetSetPayeeAddress() { + suite.coordinator.Setup(suite.path) + + payeeAddr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointA.ChannelID) + suite.Require().False(found) + suite.Require().Empty(payeeAddr) + + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccounts[0].SenderAccount.GetAddress().String(), + suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), + suite.path.EndpointA.ChannelID, + ) + + payeeAddr, found = suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointA.ChannelID) + suite.Require().True(found) + suite.Require().Equal(suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), payeeAddr) +} + func (suite *KeeperTestSuite) TestFeesInEscrow() { suite.coordinator.Setup(suite.path) diff --git a/modules/apps/29-fee/keeper/msg_server.go b/modules/apps/29-fee/keeper/msg_server.go index e0c78028ea8..0dfc8cb9a10 100644 --- a/modules/apps/29-fee/keeper/msg_server.go +++ b/modules/apps/29-fee/keeper/msg_server.go @@ -12,6 +12,30 @@ import ( var _ types.MsgServer = Keeper{} +// RegisterPayee defines a rpc handler method for MsgRegisterPayee +// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional +// payee to which escrowed packet fees will be paid out. The payee should be registered on the source chain from which +// packets originate as this is where fee distribution takes place. This function may be called more than once by a relayer, +// in which case, the latest payee is always used. +func (k Keeper) RegisterPayee(goCtx context.Context, msg *types.MsgRegisterPayee) (*types.MsgRegisterPayeeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // only register payee address if the channel exists and is fee enabled + if _, found := k.channelKeeper.GetChannel(ctx, msg.PortId, msg.ChannelId); !found { + return nil, channeltypes.ErrChannelNotFound + } + + if !k.IsFeeEnabled(ctx, msg.PortId, msg.ChannelId) { + return nil, types.ErrFeeNotEnabled + } + + k.SetPayeeAddress(ctx, msg.RelayerAddress, msg.Payee, msg.ChannelId) + + k.Logger(ctx).Info("registering payee address for relayer", "relayer address", msg.RelayerAddress, "payee address", msg.Payee, "channel", msg.ChannelId) + + return &types.MsgRegisterPayeeResponse{}, nil +} + // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying // This ensures they will be properly compensated for forward relaying on the source chain since the destination chain must send back relayer's source address (counterparty address) in acknowledgement // This function may be called more than once by relayers, in which case, the previous counterparty address will be overwritten by the new counterparty address @@ -27,9 +51,7 @@ func (k Keeper) RegisterCounterpartyAddress(goCtx context.Context, msg *types.Ms return nil, types.ErrFeeNotEnabled } - k.SetCounterpartyAddress( - ctx, msg.Address, msg.CounterpartyAddress, msg.ChannelId, - ) + k.SetCounterpartyAddress(ctx, msg.Address, msg.CounterpartyAddress, msg.ChannelId) k.Logger(ctx).Info("registering counterparty address for relayer", "address", msg.Address, "counterparty address", msg.CounterpartyAddress, "channel", msg.ChannelId) diff --git a/modules/apps/29-fee/keeper/msg_server_test.go b/modules/apps/29-fee/keeper/msg_server_test.go index b4e665e56db..76179514943 100644 --- a/modules/apps/29-fee/keeper/msg_server_test.go +++ b/modules/apps/29-fee/keeper/msg_server_test.go @@ -9,6 +9,70 @@ import ( ibctesting "github.com/cosmos/ibc-go/v3/testing" ) +func (suite *KeeperTestSuite) TestRegisterPayee() { + var ( + msg *types.MsgRegisterPayee + ) + + testCases := []struct { + name string + expPass bool + malleate func() + }{ + { + "success", + true, + func() {}, + }, + { + "channel does not exist", + false, + func() { + msg.ChannelId = "channel-100" + }, + }, + { + "channel is not fee enabled", + false, + func() { + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + }, + }, + } + + for _, tc := range testCases { + suite.SetupTest() + suite.coordinator.Setup(suite.path) + + msg = types.NewMsgRegisterPayee( + suite.path.EndpointA.ChannelConfig.PortID, + suite.path.EndpointA.ChannelID, + suite.chainA.SenderAccounts[0].SenderAccount.GetAddress().String(), + suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), + ) + + tc.malleate() + + res, err := suite.chainA.GetSimApp().IBCFeeKeeper.RegisterPayee(sdk.WrapSDKContext(suite.chainA.GetContext()), msg) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + + payeeAddr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + suite.path.EndpointA.ChannelID, + ) + + suite.Require().True(found) + suite.Require().Equal(suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), payeeAddr) + } else { + suite.Require().Error(err) + } + } +} + func (suite *KeeperTestSuite) TestRegisterCounterpartyAddress() { var ( sender string diff --git a/modules/apps/29-fee/types/keys.go b/modules/apps/29-fee/types/keys.go index cf93967f84a..6cb6f53551c 100644 --- a/modules/apps/29-fee/types/keys.go +++ b/modules/apps/29-fee/types/keys.go @@ -28,6 +28,9 @@ const ( // FeeEnabledPrefix is the key prefix for storing fee enabled flag FeeEnabledKeyPrefix = "feeEnabled" + // PayeeAddressKeyPrefix is the key prefix for the fee payee address stored in state + PayeeAddressKeyPrefix = "payeeAddress" + // CounterpartyRelayerAddressKeyPrefix is the key prefix for relayer address mapping CounterpartyRelayerAddressKeyPrefix = "relayerAddress" @@ -70,6 +73,23 @@ func ParseKeyFeeEnabled(key string) (portID, channelID string, err error) { return portID, channelID, nil } +// KeyPayeeAddress returns the key for relayer address -> payee address mapping +func KeyPayeeAddress(relayerAddr, channelID string) []byte { + return []byte(fmt.Sprintf("%s/%s/%s", PayeeAddressKeyPrefix, relayerAddr, channelID)) +} + +// ParseKeyPayeeAddress returns the registered relayer addresss and channelID used to the store the fee payee address +func ParseKeyPayeeAddress(key string) (relayerAddr, channelID string, err error) { + keySplit := strings.Split(key, "/") + if len(keySplit) != 3 { + return "", "", sdkerrors.Wrapf( + sdkerrors.ErrLogic, "key provided is incorrect: the key split has incorrect length, expected %d, got %d", 3, len(keySplit), + ) + } + + return keySplit[1], keySplit[2], nil +} + // KeyCounterpartyRelayer returns the key for relayer address -> counterparty address mapping func KeyCounterpartyRelayer(address, channelID string) []byte { return []byte(fmt.Sprintf("%s/%s/%s", CounterpartyRelayerAddressKeyPrefix, address, channelID)) diff --git a/modules/apps/29-fee/types/keys_test.go b/modules/apps/29-fee/types/keys_test.go index 7cc0b4c9543..442c4a47634 100644 --- a/modules/apps/29-fee/types/keys_test.go +++ b/modules/apps/29-fee/types/keys_test.go @@ -13,6 +13,42 @@ import ( var validPacketID = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) +func TestKeyPayeeAddress(t *testing.T) { + key := types.KeyPayeeAddress("relayer-address", ibctesting.FirstChannelID) + require.Equal(t, string(key), fmt.Sprintf("%s/%s/%s", types.PayeeAddressKeyPrefix, "relayer-address", ibctesting.FirstChannelID)) +} + +func TestParseKeyPayeeAddress(t *testing.T) { + testCases := []struct { + name string + key string + expPass bool + }{ + { + "success", + string(types.KeyPayeeAddress("relayer-address", ibctesting.FirstChannelID)), + true, + }, + { + "incorrect key - key split has incorrect length", + "payeeAddress/relayer_address/transfer/channel-0", + false, + }, + } + + for _, tc := range testCases { + address, channelID, err := types.ParseKeyPayeeAddress(tc.key) + + if tc.expPass { + require.NoError(t, err) + require.Equal(t, "relayer-address", address) + require.Equal(t, ibctesting.FirstChannelID, channelID) + } else { + require.Error(t, err) + } + } +} + func TestKeyCounterpartyRelayer(t *testing.T) { var ( relayerAddress = "relayer_address" diff --git a/modules/apps/29-fee/types/msgs.go b/modules/apps/29-fee/types/msgs.go index 0e729edbd17..3d5520f3ff2 100644 --- a/modules/apps/29-fee/types/msgs.go +++ b/modules/apps/29-fee/types/msgs.go @@ -16,6 +16,53 @@ const ( TypeMsgPayPacketFeeAsync = "payPacketFeeAsync" ) +// NewMsgRegisterPayee creates a new instance of MsgRegisterPayee +func NewMsgRegisterPayee(portID, channelID, relayerAddr, payeeAddr string) *MsgRegisterPayee { + return &MsgRegisterPayee{ + PortId: portID, + ChannelId: channelID, + RelayerAddress: relayerAddr, + Payee: payeeAddr, + } +} + +// ValidateBasic implements sdk.Msg and performs basic stateless validation +func (msg MsgRegisterPayee) ValidateBasic() error { + if err := host.PortIdentifierValidator(msg.PortId); err != nil { + return err + } + + if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { + return err + } + + if msg.RelayerAddress == msg.Payee { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "relayer address and payee must not be equal") + } + + _, err := sdk.AccAddressFromBech32(msg.RelayerAddress) + if err != nil { + return sdkerrors.Wrap(err, "failed to create sdk.AccAddress from relayer address") + } + + _, err = sdk.AccAddressFromBech32(msg.Payee) + if err != nil { + return sdkerrors.Wrap(err, "failed to create sdk.AccAddress from payee address") + } + + return nil +} + +// GetSigners implements sdk.Msg +func (msg MsgRegisterPayee) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(msg.RelayerAddress) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{signer} +} + // NewMsgRegisterCounterpartyAddress creates a new instance of MsgRegisterCounterpartyAddress func NewMsgRegisterCounterpartyAddress(portID, channelID, address, counterpartyAddress string) *MsgRegisterCounterpartyAddress { return &MsgRegisterCounterpartyAddress{ diff --git a/modules/apps/29-fee/types/msgs_test.go b/modules/apps/29-fee/types/msgs_test.go index 17452a64b45..4ca23fea458 100644 --- a/modules/apps/29-fee/types/msgs_test.go +++ b/modules/apps/29-fee/types/msgs_test.go @@ -12,6 +12,81 @@ import ( "github.com/tendermint/tendermint/crypto/secp256k1" ) +func TestMsgRegisterPayeeValidation(t *testing.T) { + var msg *types.MsgRegisterPayee + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success", + func() {}, + true, + }, + { + "invalid portID", + func() { + msg.PortId = "" + }, + false, + }, + { + "invalid channelID", + func() { + msg.ChannelId = "" + }, + false, + }, + { + "invalid request relayer and payee are equal", + func() { + msg.RelayerAddress = defaultAccAddress + msg.Payee = defaultAccAddress + }, + false, + }, + { + "invalid relayer address", + func() { + msg.RelayerAddress = "invalid-address" + }, + false, + }, + { + "invalid payee address", + func() { + msg.Payee = "invalid-address" + }, + false, + }, + } + + for i, tc := range testCases { + relayerAddr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + payeeAddr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + + msg = types.NewMsgRegisterPayee(ibctesting.MockPort, ibctesting.FirstChannelID, relayerAddr.String(), payeeAddr.String()) + + tc.malleate() + + err := msg.ValidateBasic() + + if tc.expPass { + require.NoError(t, err, "valid test case %d failed: %s", i, tc.name) + } else { + require.Error(t, err, "invalid test case %d passed: %s", i, tc.name) + } + } +} + +func TestRegisterPayeeGetSigners(t *testing.T) { + accAddress := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + msg := types.NewMsgRegisterPayee(ibctesting.MockPort, ibctesting.FirstChannelID, accAddress.String(), defaultAccAddress) + require.Equal(t, []sdk.AccAddress{sdk.AccAddress(accAddress)}, msg.GetSigners()) +} + func TestMsgRegisterCountepartyAddressValidation(t *testing.T) { var msg *types.MsgRegisterCounterpartyAddress diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 32677378fe3..1a9eba1927f 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -966,88 +966,88 @@ func init() { } var fileDescriptor_0638a8a78ca2503c = []byte{ - // 1281 bytes of a gzipped FileDescriptorProto + // 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, 0x53, 0x6b, 0x43, 0x68, 0x04, 0x82, 0x76, 0x95, 0x0b, - 0x08, 0xe4, 0xae, 0x77, 0xc7, 0xce, 0x2a, 0xce, 0xce, 0x76, 0x77, 0x6d, 0x70, 0xd3, 0x20, 0x35, - 0x52, 0x84, 0x04, 0x15, 0x42, 0x42, 0xe2, 0x80, 0xb8, 0x22, 0x24, 0x24, 0xb8, 0xf3, 0x0d, 0x7a, - 0xaa, 0x2a, 0x71, 0xe1, 0x64, 0xaa, 0x84, 0x4f, 0x60, 0x71, 0x40, 0xe2, 0x82, 0x76, 0x66, 0x76, - 0xbd, 0xee, 0xee, 0x26, 0xde, 0x92, 0x88, 0x53, 0xec, 0xf9, 0xfd, 0x99, 0xf7, 0xde, 0xfc, 0x3c, - 0xf3, 0x14, 0x78, 0xc1, 0xa8, 0x68, 0xb2, 0x6a, 0x59, 0x75, 0x43, 0x53, 0x5d, 0x83, 0x9a, 0x8e, - 0x5c, 0x25, 0x44, 0x6e, 0x2e, 0xc8, 0x77, 0x1a, 0xc4, 0x6e, 0x49, 0x96, 0x4d, 0x5d, 0x8a, 0xce, - 0x1a, 0x15, 0x4d, 0x0a, 0x27, 0x49, 0x55, 0x42, 0xa4, 0xe6, 0x42, 0x76, 0xa2, 0x46, 0x6b, 0x94, - 0xe5, 0xc8, 0xde, 0x27, 0x9e, 0x9e, 0x9d, 0xaa, 0x51, 0x5a, 0xab, 0x13, 0x59, 0xb5, 0x0c, 0x59, - 0x35, 0x4d, 0xea, 0x8a, 0x22, 0x1e, 0xcd, 0x69, 0xd4, 0xd9, 0xa0, 0x8e, 0x5c, 0x51, 0x1d, 0x6f, - 0xa3, 0x0a, 0x71, 0xd5, 0x05, 0x59, 0xa3, 0x86, 0x29, 0xe2, 0x73, 0xe1, 0x38, 0x43, 0x11, 0x64, - 0x59, 0x6a, 0xcd, 0x30, 0x59, 0x33, 0x91, 0x7b, 0x3e, 0x09, 0xbd, 0x87, 0x8f, 0xa7, 0x5c, 0x4c, - 0x4a, 0xa9, 0x11, 0x93, 0x38, 0x86, 0x13, 0xee, 0xa4, 0x51, 0x9b, 0xc8, 0xda, 0x9a, 0x6a, 0x9a, - 0xa4, 0xee, 0xa5, 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8f, - 0xfb, 0x67, 0x00, 0x51, 0xd4, 0x32, 0x1c, 0x74, 0xd3, 0x27, 0x5a, 0x9e, 0x83, 0x6e, 0xfa, 0x64, - 0x77, 0x82, 0x5f, 0x62, 0xfc, 0x72, 0x68, 0x2a, 0xc2, 0x2f, 0xf4, 0xd8, 0xa2, 0x47, 0x00, 0x9e, - 0x8e, 0x34, 0x41, 0x97, 0x53, 0xee, 0xea, 0xa3, 0x5d, 0x4a, 0x5d, 0x27, 0xc0, 0xde, 0x60, 0x60, - 0x8b, 0xe8, 0xda, 0x7e, 0x60, 0xfb, 0xb9, 0x5d, 0x8b, 0xef, 0x3f, 0xdc, 0xcd, 0x81, 0xc7, 0xbb, - 0x39, 0xf0, 0x64, 0x37, 0x07, 0xbe, 0xde, 0xcb, 0x0d, 0x3c, 0xde, 0xcb, 0x0d, 0xfc, 0xbe, 0x97, - 0x1b, 0xf8, 0xf0, 0x52, 0xd4, 0xae, 0x1b, 0x15, 0x6d, 0xbe, 0x46, 0xe5, 0xe6, 0xa2, 0xbc, 0x41, - 0xf5, 0x46, 0x9d, 0x38, 0x7c, 0xeb, 0xc2, 0xd5, 0x79, 0x6f, 0x77, 0xe6, 0xe0, 0x2b, 0xc7, 0xd9, - 0x3f, 0x91, 0x16, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x61, 0x8e, 0x05, 0x2f, 0x71, 0x13, 0x00, - 0x00, + 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, 0x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x59, 0xd4, 0x66, 0x12, 0x7b, 0xea, 0x8c, 0x28, 0x47, 0xbd, 0xaf, 0x2b, + 0x3a, 0x9a, 0x86, 0x50, 0x48, 0xec, 0xc5, 0x8e, 0xb0, 0xd8, 0x88, 0x58, 0x89, 0x91, 0x76, 0x28, + 0x2a, 0xed, 0x67, 0x00, 0xce, 0x75, 0x43, 0x48, 0xa8, 0x7c, 0xa3, 0x8f, 0x93, 0x17, 0x3f, 0x73, + 0x6f, 0xc1, 0x33, 0x0c, 0xcf, 0x75, 0xea, 0xaa, 0x55, 0x85, 0x68, 0x75, 0x96, 0xda, 0xaf, 0x69, + 0xc3, 0x5f, 0x03, 0x98, 0x8e, 0xeb, 0x2f, 0xf8, 0xdd, 0x86, 0x23, 0x36, 0xd1, 0xea, 0xc5, 0x32, + 0x21, 0x3e, 0xa9, 0x33, 0x1d, 0x07, 0xe6, 0x1f, 0x55, 0x81, 0x1a, 0x66, 0xfe, 0xaa, 0xd7, 0xbc, + 0xd5, 0xcc, 0x8e, 0x37, 0xd4, 0xf5, 0xea, 0x53, 0x38, 0xa8, 0xc4, 0xdf, 0xff, 0x96, 0x9d, 0xad, + 0x18, 0xee, 0x6a, 0xad, 0x24, 0x69, 0x74, 0x5d, 0x16, 0x77, 0x1f, 0xff, 0x33, 0xef, 0xe8, 0x6b, + 0xb2, 0xdb, 0xb0, 0x88, 0xc3, 0x9a, 0x38, 0xca, 0xb0, 0x2d, 0x50, 0xe0, 0x37, 0xe1, 0x64, 0x1b, + 0xdb, 0x15, 0x6d, 0xad, 0xbf, 0xd4, 0xbf, 0x02, 0x61, 0x69, 0x83, 0xf6, 0x82, 0x79, 0x03, 0x0e, + 0xab, 0xda, 0x5a, 0x97, 0xc4, 0x0b, 0x82, 0xf8, 0x09, 0x4e, 0xdc, 0x2f, 0xec, 0x8d, 0xf7, 0x31, + 0x95, 0x43, 0xc0, 0x37, 0xe0, 0x54, 0x1b, 0xd7, 0x75, 0x63, 0x9d, 0xd0, 0x9a,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0x43, 0xcf, 0x30, + 0xda, 0x06, 0xf0, 0x64, 0xa4, 0x09, 0xba, 0xd8, 0xe3, 0xae, 0x3e, 0xda, 0xa5, 0x9e, 0xeb, 0x04, + 0xd8, 0xe7, 0x19, 0xd8, 0xab, 0x28, 0x7f, 0xc0, 0xdb, 0x37, 0x44, 0x29, 0xff, 0xd2, 0xbd, 0x9d, + 0x0c, 0xd8, 0xde, 0xc9, 0x80, 0xdf, 0x77, 0x32, 0xe0, 0x8b, 0xdd, 0xcc, 0xc0, 0xf6, 0x6e, 0x66, + 0xe0, 0xd7, 0xdd, 0xcc, 0xc0, 0x1b, 0x17, 0xa2, 0x56, 0xde, 0x28, 0x69, 0xf3, 0x15, 0x2a, 0xd7, + 0x17, 0xe5, 0x75, 0xaa, 0xd7, 0xaa, 0xc4, 0xe1, 0x9b, 0xe7, 0x2e, 0xcf, 0x7b, 0xfb, 0x33, 0x77, + 0x5f, 0x3a, 0xca, 0xfe, 0xc1, 0xb4, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x32, 0x7d, + 0x07, 0x8d, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index 9b9e47c5939..712c7f32727 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -68,7 +68,7 @@ func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler ru } var ( - filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -82,26 +82,26 @@ func request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.M _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -138,26 +138,26 @@ func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler run _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -184,7 +184,7 @@ func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler run } var ( - filter_Query_IncentivizedPacketsForChannel_0 = &utilities.DoubleArray{Encoding: map[string]int{"port_id": 0, "channel_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} + filter_Query_IncentivizedPacketsForChannel_0 = &utilities.DoubleArray{Encoding: map[string]int{"channel_id": 0, "port_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) func request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,26 +198,26 @@ func request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, marshale _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } if err := req.ParseForm(); err != nil { @@ -243,26 +243,26 @@ func local_request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, ma _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } if err := req.ParseForm(); err != nil { @@ -278,7 +278,7 @@ func local_request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, ma } var ( - filter_Query_TotalRecvFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_TotalRecvFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -292,26 +292,26 @@ func request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -348,26 +348,26 @@ func local_request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -394,7 +394,7 @@ func local_request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_TotalAckFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_TotalAckFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -408,26 +408,26 @@ func request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.Marshal _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -464,26 +464,26 @@ func local_request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.M _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -510,7 +510,7 @@ func local_request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.M } var ( - filter_Query_TotalTimeoutFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_TotalTimeoutFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -524,26 +524,26 @@ func request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runtime.Mar _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -580,26 +580,26 @@ func local_request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runti _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -636,26 +636,26 @@ func request_Query_CounterpartyAddress_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["relayer_address"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.RelayerAddress, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["relayer_address"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.RelayerAddress, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) } msg, err := client.CounterpartyAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -674,26 +674,26 @@ func local_request_Query_CounterpartyAddress_0(ctx context.Context, marshaler ru _ = err ) - val, ok = pathParams["relayer_address"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.RelayerAddress, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["relayer_address"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.RelayerAddress, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) } msg, err := server.CounterpartyAddress(ctx, &protoReq) @@ -748,26 +748,26 @@ func request_Query_FeeEnabledChannel_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } msg, err := client.FeeEnabledChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -786,26 +786,26 @@ func local_request_Query_FeeEnabledChannel_0(ctx context.Context, marshaler runt _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } msg, err := server.FeeEnabledChannel(ctx, &protoReq) @@ -1226,21 +1226,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPacket_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", "incentivized_packet", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPacket_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", "incentivized_packet"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPacketsForChannel_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", "incentivized_packets", "port", "port_id", "channel", "channel_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPacketsForChannel_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", "ports", "port_id", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TotalRecvFees_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_recv_fees", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TotalRecvFees_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_recv_fees"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TotalAckFees_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_ack_fees", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TotalAckFees_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_ack_fees"}, "", runtime.AssumeColonVerbOpt(true))) - 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_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_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_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))) - 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))) + pattern_Query_FeeEnabledChannel_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", "ports", "port_id", "fee_enabled"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 66827e58cc6..7c941f44c9c 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -29,6 +29,88 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// MsgRegisterPayee defines the request type for the RegisterPayee rpc +type MsgRegisterPayee 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"` + // the relayer address + RelayerAddress string `protobuf:"bytes,3,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + // the fee payee address + Payee string `protobuf:"bytes,4,opt,name=payee,proto3" json:"payee,omitempty"` +} + +func (m *MsgRegisterPayee) Reset() { *m = MsgRegisterPayee{} } +func (m *MsgRegisterPayee) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterPayee) ProtoMessage() {} +func (*MsgRegisterPayee) Descriptor() ([]byte, []int) { + return fileDescriptor_05c93128649f1b96, []int{0} +} +func (m *MsgRegisterPayee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterPayee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterPayee.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 *MsgRegisterPayee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterPayee.Merge(m, src) +} +func (m *MsgRegisterPayee) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterPayee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterPayee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterPayee proto.InternalMessageInfo + +// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +type MsgRegisterPayeeResponse struct { +} + +func (m *MsgRegisterPayeeResponse) Reset() { *m = MsgRegisterPayeeResponse{} } +func (m *MsgRegisterPayeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterPayeeResponse) ProtoMessage() {} +func (*MsgRegisterPayeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_05c93128649f1b96, []int{1} +} +func (m *MsgRegisterPayeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterPayeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterPayeeResponse.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 *MsgRegisterPayeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterPayeeResponse.Merge(m, src) +} +func (m *MsgRegisterPayeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterPayeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterPayeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterPayeeResponse proto.InternalMessageInfo + // MsgRegisterCounterpartyAddress defines the request type for the RegisterCounterpartyAddress rpc type MsgRegisterCounterpartyAddress struct { // the relayer address @@ -45,7 +127,7 @@ func (m *MsgRegisterCounterpartyAddress) Reset() { *m = MsgRegisterCount func (m *MsgRegisterCounterpartyAddress) String() string { return proto.CompactTextString(m) } func (*MsgRegisterCounterpartyAddress) ProtoMessage() {} func (*MsgRegisterCounterpartyAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{0} + return fileDescriptor_05c93128649f1b96, []int{2} } func (m *MsgRegisterCounterpartyAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -84,7 +166,7 @@ func (m *MsgRegisterCounterpartyAddressResponse) Reset() { func (m *MsgRegisterCounterpartyAddressResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterCounterpartyAddressResponse) ProtoMessage() {} func (*MsgRegisterCounterpartyAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{1} + return fileDescriptor_05c93128649f1b96, []int{3} } func (m *MsgRegisterCounterpartyAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +215,7 @@ func (m *MsgPayPacketFee) Reset() { *m = MsgPayPacketFee{} } func (m *MsgPayPacketFee) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFee) ProtoMessage() {} func (*MsgPayPacketFee) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{2} + return fileDescriptor_05c93128649f1b96, []int{4} } func (m *MsgPayPacketFee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,7 +252,7 @@ func (m *MsgPayPacketFeeResponse) Reset() { *m = MsgPayPacketFeeResponse func (m *MsgPayPacketFeeResponse) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFeeResponse) ProtoMessage() {} func (*MsgPayPacketFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{3} + return fileDescriptor_05c93128649f1b96, []int{5} } func (m *MsgPayPacketFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -212,7 +294,7 @@ func (m *MsgPayPacketFeeAsync) Reset() { *m = MsgPayPacketFeeAsync{} } func (m *MsgPayPacketFeeAsync) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFeeAsync) ProtoMessage() {} func (*MsgPayPacketFeeAsync) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{4} + return fileDescriptor_05c93128649f1b96, []int{6} } func (m *MsgPayPacketFeeAsync) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -249,7 +331,7 @@ func (m *MsgPayPacketFeeAsyncResponse) Reset() { *m = MsgPayPacketFeeAsy func (m *MsgPayPacketFeeAsyncResponse) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFeeAsyncResponse) ProtoMessage() {} func (*MsgPayPacketFeeAsyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{5} + return fileDescriptor_05c93128649f1b96, []int{7} } func (m *MsgPayPacketFeeAsyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -279,6 +361,8 @@ func (m *MsgPayPacketFeeAsyncResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPayPacketFeeAsyncResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*MsgRegisterPayee)(nil), "ibc.applications.fee.v1.MsgRegisterPayee") + proto.RegisterType((*MsgRegisterPayeeResponse)(nil), "ibc.applications.fee.v1.MsgRegisterPayeeResponse") proto.RegisterType((*MsgRegisterCounterpartyAddress)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyAddress") proto.RegisterType((*MsgRegisterCounterpartyAddressResponse)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse") proto.RegisterType((*MsgPayPacketFee)(nil), "ibc.applications.fee.v1.MsgPayPacketFee") @@ -290,48 +374,53 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/tx.proto", fileDescriptor_05c93128649f1b96) } var fileDescriptor_05c93128649f1b96 = []byte{ - // 650 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xbf, 0x4f, 0xdb, 0x40, - 0x14, 0xc7, 0x63, 0x42, 0x81, 0x5c, 0x11, 0x34, 0x57, 0x28, 0x21, 0x50, 0x9b, 0x7a, 0xa8, 0x22, - 0x55, 0xd8, 0xe5, 0x97, 0xaa, 0xb2, 0x20, 0x82, 0x84, 0xca, 0x80, 0x8a, 0x4e, 0x9d, 0xaa, 0x4a, - 0xc8, 0x39, 0xbf, 0x18, 0xb7, 0x89, 0xcf, 0xf2, 0x39, 0x51, 0xfd, 0x0f, 0x54, 0x1d, 0xd9, 0xba, - 0xf2, 0xe7, 0x30, 0x32, 0x74, 0xe8,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b, 0x08, 0x65, 0xed, - 0x08, 0x7e, 0x32, 0xe5, 0x17, 0x93, 0x58, 0xab, 0x66, 0xd7, 0x0e, 0x62, 0x3a, 0xa9, 0x64, 0x9b, - 0x23, 0x7b, 0x77, 0xe6, 0xeb, 0x85, 0x56, 0xfa, 0x75, 0xa1, 0x95, 0xf4, 0x06, 0x7a, 0x3e, 0xbe, - 0x79, 0x02, 0xdc, 0x67, 0x1e, 0x07, 0xfd, 0x7c, 0x02, 0xcd, 0x1f, 0x73, 0xe7, 0xc4, 0x8a, 0x4e, - 0x2c, 0xfa, 0x09, 0xc2, 0x43, 0x00, 0xbc, 0x8d, 0xca, 0x6d, 0x80, 0xd4, 0x94, 0x87, 0x9b, 0xab, - 0xc6, 0x88, 0xcf, 0x67, 0x1c, 0x02, 0x34, 0x27, 0x2f, 0x63, 0xad, 0x44, 0x04, 0x8e, 0xf7, 0xd0, - 0x1c, 0x67, 0xbd, 0x80, 0xc2, 0x69, 0xde, 0xa7, 0xb4, 0x6b, 0x39, 0x89, 0xb5, 0x45, 0x59, 0xf7, - 0x70, 0x5c, 0x27, 0xb3, 0xf2, 0xe0, 0x44, 0x36, 0xfd, 0x06, 0x55, 0x33, 0xa0, 0xd0, 0xbb, 0xf4, - 0x6a, 0x35, 0x89, 0xb5, 0xda, 0x90, 0x46, 0xd1, 0x82, 0x79, 0x79, 0x76, 0x90, 0x1b, 0x81, 0x9f, - 0xa0, 0x29, 0xee, 0x3a, 0x1e, 0x04, 0xd2, 0x3a, 0x92, 0xed, 0x70, 0x1d, 0xcd, 0x04, 0xd0, 0xb1, - 0x22, 0x08, 0x78, 0xed, 0xc1, 0x5a, 0xb9, 0x51, 0x21, 0x83, 0x7d, 0xc1, 0xbc, 0x65, 0xb4, 0x74, - 0xcb, 0x91, 0x81, 0x5b, 0xdf, 0x15, 0xb4, 0x70, 0x2b, 0xb6, 0xcf, 0x23, 0x8f, 0xe2, 0x77, 0xa8, - 0xe2, 0xa7, 0x27, 0xa2, 0x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xc0, 0xc5, 0xab, 0xca, 0xcd, 0xcd, 0xd7, - 0xeb, 0xe2, 0x41, 0x0d, 0x23, 0x1f, 0x78, 0x6b, 0x2a, 0x7d, 0x2d, 0xb7, 0xfe, 0x04, 0x00, 0x00, - 0xff, 0xff, 0xcb, 0x30, 0xa1, 0x30, 0xc6, 0x05, 0x00, 0x00, + // 732 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x4f, 0xdb, 0x58, + 0x10, 0x8e, 0x09, 0xbf, 0x32, 0xb0, 0x40, 0xbc, 0x01, 0x8c, 0x61, 0x6d, 0xd6, 0x87, 0x55, 0x56, + 0x2b, 0xec, 0x4d, 0x00, 0xad, 0x96, 0x0b, 0x22, 0x48, 0xa8, 0x1c, 0x50, 0x23, 0xab, 0xa7, 0xaa, + 0x12, 0x72, 0x9c, 0x89, 0x71, 0x9b, 0xe4, 0x59, 0x7e, 0x4e, 0x54, 0xff, 0x07, 0x3d, 0x72, 0xeb, + 0x95, 0x3f, 0x87, 0x23, 0x87, 0x1e, 0xaa, 0x1e, 0xac, 0x0a, 0x2e, 0x3d, 0x47, 0xea, 0xa9, 0x97, + 0xca, 0xf6, 0xb3, 0xeb, 0xa4, 0x09, 0x0a, 0xbd, 0xbd, 0x99, 0xf9, 0x66, 0xde, 0x7c, 0x9f, 0x67, + 0xfc, 0x60, 0xd7, 0x6e, 0x98, 0x9a, 0xe1, 0x38, 0x6d, 0xdb, 0x34, 0x3c, 0x9b, 0x74, 0xa9, 0xd6, + 0x42, 0xd4, 0xfa, 0x15, 0xcd, 0x7b, 0xab, 0x3a, 0x2e, 0xf1, 0x08, 0xbf, 0x69, 0x37, 0x4c, 0x35, + 0x8b, 0x50, 0x5b, 0x88, 0x6a, 0xbf, 0x22, 0x96, 0x2c, 0x62, 0x91, 0x08, 0xa3, 0x85, 0xa7, 0x18, + 0x2e, 0xfe, 0x39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0xb4, 0xfe, 0xbe, 0xd6, 0x21, 0xcd, 0x5e, 0x1b, 0x69, 0xf8, 0x7a, 0x51, 0xad, + 0xfa, 0xff, 0x5e, 0xf8, 0x70, 0x79, 0xbe, 0x83, 0xb4, 0x31, 0x1f, 0xbd, 0x4a, 0xfb, 0xdf, 0x03, + 0x00, 0x00, 0xff, 0xff, 0x8c, 0x56, 0x8c, 0xfd, 0x2e, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -346,11 +435,17 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which escrowed packet fees will be paid out. The payee should be registered on the source chain from which + // packets originate as this is where fee distribution takes place. This function may be called more than once by a + // relayer, in which case, the latest payee is always used. + RegisterPayee(ctx context.Context, in *MsgRegisterPayee, opts ...grpc.CallOption) (*MsgRegisterPayeeResponse, error) // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. + // may be called more than once by a relayer, in which case, the latest counterparty address is always used. RegisterCounterpartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterpartyAddressResponse, error) // PayPacketFee defines a rpc handler method for MsgPayPacketFee // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to @@ -372,6 +467,15 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } +func (c *msgClient) RegisterPayee(ctx context.Context, in *MsgRegisterPayee, opts ...grpc.CallOption) (*MsgRegisterPayeeResponse, error) { + out := new(MsgRegisterPayeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/RegisterPayee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) RegisterCounterpartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterpartyAddressResponse, error) { out := new(MsgRegisterCounterpartyAddressResponse) err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/RegisterCounterpartyAddress", in, out, opts...) @@ -401,11 +505,17 @@ func (c *msgClient) PayPacketFeeAsync(ctx context.Context, in *MsgPayPacketFeeAs // MsgServer is the server API for Msg service. type MsgServer interface { + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which escrowed packet fees will be paid out. The payee should be registered on the source chain from which + // packets originate as this is where fee distribution takes place. This function may be called more than once by a + // relayer, in which case, the latest payee is always used. + RegisterPayee(context.Context, *MsgRegisterPayee) (*MsgRegisterPayeeResponse, error) // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. + // may be called more than once by a relayer, in which case, the latest counterparty address is always used. RegisterCounterpartyAddress(context.Context, *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterpartyAddressResponse, error) // PayPacketFee defines a rpc handler method for MsgPayPacketFee // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to @@ -423,6 +533,9 @@ type MsgServer interface { type UnimplementedMsgServer struct { } +func (*UnimplementedMsgServer) RegisterPayee(ctx context.Context, req *MsgRegisterPayee) (*MsgRegisterPayeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterPayee not implemented") +} func (*UnimplementedMsgServer) RegisterCounterpartyAddress(ctx context.Context, req *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterpartyAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterpartyAddress not implemented") } @@ -437,6 +550,24 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } +func _Msg_RegisterPayee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterPayee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterPayee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.fee.v1.Msg/RegisterPayee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterPayee(ctx, req.(*MsgRegisterPayee)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RegisterCounterpartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRegisterCounterpartyAddress) if err := dec(in); err != nil { @@ -495,6 +626,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "ibc.applications.fee.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterPayee", + Handler: _Msg_RegisterPayee_Handler, + }, { MethodName: "RegisterCounterpartyAddress", Handler: _Msg_RegisterCounterpartyAddress_Handler, @@ -512,6 +647,80 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "ibc/applications/fee/v1/tx.proto", } +func (m *MsgRegisterPayee) 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 *MsgRegisterPayee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterPayee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payee) > 0 { + i -= len(m.Payee) + copy(dAtA[i:], m.Payee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Payee))) + i-- + dAtA[i] = 0x22 + } + if len(m.RelayerAddress) > 0 { + i -= len(m.RelayerAddress) + copy(dAtA[i:], m.RelayerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.RelayerAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintTx(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 = encodeVarintTx(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterPayeeResponse) 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 *MsgRegisterPayeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterPayeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgRegisterCounterpartyAddress) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -749,6 +958,40 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *MsgRegisterPayee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RelayerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Payee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterPayeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgRegisterCounterpartyAddress) Size() (n int) { if m == nil { return 0 @@ -849,6 +1092,234 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *MsgRegisterPayee) 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 ErrIntOverflowTx + } + 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: MsgRegisterPayee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterPayee: 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterPayeeResponse) 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 ErrIntOverflowTx + } + 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: MsgRegisterPayeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterPayeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index 0e1caa5d0f7..5f648107323 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -52,7 +52,8 @@ service Query { // CounterpartyAddress returns the registered counterparty address for forward relaying rpc CounterpartyAddress(QueryCounterpartyAddressRequest) returns (QueryCounterpartyAddressResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/counterparty_address"; + option (google.api.http).get = + "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/counterparty_address"; } // FeeEnabledChannels returns a list of all fee enabled channels diff --git a/proto/ibc/applications/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto index ca8397e74fd..f7c4618f54c 100644 --- a/proto/ibc/applications/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -10,11 +10,18 @@ import "ibc/core/channel/v1/channel.proto"; // Msg defines the ICS29 Msg service. service Msg { + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which escrowed packet fees will be paid out. The payee should be registered on the source chain from which + // packets originate as this is where fee distribution takes place. This function may be called more than once by a + // relayer, in which case, the latest payee is always used. + rpc RegisterPayee(MsgRegisterPayee) returns (MsgRegisterPayeeResponse); + // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. + // may be called more than once by a relayer, in which case, the latest counterparty address is always used. rpc RegisterCounterpartyAddress(MsgRegisterCounterpartyAddress) returns (MsgRegisterCounterpartyAddressResponse); // PayPacketFee defines a rpc handler method for MsgPayPacketFee @@ -30,6 +37,24 @@ service Msg { rpc PayPacketFeeAsync(MsgPayPacketFeeAsync) returns (MsgPayPacketFeeAsyncResponse); } +// MsgRegisterPayee defines the request type for the RegisterPayee rpc +message MsgRegisterPayee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer_address = 3 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + // the fee payee address + string payee = 4; +} + +// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +message MsgRegisterPayeeResponse {} + // MsgRegisterCounterpartyAddress defines the request type for the RegisterCounterpartyAddress rpc message MsgRegisterCounterpartyAddress { option (gogoproto.equal) = false;