diff --git a/e2e/fee_middleware_test.go b/e2e/fee_middleware_test.go index 260209c7978..c64282996c3 100644 --- a/e2e/fee_middleware_test.go +++ b/e2e/fee_middleware_test.go @@ -34,19 +34,6 @@ func (s *FeeMiddlewareTestSuite) RegisterCounterPartyPayee(ctx context.Context, return s.BroadcastMessages(ctx, chain, user, msg) } -// QueryCounterPartyPayee queries the counterparty payee of the given chain and relayer address on the specified channel. -func (s *FeeMiddlewareTestSuite) QueryCounterPartyPayee(ctx context.Context, chain ibc.Chain, relayerAddress, channelID string) (string, error) { - queryClient := s.GetChainGRCPClients(chain).FeeQueryClient - res, err := queryClient.CounterpartyPayee(ctx, &feetypes.QueryCounterpartyPayeeRequest{ - ChannelId: channelID, - Relayer: relayerAddress, - }) - if err != nil { - return "", err - } - return res.CounterpartyPayee, nil -} - // PayPacketFeeAsync broadcasts a MsgPayPacketFeeAsync message. func (s *FeeMiddlewareTestSuite) PayPacketFeeAsync( ctx context.Context, @@ -59,24 +46,6 @@ func (s *FeeMiddlewareTestSuite) PayPacketFeeAsync( return s.BroadcastMessages(ctx, chain, user, msg) } -// QueryIncentivizedPacketsForChannel queries the incentivized packets on the specified channel. -func (s *FeeMiddlewareTestSuite) QueryIncentivizedPacketsForChannel( - ctx context.Context, - chain *cosmos.CosmosChain, - portId, - channelId string, -) ([]*feetypes.IdentifiedPacketFees, error) { - queryClient := s.GetChainGRCPClients(chain).FeeQueryClient - res, err := queryClient.IncentivizedPacketsForChannel(ctx, &feetypes.QueryIncentivizedPacketsForChannelRequest{ - PortId: portId, - ChannelId: channelId, - }) - if err != nil { - return nil, err - } - return res.IncentivizedPackets, err -} - func (s *FeeMiddlewareTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Succeeds() { t := s.T() ctx := context.TODO() diff --git a/e2e/interchain_accounts_test.go b/e2e/interchain_accounts_test.go index 0f5c7a1988a..5a3fe927021 100644 --- a/e2e/interchain_accounts_test.go +++ b/e2e/interchain_accounts_test.go @@ -36,24 +36,6 @@ func (s *InterchainAccountsTestSuite) RegisterInterchainAccount(ctx context.Cont return err } -// QueryIncentivizedPacketsForChannel queries the incentivized packets on the specified channel. -func (s *InterchainAccountsTestSuite) QueryIncentivizedPacketsForChannel( - ctx context.Context, - chain *cosmos.CosmosChain, - portId, - channelId string, -) ([]*feetypes.IdentifiedPacketFees, error) { - queryClient := s.GetChainGRCPClients(chain).FeeQueryClient - res, err := queryClient.IncentivizedPacketsForChannel(ctx, &feetypes.QueryIncentivizedPacketsForChannelRequest{ - PortId: portId, - ChannelId: channelId, - }) - if err != nil { - return nil, err - } - return res.IncentivizedPackets, err -} - // RegisterCounterPartyPayee broadcasts a MsgRegisterCounterpartyPayee message. func (s *InterchainAccountsTestSuite) RegisterCounterPartyPayee(ctx context.Context, chain *cosmos.CosmosChain, user *ibctest.User, portID, channelID, relayerAddr, counterpartyPayeeAddr string) (sdk.TxResponse, error) { @@ -61,19 +43,6 @@ func (s *InterchainAccountsTestSuite) RegisterCounterPartyPayee(ctx context.Cont return s.BroadcastMessages(ctx, chain, user, msg) } -// QueryCounterPartyPayee queries the counterparty payee of the given chain and relayer address on the specified channel. -func (s *InterchainAccountsTestSuite) QueryCounterPartyPayee(ctx context.Context, chain ibc.Chain, relayerAddress, channelID string) (string, error) { - queryClient := s.GetChainGRCPClients(chain).FeeQueryClient - res, err := queryClient.CounterpartyPayee(ctx, &feetypes.QueryCounterpartyPayeeRequest{ - ChannelId: channelID, - Relayer: relayerAddress, - }) - if err != nil { - return "", err - } - return res.CounterpartyPayee, nil -} - func (s *InterchainAccountsTestSuite) TestMsgSubmitTx_SuccessfulTransfer() { t := s.T() ctx := context.TODO() diff --git a/e2e/testsuite/grpc_query.go b/e2e/testsuite/grpc_query.go index 85ae0e179dc..e3265bc1c86 100644 --- a/e2e/testsuite/grpc_query.go +++ b/e2e/testsuite/grpc_query.go @@ -4,8 +4,10 @@ import ( "context" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + "github.com/strangelove-ventures/ibctest/chain/cosmos" "github.com/strangelove-ventures/ibctest/ibc" + feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" @@ -55,3 +57,34 @@ func (s *E2ETestSuite) QueryInterchainAccount(ctx context.Context, chain ibc.Cha } return res.InterchainAccountAddress, nil } + +// QueryIncentivizedPacketsForChannel queries the incentivized packets on the specified channel. +func (s *E2ETestSuite) QueryIncentivizedPacketsForChannel( + ctx context.Context, + chain *cosmos.CosmosChain, + portId, + channelId string, +) ([]*feetypes.IdentifiedPacketFees, error) { + queryClient := s.GetChainGRCPClients(chain).FeeQueryClient + res, err := queryClient.IncentivizedPacketsForChannel(ctx, &feetypes.QueryIncentivizedPacketsForChannelRequest{ + PortId: portId, + ChannelId: channelId, + }) + if err != nil { + return nil, err + } + return res.IncentivizedPackets, err +} + +// QueryCounterPartyPayee queries the counterparty payee of the given chain and relayer address on the specified channel. +func (s *E2ETestSuite) QueryCounterPartyPayee(ctx context.Context, chain ibc.Chain, relayerAddress, channelID string) (string, error) { + queryClient := s.GetChainGRCPClients(chain).FeeQueryClient + res, err := queryClient.CounterpartyPayee(ctx, &feetypes.QueryCounterpartyPayeeRequest{ + ChannelId: channelID, + Relayer: relayerAddress, + }) + if err != nil { + return "", err + } + return res.CounterpartyPayee, nil +}