From ca54d9c2d090a24188573e2b7bce6f2f6235939f Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Thu, 17 Oct 2024 15:22:57 -0400 Subject: [PATCH 1/2] fix path for mhs query --- proto/neutron/dex/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/neutron/dex/query.proto b/proto/neutron/dex/query.proto index 0eafcd528..58ae794b4 100644 --- a/proto/neutron/dex/query.proto +++ b/proto/neutron/dex/query.proto @@ -155,7 +155,7 @@ service Query { // Simulates MsgMultiHopSwap rpc SimulateMultiHopSwap(QuerySimulateMultiHopSwapRequest) returns (QuerySimulateMultiHopSwapResponse) { - option (google.api.http).get = "/neutron/dex/pool_metadata"; + option (google.api.http).get = "/neutron/dex/simulate_multi_hop_swap"; } // this line is used by starport scaffolding # 2 From c0fe55b73873503329c9e6a78827e46c4a8dce73 Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Mon, 21 Oct 2024 11:55:19 -0400 Subject: [PATCH 2/2] update swagger --- docs/static/swagger.yaml | 240 +++++++++++++++++++++++++++++++-------- 1 file changed, 190 insertions(+), 50 deletions(-) diff --git a/docs/static/swagger.yaml b/docs/static/swagger.yaml index bad25f7fc..f104e227a 100644 --- a/docs/static/swagger.yaml +++ b/docs/static/swagger.yaml @@ -42609,31 +42609,62 @@ paths: - Query /neutron/dex/pool_metadata: get: - operationId: SimulateMultiHopSwap + operationId: PoolMetadataAll parameters: - - in: query - name: msg.creator + - description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + format: byte + in: query + name: pagination.key required: false type: string - - in: query - name: msg.receiver + - description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + format: uint64 + in: query + name: pagination.offset required: false type: string - - in: query - name: msg.amount_in + - description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + format: uint64 + in: query + name: pagination.limit required: false type: string - - in: query - name: msg.exit_limit_price + - description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + name: pagination.count_total required: false - type: string + type: boolean - description: >- - If pickBestRoute == true then all routes are run and the route with - the + reverse is set to true if results are to be returned in the + descending order. - best price is chosen otherwise, the first succesful route is used. + + Since: cosmos-sdk 0.43 in: query - name: msg.pick_best_route + name: pagination.reverse required: false type: boolean responses: @@ -42641,48 +42672,55 @@ paths: description: A successful response. schema: properties: - resp: - properties: - coin_out: - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the - custom method - - signatures required by gogoproto. - properties: - amount: - type: string - denom: - type: string - type: object - dust: - items: - description: >- - Coin defines a token with a denomination and an amount. + pagination: + description: >- + PageResponse is to be embedded in gRPC response messages where + the + corresponding request message has used PageRequest. - NOTE: The amount field is an Int which implements the - custom method + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + properties: + next_key: + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + format: byte + type: string + total: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - signatures required by gogoproto. + was set, its value is undefined otherwise + type: string + type: object + pool_metadata: + items: + properties: + fee: + format: uint64 + type: string + id: + format: uint64 + type: string + pair_id: properties: - amount: + token0: type: string - denom: + token1: type: string type: object - type: array - route: - properties: - hops: - items: - type: string - type: array - type: object - type: object + tick: + format: int64 + type: string + type: object + type: array type: object default: description: An unexpected error response. @@ -42706,7 +42744,7 @@ paths: message: type: string type: object - summary: Simulates MsgMultiHopSwap + summary: Queries a list of PoolMetadata items. tags: - Query /neutron/dex/pool_metadata/{id}: @@ -43229,6 +43267,108 @@ paths: summary: Simulates MsgDeposit tags: - Query + /neutron/dex/simulate_multi_hop_swap: + get: + operationId: SimulateMultiHopSwap + parameters: + - in: query + name: msg.creator + required: false + type: string + - in: query + name: msg.receiver + required: false + type: string + - in: query + name: msg.amount_in + required: false + type: string + - in: query + name: msg.exit_limit_price + required: false + type: string + - description: >- + If pickBestRoute == true then all routes are run and the route with + the + + best price is chosen otherwise, the first succesful route is used. + in: query + name: msg.pick_best_route + required: false + type: boolean + responses: + '200': + description: A successful response. + schema: + properties: + resp: + properties: + coin_out: + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + properties: + amount: + type: string + denom: + type: string + type: object + dust: + items: + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + properties: + amount: + type: string + denom: + type: string + type: object + type: array + route: + properties: + hops: + items: + type: string + type: array + type: object + type: object + type: object + default: + description: An unexpected error response. + schema: + properties: + code: + format: int32 + type: integer + details: + items: + properties: + type_url: + type: string + value: + format: byte + type: string + type: object + type: array + error: + type: string + message: + type: string + type: object + summary: Simulates MsgMultiHopSwap + tags: + - Query /neutron/dex/simulate_place_limit_order: get: operationId: SimulatePlaceLimitOrder