From bc86a7b0c97fd7bdf55ec666237ed7bef6e4a4f3 Mon Sep 17 00:00:00 2001 From: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com> Date: Tue, 21 Nov 2023 12:46:08 +0100 Subject: [PATCH] feat: add in-route-by-denom and out-route-by-denom queries (#262) --- docs/static/openapi.yml | 112 ++ proto/elys/amm/query.proto | 34 +- wasmbindings/types/types.go | 2 + x/amm/client/cli/query.go | 3 + x/amm/client/cli/query_in_route_by_denom.go | 48 + x/amm/client/cli/query_out_route_by_denom.go | 48 + x/amm/client/wasm/querier.go | 4 + x/amm/client/wasm/query_in_route_by_denom.go | 22 + x/amm/client/wasm/query_out_route_by_denom.go | 22 + x/amm/keeper/query_in_route_by_denom.go | 23 + x/amm/keeper/query_out_route_by_denom.go | 23 + x/amm/types/query.pb.go | 1151 +++++++++++++++-- x/amm/types/query.pb.gw.go | 246 ++++ 13 files changed, 1606 insertions(+), 132 deletions(-) create mode 100644 x/amm/client/cli/query_in_route_by_denom.go create mode 100644 x/amm/client/cli/query_out_route_by_denom.go create mode 100644 x/amm/client/wasm/query_in_route_by_denom.go create mode 100644 x/amm/client/wasm/query_out_route_by_denom.go create mode 100644 x/amm/keeper/query_in_route_by_denom.go create mode 100644 x/amm/keeper/query_out_route_by_denom.go diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index cd492925b..347b58e0c 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -37736,6 +37736,98 @@ paths: type: string tags: - Query + /elys-network/elys/amm/in_route_by_denom/{denom_in}/{denom_out}: + get: + summary: Queries a list of InRouteByDenom items. + operationId: ElysAmmInRouteByDenom + responses: + '200': + description: A successful response. + schema: + type: object + properties: + in_route_ids: + type: array + items: + type: object + properties: + pool_id: + type: string + format: uint64 + token_out_denom: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom_in + in: path + required: true + type: string + - name: denom_out + in: path + required: true + type: string + tags: + - Query + /elys-network/elys/amm/out_route_by_denom/{denomOut}/{denomIn}: + get: + summary: Queries a list of OutRouteByDenom items. + operationId: ElysAmmOutRouteByDenom + responses: + '200': + description: A successful response. + schema: + type: object + properties: + outRouteIds: + type: array + items: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denomOut + in: path + required: true + type: string + - name: denomIn + in: path + required: true + type: string + tags: + - Query /elys-network/elys/amm/params: get: summary: Parameters queries the parameters of the module. @@ -82752,6 +82844,26 @@ definitions: type: string rebalance_treasury: type: string + elys.amm.QueryInRouteByDenomResponse: + type: object + properties: + in_route_ids: + type: array + items: + type: object + properties: + pool_id: + type: string + format: uint64 + token_out_denom: + type: string + elys.amm.QueryOutRouteByDenomResponse: + type: object + properties: + outRouteIds: + type: array + items: + type: string elys.amm.QueryParamsResponse: type: object properties: diff --git a/proto/elys/amm/query.proto b/proto/elys/amm/query.proto index 8e45acf3c..a1cece600 100644 --- a/proto/elys/amm/query.proto +++ b/proto/elys/amm/query.proto @@ -67,6 +67,18 @@ service Query { option (google.api.http).get = "/elys-network/elys/amm/balance/{address}/{denom}"; } + + // Queries a list of InRouteByDenom items. + rpc InRouteByDenom (QueryInRouteByDenomRequest) returns (QueryInRouteByDenomResponse) { + option (google.api.http).get = "/elys-network/elys/amm/in_route_by_denom/{denom_in}/{denom_out}"; + + } + + // Queries a list of OutRouteByDenom items. + rpc OutRouteByDenom (QueryOutRouteByDenomRequest) returns (QueryOutRouteByDenomResponse) { + option (google.api.http).get = "/elys-network/elys/amm/out_route_by_denom/{denom_out}/{denom_in}"; + + } } // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} @@ -109,11 +121,11 @@ message QueryAllDenomLiquidityRequest { message QueryAllDenomLiquidityResponse { repeated DenomLiquidity denom_liquidity = 1 [(gogoproto.nullable) = false]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } message QuerySwapEstimationRequest { - repeated SwapAmountInRoute routes = 1; + repeated SwapAmountInRoute routes = 1; cosmos.base.v1beta1.Coin token_in = 2 [(gogoproto.nullable) = false]; } @@ -145,3 +157,21 @@ message QueryBalanceResponse { cosmos.base.v1beta1.Coin balance = 1 [(gogoproto.nullable) = false]; } +message QueryInRouteByDenomRequest { + string denom_in = 1; + string denom_out = 2; +} + +message QueryInRouteByDenomResponse { + repeated SwapAmountInRoute in_route = 1; +} + +message QueryOutRouteByDenomRequest { + string denom_out = 1; + string denom_in = 2; +} + +message QueryOutRouteByDenomResponse { + repeated SwapAmountOutRoute out_route = 1; +} + diff --git a/wasmbindings/types/types.go b/wasmbindings/types/types.go index a73134e50..7971b94ad 100644 --- a/wasmbindings/types/types.go +++ b/wasmbindings/types/types.go @@ -111,6 +111,8 @@ type ElysQuery struct { AmmSlippageTrack *ammtypes.QuerySlippageTrackRequest `json:"amm_slippage_track,omitempty"` AmmSlippageTrackAll *ammtypes.QuerySlippageTrackAllRequest `json:"amm_slippage_track_all,omitempty"` AmmBalance *ammtypes.QueryBalanceRequest `json:"amm_balance,omitempty"` + AmmInRouteByDenom *ammtypes.QueryInRouteByDenomRequest `json:"amm_in_route_by_denom,omitempty"` + AmmOutRouteByDenom *ammtypes.QueryOutRouteByDenomRequest `json:"amm_out_route_by_denom,omitempty"` // assetprofile queriers AssetProfileParams *assetprofiletypes.QueryParamsRequest `json:"asset_profile_params,omitempty"` diff --git a/x/amm/client/cli/query.go b/x/amm/client/cli/query.go index e14d67b9b..a111712d0 100644 --- a/x/amm/client/cli/query.go +++ b/x/amm/client/cli/query.go @@ -26,6 +26,9 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdShowDenomLiquidity()) cmd.AddCommand(CmdSwapEstimation()) cmd.AddCommand(CmdBalance()) + cmd.AddCommand(CmdInRouteByDenom()) + + cmd.AddCommand(CmdOutRouteByDenom()) // this line is used by starport scaffolding # 1 diff --git a/x/amm/client/cli/query_in_route_by_denom.go b/x/amm/client/cli/query_in_route_by_denom.go new file mode 100644 index 000000000..e481776bc --- /dev/null +++ b/x/amm/client/cli/query_in_route_by_denom.go @@ -0,0 +1,48 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/elys-network/elys/x/amm/types" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdInRouteByDenom() *cobra.Command { + cmd := &cobra.Command{ + Use: "in-route-by-denom [denom-in] [denom-out]", + Example: "elysd q amm in-route-by-denom uelys uusdc", + Short: "Query in-route-by-denom", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + reqDenomIn := args[0] + reqDenomOut := args[1] + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryInRouteByDenomRequest{ + DenomIn: reqDenomIn, + DenomOut: reqDenomOut, + } + + res, err := queryClient.InRouteByDenom(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/amm/client/cli/query_out_route_by_denom.go b/x/amm/client/cli/query_out_route_by_denom.go new file mode 100644 index 000000000..6f0871d6f --- /dev/null +++ b/x/amm/client/cli/query_out_route_by_denom.go @@ -0,0 +1,48 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/elys-network/elys/x/amm/types" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdOutRouteByDenom() *cobra.Command { + cmd := &cobra.Command{ + Use: "out-route-by-denom [denom-out] [denom-in]", + Example: "elysd q amm out-route-by-denom uusdc uelys", + Short: "Query out-route-by-denom", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + reqDenomOut := args[0] + reqDenomIn := args[1] + + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryOutRouteByDenomRequest{ + DenomOut: reqDenomOut, + DenomIn: reqDenomIn, + } + + res, err := queryClient.OutRouteByDenom(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/amm/client/wasm/querier.go b/x/amm/client/wasm/querier.go index 4cb9e4a3b..6deb0302a 100644 --- a/x/amm/client/wasm/querier.go +++ b/x/amm/client/wasm/querier.go @@ -43,6 +43,10 @@ func (oq *Querier) HandleQuery(ctx sdk.Context, query wasmbindingstypes.ElysQuer return oq.querySlippageTrackAll(ctx, query.AmmSlippageTrackAll) case query.AmmBalance != nil: return oq.queryBalance(ctx, query.AmmBalance) + case query.AmmInRouteByDenom != nil: + return oq.queryInRouteByDenom(ctx, query.AmmInRouteByDenom) + case query.AmmOutRouteByDenom != nil: + return oq.queryOutRouteByDenom(ctx, query.AmmOutRouteByDenom) default: // This handler cannot handle the query return nil, wasmbindingstypes.ErrCannotHandleQuery diff --git a/x/amm/client/wasm/query_in_route_by_denom.go b/x/amm/client/wasm/query_in_route_by_denom.go new file mode 100644 index 000000000..b88d5a584 --- /dev/null +++ b/x/amm/client/wasm/query_in_route_by_denom.go @@ -0,0 +1,22 @@ +package wasm + +import ( + "encoding/json" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + ammtypes "github.com/elys-network/elys/x/amm/types" +) + +func (oq *Querier) queryInRouteByDenom(ctx sdk.Context, query *ammtypes.QueryInRouteByDenomRequest) ([]byte, error) { + res, err := oq.keeper.InRouteByDenom(sdk.WrapSDKContext(ctx), query) + if err != nil { + return nil, errorsmod.Wrap(err, "failed to get in route by denom") + } + + responseBytes, err := json.Marshal(res) + if err != nil { + return nil, errorsmod.Wrap(err, "failed to serialize in route by denom response") + } + return responseBytes, nil +} diff --git a/x/amm/client/wasm/query_out_route_by_denom.go b/x/amm/client/wasm/query_out_route_by_denom.go new file mode 100644 index 000000000..36a8620b4 --- /dev/null +++ b/x/amm/client/wasm/query_out_route_by_denom.go @@ -0,0 +1,22 @@ +package wasm + +import ( + "encoding/json" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + ammtypes "github.com/elys-network/elys/x/amm/types" +) + +func (oq *Querier) queryOutRouteByDenom(ctx sdk.Context, query *ammtypes.QueryOutRouteByDenomRequest) ([]byte, error) { + res, err := oq.keeper.OutRouteByDenom(sdk.WrapSDKContext(ctx), query) + if err != nil { + return nil, errorsmod.Wrap(err, "failed to get out route by denom") + } + + responseBytes, err := json.Marshal(res) + if err != nil { + return nil, errorsmod.Wrap(err, "failed to serialize out route by denom response") + } + return responseBytes, nil +} diff --git a/x/amm/keeper/query_in_route_by_denom.go b/x/amm/keeper/query_in_route_by_denom.go new file mode 100644 index 000000000..13d013698 --- /dev/null +++ b/x/amm/keeper/query_in_route_by_denom.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/elys-network/elys/x/amm/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) InRouteByDenom(goCtx context.Context, req *types.QueryInRouteByDenomRequest) (*types.QueryInRouteByDenomResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Process the query + _ = ctx + + return &types.QueryInRouteByDenomResponse{}, nil +} diff --git a/x/amm/keeper/query_out_route_by_denom.go b/x/amm/keeper/query_out_route_by_denom.go new file mode 100644 index 000000000..e78779cfb --- /dev/null +++ b/x/amm/keeper/query_out_route_by_denom.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/elys-network/elys/x/amm/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) OutRouteByDenom(goCtx context.Context, req *types.QueryOutRouteByDenomRequest) (*types.QueryOutRouteByDenomResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + // TODO: Process the query + _ = ctx + + return &types.QueryOutRouteByDenomResponse{}, nil +} diff --git a/x/amm/types/query.pb.go b/x/amm/types/query.pb.go index 2257e9c4c..af4ea5d50 100644 --- a/x/amm/types/query.pb.go +++ b/x/amm/types/query.pb.go @@ -844,6 +844,198 @@ func (m *QueryBalanceResponse) GetBalance() types.Coin { return types.Coin{} } +type QueryInRouteByDenomRequest struct { + DenomIn string `protobuf:"bytes,1,opt,name=denom_in,json=denomIn,proto3" json:"denom_in,omitempty"` + DenomOut string `protobuf:"bytes,2,opt,name=denom_out,json=denomOut,proto3" json:"denom_out,omitempty"` +} + +func (m *QueryInRouteByDenomRequest) Reset() { *m = QueryInRouteByDenomRequest{} } +func (m *QueryInRouteByDenomRequest) String() string { return proto.CompactTextString(m) } +func (*QueryInRouteByDenomRequest) ProtoMessage() {} +func (*QueryInRouteByDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_763da04a7298bbac, []int{18} +} +func (m *QueryInRouteByDenomRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInRouteByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInRouteByDenomRequest.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 *QueryInRouteByDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInRouteByDenomRequest.Merge(m, src) +} +func (m *QueryInRouteByDenomRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryInRouteByDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInRouteByDenomRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInRouteByDenomRequest proto.InternalMessageInfo + +func (m *QueryInRouteByDenomRequest) GetDenomIn() string { + if m != nil { + return m.DenomIn + } + return "" +} + +func (m *QueryInRouteByDenomRequest) GetDenomOut() string { + if m != nil { + return m.DenomOut + } + return "" +} + +type QueryInRouteByDenomResponse struct { + InRoute []*SwapAmountInRoute `protobuf:"bytes,1,rep,name=in_route,json=inRoute,proto3" json:"in_route,omitempty"` +} + +func (m *QueryInRouteByDenomResponse) Reset() { *m = QueryInRouteByDenomResponse{} } +func (m *QueryInRouteByDenomResponse) String() string { return proto.CompactTextString(m) } +func (*QueryInRouteByDenomResponse) ProtoMessage() {} +func (*QueryInRouteByDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_763da04a7298bbac, []int{19} +} +func (m *QueryInRouteByDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInRouteByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInRouteByDenomResponse.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 *QueryInRouteByDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInRouteByDenomResponse.Merge(m, src) +} +func (m *QueryInRouteByDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryInRouteByDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInRouteByDenomResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInRouteByDenomResponse proto.InternalMessageInfo + +func (m *QueryInRouteByDenomResponse) GetInRoute() []*SwapAmountInRoute { + if m != nil { + return m.InRoute + } + return nil +} + +type QueryOutRouteByDenomRequest struct { + DenomOut string `protobuf:"bytes,1,opt,name=denom_out,json=denomOut,proto3" json:"denom_out,omitempty"` + DenomIn string `protobuf:"bytes,2,opt,name=denom_in,json=denomIn,proto3" json:"denom_in,omitempty"` +} + +func (m *QueryOutRouteByDenomRequest) Reset() { *m = QueryOutRouteByDenomRequest{} } +func (m *QueryOutRouteByDenomRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOutRouteByDenomRequest) ProtoMessage() {} +func (*QueryOutRouteByDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_763da04a7298bbac, []int{20} +} +func (m *QueryOutRouteByDenomRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOutRouteByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOutRouteByDenomRequest.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 *QueryOutRouteByDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOutRouteByDenomRequest.Merge(m, src) +} +func (m *QueryOutRouteByDenomRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOutRouteByDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOutRouteByDenomRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOutRouteByDenomRequest proto.InternalMessageInfo + +func (m *QueryOutRouteByDenomRequest) GetDenomOut() string { + if m != nil { + return m.DenomOut + } + return "" +} + +func (m *QueryOutRouteByDenomRequest) GetDenomIn() string { + if m != nil { + return m.DenomIn + } + return "" +} + +type QueryOutRouteByDenomResponse struct { + OutRoute []*SwapAmountOutRoute `protobuf:"bytes,1,rep,name=out_route,json=outRoute,proto3" json:"out_route,omitempty"` +} + +func (m *QueryOutRouteByDenomResponse) Reset() { *m = QueryOutRouteByDenomResponse{} } +func (m *QueryOutRouteByDenomResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOutRouteByDenomResponse) ProtoMessage() {} +func (*QueryOutRouteByDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_763da04a7298bbac, []int{21} +} +func (m *QueryOutRouteByDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOutRouteByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOutRouteByDenomResponse.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 *QueryOutRouteByDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOutRouteByDenomResponse.Merge(m, src) +} +func (m *QueryOutRouteByDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOutRouteByDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOutRouteByDenomResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOutRouteByDenomResponse proto.InternalMessageInfo + +func (m *QueryOutRouteByDenomResponse) GetOutRoute() []*SwapAmountOutRoute { + if m != nil { + return m.OutRoute + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "elys.amm.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "elys.amm.QueryParamsResponse") @@ -863,78 +1055,93 @@ func init() { proto.RegisterType((*QuerySlippageTrackAllResponse)(nil), "elys.amm.QuerySlippageTrackAllResponse") proto.RegisterType((*QueryBalanceRequest)(nil), "elys.amm.QueryBalanceRequest") proto.RegisterType((*QueryBalanceResponse)(nil), "elys.amm.QueryBalanceResponse") + proto.RegisterType((*QueryInRouteByDenomRequest)(nil), "elys.amm.QueryInRouteByDenomRequest") + proto.RegisterType((*QueryInRouteByDenomResponse)(nil), "elys.amm.QueryInRouteByDenomResponse") + proto.RegisterType((*QueryOutRouteByDenomRequest)(nil), "elys.amm.QueryOutRouteByDenomRequest") + proto.RegisterType((*QueryOutRouteByDenomResponse)(nil), "elys.amm.QueryOutRouteByDenomResponse") } func init() { proto.RegisterFile("elys/amm/query.proto", fileDescriptor_763da04a7298bbac) } var fileDescriptor_763da04a7298bbac = []byte{ - // 1047 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xa6, 0x89, 0xdd, 0x3c, 0x44, 0x28, 0x53, 0x23, 0x92, 0x4d, 0xb2, 0x81, 0x6d, 0x13, - 0x5b, 0x48, 0xd9, 0x6d, 0x52, 0x7e, 0x0b, 0x04, 0x36, 0x2d, 0x51, 0x24, 0x50, 0x53, 0xc3, 0x09, - 0x84, 0xcc, 0xd8, 0x1e, 0x99, 0x55, 0x76, 0x77, 0x36, 0x9e, 0x31, 0x21, 0x8a, 0x72, 0xe9, 0x8d, - 0x43, 0x25, 0xa4, 0x48, 0x5c, 0xf8, 0x0f, 0x38, 0xf2, 0x57, 0xf4, 0x58, 0xc1, 0x05, 0x71, 0xa8, - 0x50, 0xc2, 0x1f, 0x82, 0x76, 0xf6, 0xad, 0xed, 0xd9, 0xf5, 0xaf, 0x4a, 0x3d, 0x25, 0xfb, 0xe6, - 0xbd, 0xef, 0xfb, 0xde, 0x9b, 0x99, 0x6f, 0x0c, 0x25, 0xe6, 0x9f, 0x0a, 0x97, 0x06, 0x81, 0x7b, - 0xdc, 0x63, 0xdd, 0x53, 0x27, 0xea, 0x72, 0xc9, 0xc9, 0xf5, 0x38, 0xea, 0xd0, 0x20, 0x30, 0x4b, - 0x1d, 0xde, 0xe1, 0x2a, 0xe8, 0xc6, 0xff, 0x25, 0xeb, 0xe6, 0x7a, 0x87, 0xf3, 0x8e, 0xcf, 0x5c, - 0x1a, 0x79, 0x2e, 0x0d, 0x43, 0x2e, 0xa9, 0xf4, 0x78, 0x28, 0x70, 0xf5, 0xad, 0x16, 0x17, 0x01, - 0x17,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0x62, - 0x7e, 0xd8, 0x21, 0x1e, 0xa2, 0xc7, 0xf5, 0x61, 0x50, 0xdf, 0x07, 0x50, 0x6c, 0x26, 0x21, 0x9c, - 0xd0, 0xf4, 0xb3, 0x85, 0xf9, 0x7b, 0x7f, 0x2e, 0xc1, 0xa2, 0xc2, 0x24, 0x3e, 0x14, 0x92, 0xa7, - 0x82, 0xac, 0x0f, 0xda, 0xcb, 0xbf, 0x40, 0xe6, 0xc6, 0x98, 0xd5, 0x44, 0x8b, 0xbd, 0xf5, 0xe8, - 0xaf, 0xff, 0x2e, 0xe6, 0x37, 0xc9, 0x86, 0x1b, 0xa7, 0xed, 0x84, 0x4c, 0x9e, 0xf0, 0xee, 0x91, - 0x9b, 0x79, 0x8a, 0x89, 0x84, 0x85, 0x78, 0x68, 0x24, 0x8b, 0xa6, 0x3f, 0x48, 0xa6, 0x35, 0x6e, - 0x19, 0xd9, 0x76, 0x14, 0x5b, 0x99, 0x6c, 0x8d, 0x63, 0xe3, 0xdc, 0x77, 0xcf, 0xf0, 0xcc, 0x9d, - 0x93, 0x00, 0x8a, 0x71, 0x79, 0xd5, 0xcf, 0x13, 0xeb, 0xef, 0x52, 0x8e, 0x38, 0xf3, 0xac, 0xd8, - 0xb7, 0x14, 0xf1, 0x06, 0x59, 0x9b, 0x40, 0x4c, 0x7e, 0x33, 0x60, 0x59, 0xb7, 0x2e, 0x52, 0xce, - 0x37, 0x34, 0xd2, 0x81, 0xcd, 0xca, 0xf4, 0x44, 0x94, 0xf2, 0xae, 0x92, 0x72, 0x87, 0x38, 0x63, - 0xa4, 0x64, 0xdc, 0xd5, 0x3d, 0x53, 0x81, 0x73, 0xf2, 0xab, 0x01, 0xaf, 0xea, 0x90, 0xf1, 0x5c, - 0xca, 0xf9, 0xc6, 0x67, 0x13, 0x38, 0xd6, 0xe1, 0x6d, 0x47, 0x09, 0xac, 0x90, 0xed, 0xd9, 0x04, - 0x92, 0xc7, 0x06, 0x2c, 0xeb, 0x56, 0x47, 0x6e, 0x67, 0xc8, 0x46, 0x3a, 0xb3, 0xb9, 0x35, 0x25, - 0x6b, 0x46, 0x3d, 0xea, 0xa7, 0x18, 0x1b, 0x90, 0x5f, 0x18, 0xf0, 0xb2, 0x76, 0xbb, 0xc9, 0xad, - 0x2c, 0xd1, 0x08, 0xb3, 0x33, 0x6f, 0x4f, 0x4e, 0x42, 0x31, 0xef, 0x29, 0x31, 0xbb, 0xc4, 0x1d, - 0x27, 0x06, 0xab, 0x1a, 0xca, 0x4a, 0x86, 0xce, 0xf2, 0x85, 0x01, 0x37, 0xb2, 0x8e, 0x45, 0xb6, - 0x27, 0x71, 0x0e, 0x2c, 0xcf, 0x2c, 0x4f, 0xcd, 0x9b, 0x75, 0x56, 0x9a, 0x3c, 0x41, 0x1e, 0x19, - 0x50, 0x44, 0x7b, 0xca, 0x5d, 0x31, 0xdd, 0xfd, 0x72, 0x57, 0x2c, 0xe3, 0x6a, 0xf6, 0xfb, 0x8a, - 0x7a, 0x8f, 0xdc, 0x19, 0x43, 0x8d, 0x16, 0xe6, 0x9e, 0xa1, 0x69, 0x9e, 0xa7, 0x27, 0xbb, 0x56, - 0x7b, 0x72, 0x69, 0x19, 0x4f, 0x2f, 0x2d, 0xe3, 0xdf, 0x4b, 0xcb, 0xf8, 0xe5, 0xca, 0x9a, 0x7b, - 0x7a, 0x65, 0xcd, 0xfd, 0x7d, 0x65, 0xcd, 0x7d, 0x53, 0x19, 0x7a, 0x0e, 0xf3, 0xa8, 0x3f, 0x29, - 0x5c, 0xf5, 0x28, 0x36, 0x0b, 0xea, 0x57, 0xf8, 0xdd, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x59, - 0xa7, 0x3d, 0x1a, 0xc5, 0x0c, 0x00, 0x00, + // 1221 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 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2, 0x32, 0xbe, 0x33, 0x84, 0x4c, 0xcd, 0x8e, 0x5a, 0xbd, 0x5b, + 0x13, 0x48, 0x40, 0x56, 0xf3, 0x23, 0x05, 0xc9, 0x47, 0xc0, 0x29, 0x7e, 0x62, 0xa0, 0x2b, 0xa9, + 0x4b, 0x1d, 0xa7, 0x19, 0xf2, 0x67, 0x89, 0xb9, 0x3e, 0xce, 0x0c, 0x58, 0x3f, 0x15, 0xac, 0x15, + 0x7c, 0x77, 0x08, 0x6b, 0x6f, 0x70, 0x64, 0x60, 0x39, 0xe1, 0x00, 0x78, 0xa5, 0xf2, 0xf4, 0xdc, + 0x32, 0x9e, 0x9d, 0x5b, 0xc6, 0x3f, 0xe7, 0x96, 0xf1, 0xf3, 0x85, 0x35, 0xf5, 0xec, 0xc2, 0x9a, + 0xfa, 0xeb, 0xc2, 0x9a, 0xfa, 0x7a, 0x73, 0xe0, 0x1b, 0x2e, 0xab, 0xf2, 0xa3, 0xd0, 0x11, 0x5f, + 0x72, 0xf5, 0x82, 0xf8, 0xd7, 0xf1, 0xd6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x64, 0x0a, + 0xff, 0x7a, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -965,6 +1172,10 @@ type QueryClient interface { SlippageTrackAll(ctx context.Context, in *QuerySlippageTrackAllRequest, opts ...grpc.CallOption) (*QuerySlippageTrackAllResponse, error) // Queries a list of Balance items. Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) + // Queries a list of InRouteByDenom items. + InRouteByDenom(ctx context.Context, in *QueryInRouteByDenomRequest, opts ...grpc.CallOption) (*QueryInRouteByDenomResponse, error) + // Queries a list of OutRouteByDenom items. + OutRouteByDenom(ctx context.Context, in *QueryOutRouteByDenomRequest, opts ...grpc.CallOption) (*QueryOutRouteByDenomResponse, error) } type queryClient struct { @@ -1056,6 +1267,24 @@ func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts return out, nil } +func (c *queryClient) InRouteByDenom(ctx context.Context, in *QueryInRouteByDenomRequest, opts ...grpc.CallOption) (*QueryInRouteByDenomResponse, error) { + out := new(QueryInRouteByDenomResponse) + err := c.cc.Invoke(ctx, "/elys.amm.Query/InRouteByDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) OutRouteByDenom(ctx context.Context, in *QueryOutRouteByDenomRequest, opts ...grpc.CallOption) (*QueryOutRouteByDenomResponse, error) { + out := new(QueryOutRouteByDenomResponse) + err := c.cc.Invoke(ctx, "/elys.amm.Query/OutRouteByDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1074,6 +1303,10 @@ type QueryServer interface { SlippageTrackAll(context.Context, *QuerySlippageTrackAllRequest) (*QuerySlippageTrackAllResponse, error) // Queries a list of Balance items. Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) + // Queries a list of InRouteByDenom items. + InRouteByDenom(context.Context, *QueryInRouteByDenomRequest) (*QueryInRouteByDenomResponse, error) + // Queries a list of OutRouteByDenom items. + OutRouteByDenom(context.Context, *QueryOutRouteByDenomRequest) (*QueryOutRouteByDenomResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1107,6 +1340,12 @@ func (*UnimplementedQueryServer) SlippageTrackAll(ctx context.Context, req *Quer func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") } +func (*UnimplementedQueryServer) InRouteByDenom(ctx context.Context, req *QueryInRouteByDenomRequest) (*QueryInRouteByDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InRouteByDenom not implemented") +} +func (*UnimplementedQueryServer) OutRouteByDenom(ctx context.Context, req *QueryOutRouteByDenomRequest) (*QueryOutRouteByDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OutRouteByDenom not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1274,6 +1513,42 @@ func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_InRouteByDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryInRouteByDenomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).InRouteByDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/elys.amm.Query/InRouteByDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).InRouteByDenom(ctx, req.(*QueryInRouteByDenomRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_OutRouteByDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOutRouteByDenomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).OutRouteByDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/elys.amm.Query/OutRouteByDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).OutRouteByDenom(ctx, req.(*QueryOutRouteByDenomRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.amm.Query", HandlerType: (*QueryServer)(nil), @@ -1314,6 +1589,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Balance", Handler: _Query_Balance_Handler, }, + { + MethodName: "InRouteByDenom", + Handler: _Query_InRouteByDenom_Handler, + }, + { + MethodName: "OutRouteByDenom", + Handler: _Query_OutRouteByDenom_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "elys/amm/query.proto", @@ -1948,88 +2231,236 @@ func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryInRouteByDenomRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryInRouteByDenomRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPoolRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryInRouteByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.PoolId != 0 { - n += 1 + sovQuery(uint64(m.PoolId)) + if len(m.DenomOut) > 0 { + i -= len(m.DenomOut) + copy(dAtA[i:], m.DenomOut) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomOut))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.DenomIn) > 0 { + i -= len(m.DenomIn) + copy(dAtA[i:], m.DenomIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomIn))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryGetPoolResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryInRouteByDenomResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.Pool.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryAllPoolRequest) 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)) - } - return n +func (m *QueryInRouteByDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllPoolResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryInRouteByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Pool) > 0 { - for _, e := range m.Pool { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.InRoute) > 0 { + for iNdEx := len(m.InRoute) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InRoute[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *QueryOutRouteByDenomRequest) 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 *QueryOutRouteByDenomRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOutRouteByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DenomIn) > 0 { + i -= len(m.DenomIn) + copy(dAtA[i:], m.DenomIn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomIn))) + i-- + dAtA[i] = 0x12 + } + if len(m.DenomOut) > 0 { + i -= len(m.DenomOut) + copy(dAtA[i:], m.DenomOut) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DenomOut))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryOutRouteByDenomResponse) 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 *QueryOutRouteByDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOutRouteByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OutRoute) > 0 { + for iNdEx := len(m.OutRoute) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutRoute[iNdEx].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 encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetPoolRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + return n +} + +func (m *QueryGetPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Pool.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllPoolRequest) 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)) + } + return n +} + +func (m *QueryAllPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pool) > 0 { + for _, e := range m.Pool { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) } return n } @@ -2195,6 +2626,70 @@ func (m *QueryBalanceResponse) Size() (n int) { return n } +func (m *QueryInRouteByDenomRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DenomIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.DenomOut) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryInRouteByDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.InRoute) > 0 { + for _, e := range m.InRoute { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryOutRouteByDenomRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DenomOut) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.DenomIn) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryOutRouteByDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OutRoute) > 0 { + for _, e := range m.OutRoute { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3780,6 +4275,402 @@ func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryInRouteByDenomRequest) 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: QueryInRouteByDenomRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInRouteByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomIn", 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.DenomIn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomOut", 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.DenomOut = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryInRouteByDenomResponse) 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: QueryInRouteByDenomResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInRouteByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InRoute", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InRoute = append(m.InRoute, &SwapAmountInRoute{}) + if err := m.InRoute[len(m.InRoute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOutRouteByDenomRequest) 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: QueryOutRouteByDenomRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOutRouteByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomOut", 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.DenomOut = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomIn", 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.DenomIn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryOutRouteByDenomResponse) 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: QueryOutRouteByDenomResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOutRouteByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutRoute", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OutRoute = append(m.OutRoute, &SwapAmountOutRoute{}) + if err := m.OutRoute[len(m.OutRoute)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/amm/types/query.pb.gw.go b/x/amm/types/query.pb.gw.go index dd6cbaf66..5bdd5d3f4 100644 --- a/x/amm/types/query.pb.gw.go +++ b/x/amm/types/query.pb.gw.go @@ -415,6 +415,158 @@ func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marsha } +func request_Query_InRouteByDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInRouteByDenomRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom_in"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_in") + } + + protoReq.DenomIn, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_in", err) + } + + val, ok = pathParams["denom_out"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_out") + } + + protoReq.DenomOut, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_out", err) + } + + msg, err := client.InRouteByDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_InRouteByDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInRouteByDenomRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom_in"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_in") + } + + protoReq.DenomIn, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_in", err) + } + + val, ok = pathParams["denom_out"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_out") + } + + protoReq.DenomOut, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_out", err) + } + + msg, err := server.InRouteByDenom(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_OutRouteByDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOutRouteByDenomRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom_out"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_out") + } + + protoReq.DenomOut, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_out", err) + } + + val, ok = pathParams["denom_in"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_in") + } + + protoReq.DenomIn, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_in", err) + } + + msg, err := client.OutRouteByDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_OutRouteByDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOutRouteByDenomRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom_out"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_out") + } + + protoReq.DenomOut, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_out", err) + } + + val, ok = pathParams["denom_in"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom_in") + } + + protoReq.DenomIn, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom_in", err) + } + + msg, err := server.OutRouteByDenom(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -628,6 +780,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_InRouteByDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_InRouteByDenom_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_InRouteByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OutRouteByDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_OutRouteByDenom_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_OutRouteByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -849,6 +1047,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_InRouteByDenom_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_InRouteByDenom_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_InRouteByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OutRouteByDenom_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_OutRouteByDenom_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_OutRouteByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -870,6 +1108,10 @@ var ( pattern_Query_SlippageTrackAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "amm", "slippage_tracks"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"elys-network", "elys", "amm", "balance", "address", "denom"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_InRouteByDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"elys-network", "elys", "amm", "in_route_by_denom", "denom_in", "denom_out"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_OutRouteByDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"elys-network", "elys", "amm", "out_route_by_denom", "denom_out", "denom_in"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -890,4 +1132,8 @@ var ( forward_Query_SlippageTrackAll_0 = runtime.ForwardResponseMessage forward_Query_Balance_0 = runtime.ForwardResponseMessage + + forward_Query_InRouteByDenom_0 = runtime.ForwardResponseMessage + + forward_Query_OutRouteByDenom_0 = runtime.ForwardResponseMessage )