diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 52f2a145f8f..562bb7f718d 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -33,16 +33,10 @@ - [GenesisState](#ibc.applications.fee.v1.GenesisState) - [ibc/applications/fee/v1/query.proto](#ibc/applications/fee/v1/query.proto) - - [QueryAckFeeRequest](#ibc.applications.fee.v1.QueryAckFeeRequest) - - [QueryAckFeeResponse](#ibc.applications.fee.v1.QueryAckFeeResponse) - [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) - [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) - [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) - [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) - - [QueryReceiveFeeRequest](#ibc.applications.fee.v1.QueryReceiveFeeRequest) - - [QueryReceiveFeeResponse](#ibc.applications.fee.v1.QueryReceiveFeeResponse) - - [QueryTimeoutFeeRequest](#ibc.applications.fee.v1.QueryTimeoutFeeRequest) - - [QueryTimeoutFeeResponse](#ibc.applications.fee.v1.QueryTimeoutFeeResponse) - [Query](#ibc.applications.fee.v1.Query) @@ -698,38 +692,6 @@ GenesisState defines the fee middleware genesis state - - -### QueryAckFeeRequest -QueryAckFeeRequest is the request type for querying the acknowledgement fee - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | -| `relayer_address` | [string](#string) | | Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). | -| `query_height` | [uint64](#uint64) | | Height to query at | - - - - - - - - -### QueryAckFeeResponse -QueryAckFeeResponse is the response type for the AckFee RPC - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | - - - - - - ### QueryIncentivizedPacketRequest @@ -791,75 +753,73 @@ QueryIncentivizedPacketsResponse is the response type for the incentivized packe + - - -### QueryReceiveFeeRequest -QueryReceiveFeeRequest is the request type for querying the receive fee - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | -| `relayer_address` | [string](#string) | | Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). | -| `query_height` | [uint64](#uint64) | | Height to query at | - - + + + - +### Query +Query provides defines the gRPC querier service. -### QueryReceiveFeeResponse -QueryReceiveFeeResponse is the response type for the ReceiveFee RPC +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | Gets all incentivized packets | GET|/ibc/apps/fee/v1/incentivized_packets| +| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | Gets the fees expected for submitting the ReceivePacket, AcknowledgementPacket, and TimeoutPacket messages for the given packet | GET|/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | + +
+## ibc/applications/fee/v1/tx.proto - + -### QueryTimeoutFeeRequest -QueryTimeoutFeeRequest is the request type for querying the timeout fee +### MsgPayPacketFee +MsgPayPacketFee defines the request type EscrowPacketFee RPC +This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be +paid for | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `packet_id` | [ibc.core.channel.v1.PacketId](#ibc.core.channel.v1.PacketId) | | PacketID | -| `relayer_address` | [string](#string) | | Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). | -| `query_height` | [uint64](#uint64) | | Height to query at | +| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | +| `source_port_id` | [string](#string) | | source channel port identifier | +| `source_channel_id` | [string](#string) | | source channel unique identifier | +| `signer` | [string](#string) | | account address to refund fee if necessary | +| `relayers` | [string](#string) | repeated | | - + -### QueryTimeoutFeeResponse -QueryTimeoutFeeResponse is the response type for the timeout RPC +### MsgPayPacketFeeAsync +MsgPayPacketFeeAsync defines the request type PayPacketFeeAsync RPC +This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fee` | [Fee](#ibc.applications.fee.v1.Fee) | | | +| `identified_packet_fee` | [IdentifiedPacketFee](#ibc.applications.fee.v1.IdentifiedPacketFee) | | packet to pay fee for | +| `signer` | [string](#string) | | account address to refund fee if necessary | - - - - + diff --git a/modules/apps/29-fee/keeper/grpc_query.go b/modules/apps/29-fee/keeper/grpc_query.go index 185ad775c93..5c9a8037ab7 100644 --- a/modules/apps/29-fee/keeper/grpc_query.go +++ b/modules/apps/29-fee/keeper/grpc_query.go @@ -1,5 +1,65 @@ package keeper -// TODO +import ( + "context" -//var _ types.QueryServer = Keeper{} + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" + + "github.com/cosmos/ibc-go/modules/apps/29-fee/types" +) + +var _ types.QueryServer = Keeper{} + +// IncentivizedPackets implements the IncentivizedPackets gRPC method +func (k Keeper) IncentivizedPackets(c context.Context, req *types.QueryIncentivizedPacketsRequest) (*types.QueryIncentivizedPacketsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c).WithBlockHeight(int64(req.QueryHeight)) + + var packets []*types.IdentifiedPacketFee + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.FeeInEscrowPrefix)) + _, err := query.Paginate(store, req.Pagination, func(_, value []byte) error { + result := k.MustUnmarshalFee(value) + packets = append(packets, &result) + return nil + }) + + if err != nil { + return nil, status.Error( + codes.NotFound, err.Error(), + ) + } + + return &types.QueryIncentivizedPacketsResponse{ + IncentivizedPackets: packets, + }, nil +} + +// IncentivizedPacket implements the IncentivizedPacket gRPC method +func (k Keeper) IncentivizedPacket(c context.Context, req *types.QueryIncentivizedPacketRequest) (*types.QueryIncentivizedPacketResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c).WithBlockHeight(int64(req.QueryHeight)) + + fee, exists := k.GetFeeInEscrow(ctx, req.PacketId) + if !exists { + return nil, status.Error( + codes.NotFound, + sdkerrors.Wrap(types.ErrFeeNotFound, req.PacketId.String()).Error(), + ) + } + + return &types.QueryIncentivizedPacketResponse{ + IncentivizedPacket: &fee, + }, nil +} diff --git a/modules/apps/29-fee/keeper/grpc_query_test.go b/modules/apps/29-fee/keeper/grpc_query_test.go new file mode 100644 index 00000000000..c1eb27f2fcc --- /dev/null +++ b/modules/apps/29-fee/keeper/grpc_query_test.go @@ -0,0 +1,151 @@ +package keeper_test + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + + "github.com/cosmos/ibc-go/modules/apps/29-fee/types" + ibctesting "github.com/cosmos/ibc-go/testing" +) + +func (suite *KeeperTestSuite) TestQueryIncentivizedPacket() { + + var ( + req *types.QueryIncentivizedPacketRequest + ) + + // setup + validPacketId := types.NewPacketId(ibctesting.FirstChannelID, 1) + invalidPacketId := types.NewPacketId(ibctesting.FirstChannelID, 2) + identifiedPacketFee := types.NewIdentifiedPacketFee( + validPacketId, + types.Fee{ + AckFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + ReceiveFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + TimeoutFee: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))), + }, + []string(nil), + ) + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success", + func() { + req = &types.QueryIncentivizedPacketRequest{ + PacketId: validPacketId, + QueryHeight: 0, + } + }, + true, + }, + { + "packetId not found", + func() { + req = &types.QueryIncentivizedPacketRequest{ + PacketId: invalidPacketId, + QueryHeight: 0, + } + }, + false, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + suite.SetupTest() // reset + + refundAcc := suite.chainA.SenderAccount.GetAddress() + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + suite.chainA.GetSimApp().IBCFeeKeeper.EscrowPacketFee(suite.chainA.GetContext(), refundAcc, identifiedPacketFee) + res, err := suite.queryClient.IncentivizedPacket(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(identifiedPacketFee, res.IncentivizedPacket) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestQueryIncentivizedPackets() { + var ( + req *types.QueryIncentivizedPacketsRequest + expPackets []*types.IdentifiedPacketFee + ) + + fee := types.Fee{ + AckFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, + ReceiveFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, + TimeoutFee: sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}}, + } + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty pagination", + func() { + req = &types.QueryIncentivizedPacketsRequest{} + }, + true, + }, + { + "success", + func() { + refundAcc := suite.chainA.SenderAccount.GetAddress() + + fee1 := types.NewIdentifiedPacketFee(types.NewPacketId(ibctesting.FirstChannelID, 1), fee, []string(nil)) + fee2 := types.NewIdentifiedPacketFee(types.NewPacketId(ibctesting.FirstChannelID, 2), fee, []string(nil)) + fee3 := types.NewIdentifiedPacketFee(types.NewPacketId(ibctesting.FirstChannelID, 3), fee, []string(nil)) + + expPackets = []*types.IdentifiedPacketFee{} + expPackets = append(expPackets, fee1, fee2, fee3) + + for _, p := range expPackets { + suite.chainA.GetSimApp().IBCFeeKeeper.EscrowPacketFee(suite.chainA.GetContext(), refundAcc, p) + } + + req = &types.QueryIncentivizedPacketsRequest{ + Pagination: &query.PageRequest{ + Limit: 5, + CountTotal: false, + }, + QueryHeight: 0, + } + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + tc.malleate() + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + + res, err := suite.queryClient.IncentivizedPackets(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + fmt.Println(expPackets) + suite.Require().Equal(expPackets, res.IncentivizedPackets) + } else { + suite.Require().Error(err) + } + }) + } +} diff --git a/modules/apps/29-fee/keeper/keeper_test.go b/modules/apps/29-fee/keeper/keeper_test.go index ab4ce879a29..476a14698b0 100644 --- a/modules/apps/29-fee/keeper/keeper_test.go +++ b/modules/apps/29-fee/keeper/keeper_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/ibc-go/modules/apps/29-fee/types" transfertypes "github.com/cosmos/ibc-go/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/modules/core/04-channel/types" @@ -20,7 +21,8 @@ type KeeperTestSuite struct { chainA *ibctesting.TestChain chainB *ibctesting.TestChain - path *ibctesting.Path + path *ibctesting.Path + queryClient types.QueryClient } func (suite *KeeperTestSuite) SetupTest() { @@ -35,6 +37,10 @@ func (suite *KeeperTestSuite) SetupTest() { path.EndpointA.ChannelConfig.PortID = transfertypes.PortID path.EndpointB.ChannelConfig.PortID = transfertypes.PortID suite.path = path + + queryHelper := baseapp.NewQueryServerTestHelper(suite.chainA.GetContext(), suite.chainA.GetSimApp().InterfaceRegistry()) + types.RegisterQueryServer(queryHelper, suite.chainA.GetSimApp().IBCFeeKeeper) + suite.queryClient = types.NewQueryClient(queryHelper) } func SetupFeePath(path *ibctesting.Path) error { diff --git a/modules/apps/29-fee/types/keys.go b/modules/apps/29-fee/types/keys.go index 174168a32b0..3df1f637a6c 100644 --- a/modules/apps/29-fee/types/keys.go +++ b/modules/apps/29-fee/types/keys.go @@ -10,16 +10,16 @@ const ( // ModuleName defines the 29-fee name ModuleName = "feeibc" - // StoreKey is the store key string for IBC transfer + // StoreKey is the store key string for IBC fee module StoreKey = ModuleName // PortKey is the port id that is wrapped by fee middleware PortKey = "feetransfer" - // RouterKey is the message route for IBC transfer + // RouterKey is the message route for IBC fee module RouterKey = ModuleName - // QuerierRoute is the querier route for IBC transfer + // QuerierRoute is the querier route for IBC fee module QuerierRoute = ModuleName Version = "fee29-1" diff --git a/modules/apps/29-fee/types/msgs.go b/modules/apps/29-fee/types/msgs.go index ef9e49901fd..2c212da21bc 100644 --- a/modules/apps/29-fee/types/msgs.go +++ b/modules/apps/29-fee/types/msgs.go @@ -169,3 +169,7 @@ func NewIdentifiedPacketFee(packetId *channeltypes.PacketId, fee Fee, relayers [ Relayers: relayers, } } + +func NewPacketId(channelId string, id uint64) *channeltypes.PacketId { + return &channeltypes.PacketId{ChannelId: channelId, PortId: PortKey, Sequence: id} +} diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index dfc07f81fee..99f961652a4 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -31,333 +31,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryReceiveFeeRequest is the request type for querying the receive fee -type QueryReceiveFeeRequest struct { - // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty"` - // Height to query at - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` -} - -func (m *QueryReceiveFeeRequest) Reset() { *m = QueryReceiveFeeRequest{} } -func (m *QueryReceiveFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryReceiveFeeRequest) ProtoMessage() {} -func (*QueryReceiveFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{0} -} -func (m *QueryReceiveFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryReceiveFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryReceiveFeeRequest.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 *QueryReceiveFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryReceiveFeeRequest.Merge(m, src) -} -func (m *QueryReceiveFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryReceiveFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryReceiveFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryReceiveFeeRequest proto.InternalMessageInfo - -func (m *QueryReceiveFeeRequest) GetPacketId() *types.PacketId { - if m != nil { - return m.PacketId - } - return nil -} - -func (m *QueryReceiveFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -func (m *QueryReceiveFeeRequest) GetQueryHeight() uint64 { - if m != nil { - return m.QueryHeight - } - return 0 -} - -// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC -type QueryReceiveFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (m *QueryReceiveFeeResponse) Reset() { *m = QueryReceiveFeeResponse{} } -func (m *QueryReceiveFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryReceiveFeeResponse) ProtoMessage() {} -func (*QueryReceiveFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{1} -} -func (m *QueryReceiveFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryReceiveFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryReceiveFeeResponse.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 *QueryReceiveFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryReceiveFeeResponse.Merge(m, src) -} -func (m *QueryReceiveFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryReceiveFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryReceiveFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryReceiveFeeResponse proto.InternalMessageInfo - -func (m *QueryReceiveFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -// QueryAckFeeRequest is the request type for querying the acknowledgement fee -type QueryAckFeeRequest struct { - // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty"` - // Height to query at - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` -} - -func (m *QueryAckFeeRequest) Reset() { *m = QueryAckFeeRequest{} } -func (m *QueryAckFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAckFeeRequest) ProtoMessage() {} -func (*QueryAckFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{2} -} -func (m *QueryAckFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAckFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAckFeeRequest.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 *QueryAckFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAckFeeRequest.Merge(m, src) -} -func (m *QueryAckFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAckFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAckFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAckFeeRequest proto.InternalMessageInfo - -func (m *QueryAckFeeRequest) GetPacketId() *types.PacketId { - if m != nil { - return m.PacketId - } - return nil -} - -func (m *QueryAckFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -func (m *QueryAckFeeRequest) GetQueryHeight() uint64 { - if m != nil { - return m.QueryHeight - } - return 0 -} - -// QueryAckFeeResponse is the response type for the AckFee RPC -type QueryAckFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (m *QueryAckFeeResponse) Reset() { *m = QueryAckFeeResponse{} } -func (m *QueryAckFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAckFeeResponse) ProtoMessage() {} -func (*QueryAckFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{3} -} -func (m *QueryAckFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAckFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAckFeeResponse.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 *QueryAckFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAckFeeResponse.Merge(m, src) -} -func (m *QueryAckFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAckFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAckFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAckFeeResponse proto.InternalMessageInfo - -func (m *QueryAckFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - -// QueryTimeoutFeeRequest is the request type for querying the timeout fee -type QueryTimeoutFeeRequest struct { - // PacketID - PacketId *types.PacketId `protobuf:"bytes,1,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty"` - // Height to query at - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` -} - -func (m *QueryTimeoutFeeRequest) Reset() { *m = QueryTimeoutFeeRequest{} } -func (m *QueryTimeoutFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTimeoutFeeRequest) ProtoMessage() {} -func (*QueryTimeoutFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{4} -} -func (m *QueryTimeoutFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTimeoutFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTimeoutFeeRequest.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 *QueryTimeoutFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTimeoutFeeRequest.Merge(m, src) -} -func (m *QueryTimeoutFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTimeoutFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTimeoutFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTimeoutFeeRequest proto.InternalMessageInfo - -func (m *QueryTimeoutFeeRequest) GetPacketId() *types.PacketId { - if m != nil { - return m.PacketId - } - return nil -} - -func (m *QueryTimeoutFeeRequest) GetRelayerAddress() string { - if m != nil { - return m.RelayerAddress - } - return "" -} - -func (m *QueryTimeoutFeeRequest) GetQueryHeight() uint64 { - if m != nil { - return m.QueryHeight - } - return 0 -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -type QueryTimeoutFeeResponse struct { - Fee *Fee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (m *QueryTimeoutFeeResponse) Reset() { *m = QueryTimeoutFeeResponse{} } -func (m *QueryTimeoutFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTimeoutFeeResponse) ProtoMessage() {} -func (*QueryTimeoutFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{5} -} -func (m *QueryTimeoutFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTimeoutFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTimeoutFeeResponse.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 *QueryTimeoutFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTimeoutFeeResponse.Merge(m, src) -} -func (m *QueryTimeoutFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTimeoutFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTimeoutFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTimeoutFeeResponse proto.InternalMessageInfo - -func (m *QueryTimeoutFeeResponse) GetFee() *Fee { - if m != nil { - return m.Fee - } - return nil -} - // QueryIncentivizedPacketsRequest is the request type for querying for all incentivized packets type QueryIncentivizedPacketsRequest struct { // pagination defines an optional pagination for the request. @@ -370,7 +43,7 @@ func (m *QueryIncentivizedPacketsRequest) Reset() { *m = QueryIncentiviz func (m *QueryIncentivizedPacketsRequest) String() string { return proto.CompactTextString(m) } func (*QueryIncentivizedPacketsRequest) ProtoMessage() {} func (*QueryIncentivizedPacketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{6} + return fileDescriptor_0638a8a78ca2503c, []int{0} } func (m *QueryIncentivizedPacketsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -423,7 +96,7 @@ func (m *QueryIncentivizedPacketsResponse) Reset() { *m = QueryIncentivi func (m *QueryIncentivizedPacketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryIncentivizedPacketsResponse) ProtoMessage() {} func (*QueryIncentivizedPacketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{7} + return fileDescriptor_0638a8a78ca2503c, []int{1} } func (m *QueryIncentivizedPacketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +144,7 @@ func (m *QueryIncentivizedPacketRequest) Reset() { *m = QueryIncentivize func (m *QueryIncentivizedPacketRequest) String() string { return proto.CompactTextString(m) } func (*QueryIncentivizedPacketRequest) ProtoMessage() {} func (*QueryIncentivizedPacketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{8} + return fileDescriptor_0638a8a78ca2503c, []int{2} } func (m *QueryIncentivizedPacketRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -524,7 +197,7 @@ func (m *QueryIncentivizedPacketResponse) Reset() { *m = QueryIncentiviz func (m *QueryIncentivizedPacketResponse) String() string { return proto.CompactTextString(m) } func (*QueryIncentivizedPacketResponse) ProtoMessage() {} func (*QueryIncentivizedPacketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{9} + return fileDescriptor_0638a8a78ca2503c, []int{3} } func (m *QueryIncentivizedPacketResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -561,12 +234,6 @@ func (m *QueryIncentivizedPacketResponse) GetIncentivizedPacket() *IdentifiedPac } func init() { - proto.RegisterType((*QueryReceiveFeeRequest)(nil), "ibc.applications.fee.v1.QueryReceiveFeeRequest") - proto.RegisterType((*QueryReceiveFeeResponse)(nil), "ibc.applications.fee.v1.QueryReceiveFeeResponse") - proto.RegisterType((*QueryAckFeeRequest)(nil), "ibc.applications.fee.v1.QueryAckFeeRequest") - proto.RegisterType((*QueryAckFeeResponse)(nil), "ibc.applications.fee.v1.QueryAckFeeResponse") - proto.RegisterType((*QueryTimeoutFeeRequest)(nil), "ibc.applications.fee.v1.QueryTimeoutFeeRequest") - proto.RegisterType((*QueryTimeoutFeeResponse)(nil), "ibc.applications.fee.v1.QueryTimeoutFeeResponse") proto.RegisterType((*QueryIncentivizedPacketsRequest)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketsRequest") proto.RegisterType((*QueryIncentivizedPacketsResponse)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketsResponse") proto.RegisterType((*QueryIncentivizedPacketRequest)(nil), "ibc.applications.fee.v1.QueryIncentivizedPacketRequest") @@ -578,54 +245,41 @@ func init() { } var fileDescriptor_0638a8a78ca2503c = []byte{ - // 746 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xc1, 0x6b, 0x13, 0x4f, - 0x18, 0xed, 0xa4, 0xbf, 0x5f, 0xb1, 0x53, 0x51, 0x98, 0x14, 0x1b, 0x42, 0x8d, 0x69, 0x44, 0x1b, - 0xb4, 0x9d, 0x31, 0xf1, 0x60, 0xeb, 0xad, 0x82, 0xc5, 0x80, 0x87, 0x1a, 0x3c, 0x09, 0x12, 0x36, - 0xbb, 0x5f, 0x36, 0x43, 0x93, 0x9d, 0xed, 0xee, 0x24, 0xd0, 0x6a, 0x51, 0xea, 0xb5, 0x07, 0xc1, - 0xab, 0x07, 0xff, 0x0d, 0xff, 0x03, 0x8f, 0x05, 0x2f, 0x82, 0x17, 0x69, 0xbd, 0xf9, 0x4f, 0xc8, - 0xcc, 0x4e, 0xd2, 0x94, 0xcd, 0xb6, 0x49, 0xb1, 0xd0, 0xdb, 0xee, 0xcc, 0xfb, 0xbe, 0x79, 0xef, - 0x7d, 0x3b, 0x8f, 0xc5, 0xb7, 0x79, 0xdd, 0x66, 0x96, 0xef, 0xb7, 0xb8, 0x6d, 0x49, 0x2e, 0xbc, - 0x90, 0x35, 0x00, 0x58, 0xb7, 0xc4, 0xb6, 0x3a, 0x10, 0x6c, 0x53, 0x3f, 0x10, 0x52, 0x90, 0x39, - 0x5e, 0xb7, 0xe9, 0x20, 0x88, 0x36, 0x00, 0x68, 0xb7, 0x94, 0x9d, 0x75, 0x85, 0x2b, 0x34, 0x86, - 0xa9, 0xa7, 0x08, 0x9e, 0xbd, 0x67, 0x8b, 0xb0, 0x2d, 0x42, 0x56, 0xb7, 0x42, 0x88, 0xfa, 0xb0, - 0x6e, 0xa9, 0x0e, 0xd2, 0x2a, 0x31, 0xdf, 0x72, 0xb9, 0xa7, 0x7b, 0x18, 0xec, 0x42, 0xd2, 0xf9, - 0xea, 0x84, 0x08, 0x32, 0xef, 0x0a, 0xe1, 0xb6, 0x80, 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 0x87, 0x7f, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x4c, 0x6f, 0x7f, 0x1d, 0xd0, 0x0a, 0x00, 0x00, + // 542 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0x12, 0x41, + 0x14, 0xee, 0x50, 0x35, 0x3a, 0x78, 0x1a, 0x9a, 0x48, 0x88, 0xae, 0x14, 0xa3, 0x12, 0x23, 0x33, + 0x01, 0x0f, 0xb6, 0x1e, 0x3d, 0x34, 0x92, 0x78, 0xa8, 0x1c, 0x4d, 0x0c, 0xd9, 0x9d, 0x7d, 0x2c, + 0x13, 0x61, 0x67, 0xcb, 0x0c, 0x24, 0xad, 0x36, 0x9a, 0x7a, 0xed, 0xc1, 0xc4, 0x5f, 0xe3, 0x3f, + 0xf0, 0xd8, 0xe8, 0xc5, 0xa3, 0x01, 0x7f, 0x88, 0x99, 0xd9, 0x59, 0xdc, 0x04, 0x36, 0x16, 0x6f, + 0xc3, 0x7b, 0xdf, 0xf7, 0xbe, 0x8f, 0xef, 0xcd, 0x2c, 0xbe, 0x27, 0x02, 0xce, 0xfc, 0x24, 0x19, + 0x09, 0xee, 0x6b, 0x21, 0x63, 0xc5, 0x06, 0x00, 0x6c, 0xd6, 0x66, 0x47, 0x53, 0x98, 0x1c, 0xd3, + 0x64, 0x22, 0xb5, 0x24, 0xb7, 0x44, 0xc0, 0x69, 0x1e, 0x44, 0x07, 0x00, 0x74, 0xd6, 0xae, 0xed, + 0x44, 0x32, 0x92, 0x16, 0xc3, 0xcc, 0x29, 0x85, 0xd7, 0x1e, 0x71, 0xa9, 0xc6, 0x52, 0xb1, 0xc0, + 0x57, 0x90, 0xce, 0x61, 0xb3, 0x76, 0x00, 0xda, 0x6f, 0xb3, 0xc4, 0x8f, 0x44, 0x6c, 0x67, 0x38, + 0xec, 0x6e, 0x91, 0xbe, 0x51, 0x48, 0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09, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x6c, 0x98, 0x87, 0x54, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -640,15 +294,10 @@ 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 QueryClient interface { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) // Gets all incentivized packets IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) - // Gets the specified incentivized packet + // Gets the fees expected for submitting the ReceivePacket, AcknowledgementPacket, and TimeoutPacket messages for the + // given packet IncentivizedPacket(ctx context.Context, in *QueryIncentivizedPacketRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketResponse, error) } @@ -660,33 +309,6 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) ReceiveFee(ctx context.Context, in *QueryReceiveFeeRequest, opts ...grpc.CallOption) (*QueryReceiveFeeResponse, error) { - out := new(QueryReceiveFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/ReceiveFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AckFee(ctx context.Context, in *QueryAckFeeRequest, opts ...grpc.CallOption) (*QueryAckFeeResponse, error) { - out := new(QueryAckFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/AckFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TimeoutFee(ctx context.Context, in *QueryTimeoutFeeRequest, opts ...grpc.CallOption) (*QueryTimeoutFeeResponse, error) { - out := new(QueryTimeoutFeeResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/TimeoutFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) { out := new(QueryIncentivizedPacketsResponse) err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/IncentivizedPackets", in, out, opts...) @@ -707,15 +329,10 @@ func (c *queryClient) IncentivizedPacket(ctx context.Context, in *QueryIncentivi // QueryServer is the server API for Query service. type QueryServer interface { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - ReceiveFee(context.Context, *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - AckFee(context.Context, *QueryAckFeeRequest) (*QueryAckFeeResponse, error) - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - TimeoutFee(context.Context, *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) // Gets all incentivized packets IncentivizedPackets(context.Context, *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) - // Gets the specified incentivized packet + // Gets the fees expected for submitting the ReceivePacket, AcknowledgementPacket, and TimeoutPacket messages for the + // given packet IncentivizedPacket(context.Context, *QueryIncentivizedPacketRequest) (*QueryIncentivizedPacketResponse, error) } @@ -723,15 +340,6 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) ReceiveFee(ctx context.Context, req *QueryReceiveFeeRequest) (*QueryReceiveFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReceiveFee not implemented") -} -func (*UnimplementedQueryServer) AckFee(ctx context.Context, req *QueryAckFeeRequest) (*QueryAckFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AckFee not implemented") -} -func (*UnimplementedQueryServer) TimeoutFee(ctx context.Context, req *QueryTimeoutFeeRequest) (*QueryTimeoutFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TimeoutFee not implemented") -} func (*UnimplementedQueryServer) IncentivizedPackets(ctx context.Context, req *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IncentivizedPackets not implemented") } @@ -743,92 +351,38 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_ReceiveFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryReceiveFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ReceiveFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.fee.v1.Query/ReceiveFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ReceiveFee(ctx, req.(*QueryReceiveFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AckFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAckFeeRequest) +func _Query_IncentivizedPackets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIncentivizedPacketsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).AckFee(ctx, in) + return srv.(QueryServer).IncentivizedPackets(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.fee.v1.Query/AckFee", + FullMethod: "/ibc.applications.fee.v1.Query/IncentivizedPackets", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AckFee(ctx, req.(*QueryAckFeeRequest)) + return srv.(QueryServer).IncentivizedPackets(ctx, req.(*QueryIncentivizedPacketsRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_TimeoutFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTimeoutFeeRequest) +func _Query_IncentivizedPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIncentivizedPacketRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).TimeoutFee(ctx, in) + return srv.(QueryServer).IncentivizedPacket(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.fee.v1.Query/TimeoutFee", + FullMethod: "/ibc.applications.fee.v1.Query/IncentivizedPacket", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TimeoutFee(ctx, req.(*QueryTimeoutFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_IncentivizedPackets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIncentivizedPacketsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).IncentivizedPackets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.fee.v1.Query/IncentivizedPackets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).IncentivizedPackets(ctx, req.(*QueryIncentivizedPacketsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_IncentivizedPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIncentivizedPacketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).IncentivizedPacket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.applications.fee.v1.Query/IncentivizedPacket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).IncentivizedPacket(ctx, req.(*QueryIncentivizedPacketRequest)) + return srv.(QueryServer).IncentivizedPacket(ctx, req.(*QueryIncentivizedPacketRequest)) } return interceptor(ctx, in, info, handler) } @@ -837,18 +391,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ibc.applications.fee.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "ReceiveFee", - Handler: _Query_ReceiveFee_Handler, - }, - { - MethodName: "AckFee", - Handler: _Query_AckFee_Handler, - }, - { - MethodName: "TimeoutFee", - Handler: _Query_TimeoutFee_Handler, - }, { MethodName: "IncentivizedPackets", Handler: _Query_IncentivizedPackets_Handler, @@ -862,252 +404,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "ibc/applications/fee/v1/query.proto", } -func (m *QueryReceiveFeeRequest) 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 *QueryReceiveFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryReceiveFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.QueryHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) - i-- - dAtA[i] = 0x18 - } - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x12 - } - if m.PacketId != nil { - { - size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryReceiveFeeResponse) 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 *QueryReceiveFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryReceiveFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAckFeeRequest) 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 *QueryAckFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAckFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.QueryHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) - i-- - dAtA[i] = 0x18 - } - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x12 - } - if m.PacketId != nil { - { - size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAckFeeResponse) 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 *QueryAckFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAckFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTimeoutFeeRequest) 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 *QueryTimeoutFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTimeoutFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.QueryHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.QueryHeight)) - i-- - dAtA[i] = 0x18 - } - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) - i-- - dAtA[i] = 0x12 - } - if m.PacketId != nil { - { - size, err := m.PacketId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTimeoutFeeResponse) 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 *QueryTimeoutFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTimeoutFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryIncentivizedPacketsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1271,18 +567,14 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryReceiveFeeRequest) Size() (n int) { +func (m *QueryIncentivizedPacketsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.PacketId != nil { - l = m.PacketId.Size() - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { + if m.Pagination != nil { + l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) } if m.QueryHeight != 0 { @@ -1291,117 +583,22 @@ func (m *QueryReceiveFeeRequest) Size() (n int) { return n } -func (m *QueryReceiveFeeResponse) Size() (n int) { +func (m *QueryIncentivizedPacketsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.IncentivizedPackets) > 0 { + for _, e := range m.IncentivizedPackets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } return n } -func (m *QueryAckFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketId != nil { - l = m.PacketId.Size() - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.QueryHeight != 0 { - n += 1 + sovQuery(uint64(m.QueryHeight)) - } - return n -} - -func (m *QueryAckFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTimeoutFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketId != nil { - l = m.PacketId.Size() - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.RelayerAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.QueryHeight != 0 { - n += 1 + sovQuery(uint64(m.QueryHeight)) - } - return n -} - -func (m *QueryTimeoutFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryIncentivizedPacketsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.QueryHeight != 0 { - n += 1 + sovQuery(uint64(m.QueryHeight)) - } - return n -} - -func (m *QueryIncentivizedPacketsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.IncentivizedPackets) > 0 { - for _, e := range m.IncentivizedPackets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryIncentivizedPacketRequest) Size() (n int) { +func (m *QueryIncentivizedPacketRequest) Size() (n int) { if m == nil { return 0 } @@ -1436,675 +633,6 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryReceiveFeeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryReceiveFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryReceiveFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PacketId == nil { - m.PacketId = &types.PacketId{} - } - if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) - } - m.QueryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QueryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryReceiveFeeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryReceiveFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryReceiveFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAckFeeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAckFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAckFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PacketId == nil { - m.PacketId = &types.PacketId{} - } - if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) - } - m.QueryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QueryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAckFeeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAckFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAckFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTimeoutFeeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTimeoutFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTimeoutFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PacketId == nil { - m.PacketId = &types.PacketId{} - } - if err := m.PacketId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) - } - m.QueryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QueryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTimeoutFeeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTimeoutFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTimeoutFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryIncentivizedPacketsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index 884d410092d..3a9b3d581b2 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -31,354 +31,6 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var ( - filter_Query_ReceiveFee_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}} -) - -func request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryReceiveFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["packet_id.port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") - } - - 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.port_id", err) - } - - val, ok = pathParams["packet_id.channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") - } - - 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.channel_id", err) - } - - val, ok = pathParams["packet_id.sequence"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ReceiveFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ReceiveFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ReceiveFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryReceiveFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["packet_id.port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") - } - - 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.port_id", err) - } - - val, ok = pathParams["packet_id.channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") - } - - 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.channel_id", err) - } - - val, ok = pathParams["packet_id.sequence"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ReceiveFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ReceiveFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_AckFee_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}} -) - -func request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAckFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["packet_id.port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") - } - - 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.port_id", err) - } - - val, ok = pathParams["packet_id.channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") - } - - 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.channel_id", err) - } - - val, ok = pathParams["packet_id.sequence"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AckFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AckFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AckFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAckFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["packet_id.port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") - } - - 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.port_id", err) - } - - val, ok = pathParams["packet_id.channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") - } - - 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.channel_id", err) - } - - val, ok = pathParams["packet_id.sequence"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AckFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AckFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_TimeoutFee_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}} -) - -func request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTimeoutFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["packet_id.port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") - } - - 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.port_id", err) - } - - val, ok = pathParams["packet_id.channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") - } - - 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.channel_id", err) - } - - val, ok = pathParams["packet_id.sequence"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TimeoutFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.TimeoutFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TimeoutFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTimeoutFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["packet_id.port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") - } - - 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.port_id", err) - } - - val, ok = pathParams["packet_id.channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") - } - - 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.channel_id", err) - } - - val, ok = pathParams["packet_id.sequence"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.sequence") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.sequence", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.sequence", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TimeoutFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.TimeoutFee(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_IncentivizedPackets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -537,66 +189,6 @@ func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler run // Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_ReceiveFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ReceiveFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AckFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AckFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TimeoutFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TimeoutFee_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_IncentivizedPackets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -678,66 +270,6 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_ReceiveFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ReceiveFee_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ReceiveFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AckFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AckFee_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AckFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TimeoutFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TimeoutFee_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TimeoutFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_IncentivizedPackets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -782,24 +314,12 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_ReceiveFee_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", "receive_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_AckFee_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", "ack_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_TimeoutFee_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", "timeout_fee", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) - 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))) ) var ( - forward_Query_ReceiveFee_0 = runtime.ForwardResponseMessage - - forward_Query_AckFee_0 = runtime.ForwardResponseMessage - - forward_Query_TimeoutFee_0 = runtime.ForwardResponseMessage - forward_Query_IncentivizedPackets_0 = runtime.ForwardResponseMessage forward_Query_IncentivizedPacket_0 = runtime.ForwardResponseMessage diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index e2fd5c141fd..d8b258359ae 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -13,33 +13,13 @@ option go_package = "github.com/cosmos/ibc-go/modules/apps/29-fee/types"; // Query provides defines the gRPC querier service. service Query { - // Gets the fee expected for submitting ReceivePacket msg for the given packet - rpc ReceiveFee(QueryReceiveFeeRequest) returns (QueryReceiveFeeResponse) { - option (google.api.http).get = - "/ibc/apps/fee/v1/receive_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}"; - } - - // Gets the fee expected for submitting AcknowledgePacket msg for the given packet - rpc AckFee(QueryAckFeeRequest) returns (QueryAckFeeResponse) { - option (google.api.http).get = - "/ibc/apps/fee/v1/ack_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}"; - } - - // Gets the fee expected for submitting TimeoutPacket msg for the given packet - rpc TimeoutFee(QueryTimeoutFeeRequest) returns (QueryTimeoutFeeResponse) { - option (google.api.http).get = - "/ibc/apps/fee/v1/timeout_fee/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}"; - } - // Gets all incentivized packets rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets"; } - // Gets the specified incentivized packet + // Gets the fees expected for submitting the ReceivePacket, AcknowledgementPacket, and TimeoutPacket messages for the + // given packet rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" @@ -47,51 +27,6 @@ service Query { } } -// QueryReceiveFeeRequest is the request type for querying the receive fee -message QueryReceiveFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2; - // Height to query at - uint64 query_height = 3; -} - -// QueryReceiveFeeResponse is the response type for the ReceiveFee RPC -message QueryReceiveFeeResponse { - ibc.applications.fee.v1.Fee fee = 1; -} - -// QueryAckFeeRequest is the request type for querying the acknowledgement fee -message QueryAckFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2; - // Height to query at - uint64 query_height = 3; -} - -// QueryAckFeeResponse is the response type for the AckFee RPC -message QueryAckFeeResponse { - ibc.applications.fee.v1.Fee fee = 1; -} - -// QueryTimeoutFeeRequest is the request type for querying the timeout fee -message QueryTimeoutFeeRequest { - // PacketID - ibc.core.channel.v1.PacketId packet_id = 1; - // Caller should provide the intended relayer address in case the fee is dependent on specific relayer(s). - string relayer_address = 2; - // Height to query at - uint64 query_height = 3; -} - -// QueryTimeoutFeeResponse is the response type for the timeout RPC -message QueryTimeoutFeeResponse { - ibc.applications.fee.v1.Fee fee = 1; -} - // QueryIncentivizedPacketsRequest is the request type for querying for all incentivized packets message QueryIncentivizedPacketsRequest { // pagination defines an optional pagination for the request.