diff --git a/CHANGELOG.md b/CHANGELOG.md index 86218264bd..3f7d6bc0d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/fbridge) [\#1366](https://github.com/Finschia/finschia-sdk/pull/1366) Set target denom as module parameters * (x/fbridge) [\#1369](https://github.com/Finschia/finschia-sdk/pull/1369) Add the event of `SetBridgeStatus` * (x/fswap) [\#1372](https://github.com/Finschia/finschia-sdk/pull/1372) support message based proposals +* (x/fswap) [\#1387](https://github.com/Finschia/finschia-sdk/pull/1387) add new Swap query to get a single swap ### Bug Fixes * (x/auth) [#1281](https://github.com/Finschia/finschia-sdk/pull/1281) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking. (backport #1274) diff --git a/client/docs/config.json b/client/docs/config.json index 97cd452052..ee02885ceb 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -205,6 +205,9 @@ "Vote": "FBridgeVote" } } + }, + { + "url": "./tmp-swagger-gen/lbm/fswap/v1/query.swagger.json" } ] } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 1a91dd4742..5f165ad1a0 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1,7 +1,7 @@ swagger: '2.0' info: title: LBM SDK - gRPC Gateway docs - description: 'A REST interface for state queries, legacy transactions' + description: A REST interface for state queries, legacy transactions version: 1.0.0 paths: /cosmos/auth/v1beta1/accounts: @@ -218,7 +218,7 @@ paths: Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -453,7 +453,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -464,10 +463,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/auth/v1beta1/accounts/{address}': + /cosmos/auth/v1beta1/accounts/{address}: get: summary: Account returns account details based on address. operationId: Account @@ -652,7 +650,7 @@ paths: QueryAccountResponse is the response type for the Query/Account RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -848,7 +846,7 @@ paths: type: string tags: - Query - '/cosmos/auth/v1beta1/module_accounts/{name}': + /cosmos/auth/v1beta1/module_accounts/{name}: get: summary: ModuleAccountByName returns the module account info by module name operationId: ModuleAccountByName @@ -1033,7 +1031,7 @@ paths: QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -1251,7 +1249,7 @@ paths: QueryNextAccountNumberResponse is the response for the Query/NextAccountNumber. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -1474,7 +1472,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -1664,7 +1662,7 @@ paths: } tags: - Query - '/cosmos/bank/v1beta1/balances/{address}': + /cosmos/bank/v1beta1/balances/{address}: get: summary: AllBalances queries the balance of all coins for a single account. operationId: AllBalances @@ -1716,7 +1714,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -1789,7 +1787,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -1800,10 +1797,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/bank/v1beta1/balances/{address}/by_denom': + /cosmos/bank/v1beta1/balances/{address}/by_denom: get: summary: Balance queries the balance of a single coin for a single account. operationId: Balance @@ -1832,7 +1828,7 @@ paths: QueryBalanceResponse is the response type for the Query/Balance RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -1978,7 +1974,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -2046,7 +2042,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -2057,10 +2052,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/bank/v1beta1/denoms_metadata/{denom}': + /cosmos/bank/v1beta1/denoms_metadata/{denom}: get: summary: DenomsMetadata queries the client metadata of a given coin denomination. operationId: DenomMetadata @@ -2147,7 +2141,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -2198,7 +2192,6 @@ paths: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -2206,13 +2199,12 @@ paths: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank parameters. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -2235,7 +2227,7 @@ paths: format: byte tags: - Query - '/cosmos/bank/v1beta1/spendable_balances/{address}': + /cosmos/bank/v1beta1/spendable_balances/{address}: get: summary: |- SpendableBalances queries the spenable balance of all coins for a single @@ -2289,7 +2281,7 @@ paths: an account's spendable balances. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -2362,7 +2354,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -2373,7 +2364,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/bank/v1beta1/supply: @@ -2431,7 +2421,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -2499,7 +2489,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -2510,10 +2499,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/bank/v1beta1/supply/{denom}': + /cosmos/bank/v1beta1/supply/{denom}: get: summary: SupplyOf queries the supply of a single coin. operationId: SupplyOf @@ -2542,7 +2530,7 @@ paths: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -7326,7 +7314,7 @@ paths: GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -7516,7 +7504,7 @@ paths: } tags: - Service - '/cosmos/base/tendermint/v1beta1/blocks/{height}': + /cosmos/base/tendermint/v1beta1/blocks/{height}: get: summary: GetBlockByHeight queries block for given height. operationId: GetBlockByHeight @@ -8084,7 +8072,7 @@ paths: GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8363,7 +8351,7 @@ paths: GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8565,12 +8553,11 @@ paths: properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8986,7 +8973,7 @@ paths: GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9221,7 +9208,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -9232,10 +9218,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Service - '/cosmos/base/tendermint/v1beta1/validatorsets/{height}': + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: get: summary: GetValidatorSetByHeight queries validator-set at a given height. operationId: GetValidatorSetByHeight @@ -9461,7 +9446,7 @@ paths: GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9701,7 +9686,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -9712,7 +9696,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Service /cosmos/distribution/v1beta1/community_pool: @@ -9750,7 +9733,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9773,7 +9756,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: get: summary: |- DelegationTotalRewards queries the total rewards accrued by a each @@ -9837,7 +9820,7 @@ paths: QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9866,7 +9849,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}: get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: DelegationRewards @@ -9899,7 +9882,7 @@ paths: QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9933,7 +9916,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators: get: summary: DelegatorValidators queries the validators of a delegator. operationId: DelegatorValidators @@ -9954,7 +9937,7 @@ paths: QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9983,7 +9966,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address: get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: DelegatorWithdrawAddress @@ -10000,7 +9983,7 @@ paths: QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10051,12 +10034,11 @@ paths: type: string withdraw_addr_enabled: type: boolean - format: boolean description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10079,7 +10061,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': + /cosmos/distribution/v1beta1/validators/{validator_address}/commission: get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: ValidatorCommission @@ -10115,7 +10097,7 @@ paths: QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10144,7 +10126,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': + /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards: get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: ValidatorOutstandingRewards @@ -10187,7 +10169,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10216,7 +10198,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': + /cosmos/distribution/v1beta1/validators/{validator_address}/slashes: get: summary: ValidatorSlashes queries slash events of a validator. operationId: ValidatorSlashes @@ -10269,7 +10251,7 @@ paths: QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10358,7 +10340,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -10369,7 +10350,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/evidence/v1beta1/evidence: @@ -10584,7 +10564,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10819,7 +10799,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -10830,10 +10809,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': + /cosmos/evidence/v1beta1/evidence/{evidence_hash}: get: summary: Evidence queries evidence based on evidence hash. operationId: Evidence @@ -11018,7 +10996,7 @@ paths: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11215,7 +11193,7 @@ paths: format: byte tags: - Query - '/cosmos/gov/v1beta1/params/{params_type}': + /cosmos/gov/v1beta1/params/{params_type}: get: summary: Params queries all parameters of the gov module. operationId: GovParams @@ -11288,7 +11266,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11779,7 +11757,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12050,7 +12028,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -12061,10 +12038,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}': + /cosmos/gov/v1beta1/proposals/{proposal_id}: get: summary: Proposal queries proposal details based on ProposalID. operationId: Proposal @@ -12330,7 +12306,7 @@ paths: QueryProposalResponse is the response type for the Query/Proposal RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12527,7 +12503,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits: get: summary: Deposits queries all deposits of a single proposal. operationId: Deposits @@ -12592,7 +12568,7 @@ paths: QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12833,7 +12809,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -12844,10 +12819,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- Deposit queries single deposit information based proposalID, @@ -12893,7 +12867,7 @@ paths: QueryDepositResponse is the response type for the Query/Deposit RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13095,7 +13069,7 @@ paths: type: string tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': + /cosmos/gov/v1beta1/proposals/{proposal_id}/tally: get: summary: TallyResult queries the tally of a proposal vote. operationId: TallyResult @@ -13123,7 +13097,7 @@ paths: QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13320,7 +13294,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes: get: summary: Votes queries votes of a given proposal. operationId: Votes @@ -13418,7 +13392,7 @@ paths: QueryVotesResponse is the response type for the Query/Votes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13659,7 +13633,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -13670,12 +13643,11 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: get: - summary: 'Vote queries voted information based on proposalID, voterAddr.' + summary: Vote queries voted information based on proposalID, voterAddr. operationId: Vote responses: '200': @@ -13750,7 +13722,7 @@ paths: QueryVoteResponse is the response type for the Query/Vote RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13972,7 +13944,7 @@ paths: QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14015,7 +13987,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14075,7 +14047,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14124,7 +14096,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14192,7 +14164,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14258,7 +14230,6 @@ paths: liveness downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -14312,7 +14283,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14380,7 +14351,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -14391,10 +14361,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': + /cosmos/slashing/v1beta1/signing_infos/{cons_address}: get: summary: SigningInfo queries the signing info of given cons address operationId: SigningInfo @@ -14435,7 +14404,6 @@ paths: liveness downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -14464,7 +14432,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14493,7 +14461,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/delegations/{delegator_addr}': + /cosmos/staking/v1beta1/delegations/{delegator_addr}: get: summary: >- DelegatorDelegations queries all delegations of a given delegator @@ -14580,7 +14548,7 @@ paths: QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14820,7 +14788,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -14831,10 +14798,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: get: summary: Redelegations queries redelegations of given address. operationId: Redelegations @@ -14981,7 +14947,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15231,7 +15197,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -15242,10 +15207,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a @@ -15334,7 +15298,7 @@ paths: Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15574,7 +15538,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -15585,10 +15548,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: get: summary: |- DelegatorValidators queries all validators info for given delegator @@ -15789,7 +15751,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -15936,7 +15897,7 @@ paths: QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16176,7 +16137,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -16187,10 +16147,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: get: summary: |- DelegatorValidator queries validator info for given delegator validator @@ -16387,7 +16346,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -16514,7 +16472,7 @@ paths: QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16715,7 +16673,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/historical_info/{height}': + /cosmos/staking/v1beta1/historical_info/{height}: get: summary: HistoricalInfo queries the historical info for given height. operationId: HistoricalInfo @@ -16996,7 +16954,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -17127,7 +17084,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17364,7 +17321,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17574,7 +17531,7 @@ paths: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17963,7 +17920,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -18110,7 +18066,7 @@ paths: QueryValidatorsResponse is response type for the Query/Validators RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18350,7 +18306,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -18361,10 +18316,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}': + /cosmos/staking/v1beta1/validators/{validator_addr}: get: summary: Validator queries validator info for given validator address. operationId: Validator @@ -18559,7 +18513,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -18686,7 +18639,7 @@ paths: QueryValidatorResponse is response type for the Query/Validator RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18882,7 +18835,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: get: summary: ValidatorDelegations queries delegate info for given validator. operationId: ValidatorDelegations @@ -18964,7 +18917,7 @@ paths: QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19204,7 +19157,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -19215,10 +19167,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: get: summary: Delegation queries delegate info for given validator delegator pair. operationId: Delegation @@ -19280,7 +19231,7 @@ paths: QueryDelegationResponse is response type for the Query/Delegation RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19481,7 +19432,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator @@ -19546,7 +19497,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19747,7 +19698,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a @@ -19834,7 +19785,7 @@ paths: Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20074,7 +20025,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -20085,7 +20035,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/tx/v1beta1/simulate: @@ -20150,7 +20099,6 @@ paths: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -20171,7 +20119,7 @@ paths: SimulateResponse is the response type for the Service.SimulateRPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20377,7 +20325,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20620,7 +20568,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -20631,7 +20578,6 @@ paths: in: query required: false type: boolean - format: boolean - name: order_by description: |2- - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. @@ -20675,7 +20621,7 @@ paths: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: >- @@ -20947,7 +20893,6 @@ paths: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -20983,7 +20928,7 @@ paths: BroadcastTxResponse is the response type for the Service.BroadcastTx method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21207,7 +21152,7 @@ paths: RPC method. tags: - Service - '/cosmos/tx/v1beta1/txs/block/{height}': + /cosmos/tx/v1beta1/txs/block/{height}: get: summary: GetBlockWithTxs fetches a block with decoded txs. description: >- @@ -21230,7 +21175,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21471,7 +21416,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -21482,10 +21426,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Service - '/cosmos/tx/v1beta1/txs/{hash}': + /cosmos/tx/v1beta1/txs/{hash}: get: summary: GetTx fetches a tx by hash. operationId: GetTx @@ -21495,7 +21438,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21685,13 +21628,13 @@ paths: } parameters: - name: hash - description: 'hash is the tx hash to query, encoded as a hex string.' + description: hash is the tx hash to query, encoded as a hex string. in: path required: true type: string tags: - Service - '/cosmos/upgrade/v1beta1/applied_plan/{name}': + /cosmos/upgrade/v1beta1/applied_plan/{name}: get: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: AppliedPlan @@ -21711,7 +21654,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22148,7 +22091,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22377,7 +22320,7 @@ paths: Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22576,7 +22519,7 @@ paths: type: string tags: - Query - '/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}': + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: get: summary: >- UpgradedConsensusState queries the consensus state that will serve @@ -22607,7 +22550,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22808,7 +22751,7 @@ paths: - Query /cosmos/authz/v1beta1/grants: get: - summary: 'Returns list of `Authorization`, granted to the grantee by the granter.' + summary: Returns list of `Authorization`, granted to the grantee by the granter. operationId: Grants responses: '200': @@ -23029,7 +22972,7 @@ paths: QueryGrantsResponse is the response type for the Query/Authorizations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23279,7 +23222,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -23290,10 +23232,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/authz/v1beta1/grants/grantee/{grantee}': + /cosmos/authz/v1beta1/grants/grantee/{grantee}: get: summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. description: 'Since: cosmos-sdk 0.45.2' @@ -23522,7 +23463,7 @@ paths: QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23761,7 +23702,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -23772,12 +23712,11 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/authz/v1beta1/grants/granter/{granter}': + /cosmos/authz/v1beta1/grants/granter/{granter}: get: - summary: 'GranterGrants returns list of `GrantAuthorization`, granted by granter.' + summary: GranterGrants returns list of `GrantAuthorization`, granted by granter. description: 'Since: cosmos-sdk 0.45.2' operationId: GranterGrants responses: @@ -24004,7 +23943,7 @@ paths: QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24243,7 +24182,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -24254,7 +24192,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /lbm/foundation/v1/censorships: @@ -24308,7 +24245,7 @@ paths: QueryCensorshipsResponse is the response type for the Query/Censorships RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24543,7 +24480,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -24554,7 +24490,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /lbm/foundation/v1/foundation_info: @@ -24767,7 +24702,7 @@ paths: QueryFoundationInfoResponse is the Query/FoundationInfo response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25010,7 +24945,7 @@ paths: was set, its value is undefined otherwise description: QueryMembersResponse is the Query/MembersResponse response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25245,7 +25180,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -25256,10 +25190,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/foundation/v1/foundation_members/{address}': + /lbm/foundation/v1/foundation_members/{address}: get: summary: Member queries a member of the foundation operationId: Member @@ -25291,7 +25224,7 @@ paths: and metadata. description: QueryMemberResponse is the Query/MemberResponse response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25486,9 +25419,9 @@ paths: type: string tags: - Query - '/lbm/foundation/v1/grants/{grantee}/{msg_type_url}': + /lbm/foundation/v1/grants/{grantee}/{msg_type_url}: get: - summary: 'Returns list of authorizations, granted to the grantee.' + summary: Returns list of authorizations, granted to the grantee. operationId: FoundationGrants responses: '200': @@ -25696,7 +25629,7 @@ paths: QueryGrantsResponse is the response type for the Query/Grants RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25942,7 +25875,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -25953,7 +25885,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /lbm/foundation/v1/params: @@ -25976,7 +25907,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26491,7 +26422,7 @@ paths: was set, its value is undefined otherwise description: QueryProposalsResponse is the Query/Proposals response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26726,7 +26657,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -26737,10 +26667,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}': + /lbm/foundation/v1/proposals/{proposal_id}: get: summary: Proposal queries a proposal based on proposal id. operationId: FoundationProposal @@ -27043,7 +26972,7 @@ paths: proposal. description: QueryProposalResponse is the Query/Proposal response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27240,7 +27169,7 @@ paths: format: uint64 tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}/tally': + /lbm/foundation/v1/proposals/{proposal_id}/tally: get: summary: TallyResult queries the tally of a proposal votes. operationId: FoundationTallyResult @@ -27268,7 +27197,7 @@ paths: description: no_with_veto_count is the sum of veto. description: QueryTallyResultResponse is the Query/TallyResult response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27465,7 +27394,7 @@ paths: format: uint64 tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}/votes': + /lbm/foundation/v1/proposals/{proposal_id}/votes: get: summary: Votes queries a vote by proposal. operationId: FoundationVotes @@ -27530,7 +27459,7 @@ paths: was set, its value is undefined otherwise description: QueryVotesResponse is the Query/Votes response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27771,7 +27700,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -27782,10 +27710,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}/votes/{voter}': + /lbm/foundation/v1/proposals/{proposal_id}/votes/{voter}: get: summary: Vote queries a vote by proposal id and voter. operationId: FoundationVote @@ -27827,7 +27754,7 @@ paths: description: Vote represents a vote for a proposal. description: QueryVoteResponse is the Query/Vote response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28061,7 +27988,7 @@ paths: QueryTreasuryResponse is the response type for the Query/Treasury RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28251,7 +28178,7 @@ paths: } tags: - Query - '/lbm/token/v1/token_classes/{contract_id}': + /lbm/token/v1/token_classes/{contract_id}: get: summary: Contract queries an token metadata based on its contract id. operationId: TokenContract @@ -28291,7 +28218,6 @@ paths: the amount by to get its user representation. mintable: type: boolean - format: boolean description: >- mintable represents whether the token is allowed to mint or burn. @@ -28300,7 +28226,7 @@ paths: QueryContractResponse is the response type for the Query/Contract RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28329,7 +28255,7 @@ paths: type: string tags: - Query - '/lbm/token/v1/token_classes/{contract_id}/balances/{address}': + /lbm/token/v1/token_classes/{contract_id}/balances/{address}: get: summary: >- Balance queries the number of tokens of a given contract owned by the @@ -28348,7 +28274,7 @@ paths: QueryBalanceResponse is the response type for the Query/Balance RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28382,7 +28308,7 @@ paths: type: string tags: - Query - '/lbm/token/v1/token_classes/{contract_id}/burnt': + /lbm/token/v1/token_classes/{contract_id}/burnt: get: summary: Burnt queries the number of burnt tokens from the given contract id. operationId: TokenBurnt @@ -28399,7 +28325,7 @@ paths: QueryBurntResponse is the response type for the Query/Burnt RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28428,7 +28354,7 @@ paths: type: string tags: - Query - '/lbm/token/v1/token_classes/{contract_id}/grants/{grantee}': + /lbm/token/v1/token_classes/{contract_id}/grants/{grantee}: get: summary: GranteeGrants queries permissions on a given grantee. operationId: TokenGranteeGrants @@ -28479,7 +28405,7 @@ paths: QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28557,7 +28483,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -28568,10 +28493,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/token/v1/token_classes/{contract_id}/minted': + /lbm/token/v1/token_classes/{contract_id}/minted: get: summary: Minted queries the number of minted tokens from the given contract id. operationId: TokenMinted @@ -28588,7 +28512,7 @@ paths: QueryMintedResponse is the response type for the Query/Minted RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28617,7 +28541,7 @@ paths: type: string tags: - Query - '/lbm/token/v1/token_classes/{contract_id}/supply': + /lbm/token/v1/token_classes/{contract_id}/supply: get: summary: Supply queries the number of tokens from the given contract id. operationId: TokenSupply @@ -28634,7 +28558,7 @@ paths: QuerySupplyResponse is the response type for the Query/Supply RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28663,7 +28587,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}': + /lbm/collection/v1/contracts/{contract_id}: get: summary: Contract queries a contract metadata based on its contract id. operationId: CollectionContract @@ -28693,7 +28617,7 @@ paths: QueryContractResponse is the response type for the Query/Contract RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28889,7 +28813,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/balances/{address}': + /lbm/collection/v1/contracts/{contract_id}/balances/{address}: get: summary: >- AllBalances queries the balance of all token classes for a single @@ -28936,7 +28860,7 @@ paths: QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29181,7 +29105,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -29192,10 +29115,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/balances/{address}/{token_id}': + /lbm/collection/v1/contracts/{contract_id}/balances/{address}/{token_id}: get: summary: >- Balance queries the balance of a single token class for a single @@ -29221,7 +29143,7 @@ paths: QueryBalanceResponse is the response type for the Query/Balance RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29427,7 +29349,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/burnt': + /lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/burnt: get: summary: >- FTBurnt queries the number of burnt tokens from a given contract id and @@ -29446,7 +29368,7 @@ paths: QueryFTBurntResponse is the response type for the Query/FTBurnt RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29647,7 +29569,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/minted': + /lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/minted: get: summary: >- FTMinted queries the number of minted tokens from a given contract id @@ -29666,7 +29588,7 @@ paths: QueryFTMintedResponse is the response type for the Query/FTMinted RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29867,7 +29789,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/supply': + /lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/supply: get: summary: >- FTSupply queries the number of tokens from a given contract id and token @@ -29886,7 +29808,7 @@ paths: QueryFTSupplyResponse is the response type for the Query/FTSupply RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30087,7 +30009,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/grants/{grantee}': + /lbm/collection/v1/contracts/{contract_id}/grants/{grantee}: get: summary: GranteeGrants queries all permissions on a given grantee. operationId: CollectionGranteeGrants @@ -30141,7 +30063,7 @@ paths: QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30386,7 +30308,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -30397,10 +30318,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/children': + /lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/children: get: summary: Children queries the children of a given nft. operationId: Children @@ -30451,7 +30371,7 @@ paths: QueryChildrenResponse is the response type for the Query/Children RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30696,7 +30616,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -30707,10 +30626,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/has_parent': + /lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/has_parent: get: summary: HasParent queries whether a given nft has its parent. operationId: HasParent @@ -30722,13 +30640,12 @@ paths: properties: has_parent: type: boolean - format: boolean description: whether the token has its parent. description: >- QueryHasParentResponse is the response type for the Query/HasParent RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30929,7 +30846,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/parent': + /lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/parent: get: summary: Parent queries the parent of a given nft. operationId: Parent @@ -30959,7 +30876,7 @@ paths: QueryParentResponse is the response type for the Query/Parent RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31160,7 +31077,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/root': + /lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/root: get: summary: Root queries the root of a given nft. operationId: Root @@ -31190,7 +31107,7 @@ paths: QueryRootResponse is the response type for the Query/Root RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31391,7 +31308,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_classes/{class_id}/type_name': + /lbm/collection/v1/contracts/{contract_id}/token_classes/{class_id}/type_name: get: summary: >- TokenClassTypeName queries the fully qualified message type name of a @@ -31414,7 +31331,7 @@ paths: Since: 0.46.0 (finschia) default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31615,7 +31532,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}': + /lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}: get: summary: TokenType queries metadata of a token type. operationId: TokenType @@ -31650,7 +31567,7 @@ paths: QueryTokenTypeResponse is the response type for the Query/TokenType RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31853,7 +31770,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/burnt': + /lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/burnt: get: summary: >- NFTBurnt queries the number of burnt tokens from a given contract id and @@ -31872,7 +31789,7 @@ paths: QueryNFTBurntResponse is the response type for the Query/NFTBurnt RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32075,7 +31992,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/minted': + /lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/minted: get: summary: >- NFTMinted queries the number of minted tokens from a given contract id @@ -32094,7 +32011,7 @@ paths: QueryNFTMintedResponse is the response type for the Query/NFTMinted RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32297,7 +32214,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/supply': + /lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/supply: get: summary: >- NFTSupply queries the number of tokens from a given contract id and @@ -32316,7 +32233,7 @@ paths: QueryNFTSupplyResponse is the response type for the Query/NFTSupply RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32519,7 +32436,7 @@ paths: type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/tokens/{token_id}': + /lbm/collection/v1/contracts/{contract_id}/tokens/{token_id}: get: summary: Token queries a metadata of a token from its token id. operationId: Token @@ -32704,7 +32621,7 @@ paths: QueryTokenResponse is the response type for the Query/Token RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32905,7 +32822,7 @@ paths: type: string tags: - Query - '/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}': + /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: get: summary: Allowance returns fee granted to the grantee by the granter. operationId: Allowance @@ -33004,7 +32921,7 @@ paths: QueryAllowanceResponse is the response type for the Query/Allowance RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -33209,7 +33126,7 @@ paths: type: string tags: - Query - '/cosmos/feegrant/v1beta1/allowances/{grantee}': + /cosmos/feegrant/v1beta1/allowances/{grantee}: get: summary: Allowances returns all the grants for address. operationId: Allowances @@ -33330,7 +33247,7 @@ paths: QueryAllowancesResponse is the response type for the Query/Allowances RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -33569,7 +33486,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -33580,10 +33496,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/feegrant/v1beta1/issued/{granter}': + /cosmos/feegrant/v1beta1/issued/{granter}: get: summary: |- AllowancesByGranter returns all the grants given by an address @@ -33706,7 +33621,7 @@ paths: QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -33945,7 +33860,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -33956,7 +33870,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/base/node/v1beta1/config: @@ -33975,7 +33888,7 @@ paths: ConfigResponse defines the response structure for the Config gRPC query. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34279,7 +34192,7 @@ paths: items: type: string default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34302,13 +34215,13 @@ paths: format: byte parameters: - name: role - description: 'the role name (guardian, operator, judge).' + description: the role name (guardian, operator, judge). in: query required: false type: string tags: - Query - '/lbm/fbridge/v1/members/{address}': + /lbm/fbridge/v1/members/{address}: get: summary: Member queries the role of a specific member operationId: FBridgeMember @@ -34321,7 +34234,7 @@ paths: role: type: string default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34414,7 +34327,7 @@ paths: target denom of the bridge module. This is the base denom of Finschia normally. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34508,7 +34421,7 @@ paths: was set, its value is undefined otherwise default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34576,7 +34489,6 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the @@ -34587,10 +34499,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - '/lbm/fbridge/v1/proposals/{proposal_id}': + /lbm/fbridge/v1/proposals/{proposal_id}: get: summary: Proposal queries a SuggestRole Proposal operationId: FBridgeProposal @@ -34636,7 +34547,7 @@ paths: the unix timestamp the proposal will be expired (unix timestamp) default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34666,7 +34577,7 @@ paths: format: uint64 tags: - Query - '/lbm/fbridge/v1/proposals/{proposal_id}/votes': + /lbm/fbridge/v1/proposals/{proposal_id}/votes: get: summary: Votes queries votes of a given proposal. operationId: FBridgeVotes @@ -34703,7 +34614,7 @@ paths: description: Vote defines a vote on a role proposal. description: votes defined the queried votes. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34733,9 +34644,9 @@ paths: format: uint64 tags: - Query - '/lbm/fbridge/v1/proposals/{proposal_id}/votes/{voter}': + /lbm/fbridge/v1/proposals/{proposal_id}/votes/{voter}: get: - summary: 'Vote queries voted information based on proposalID, voterAddr.' + summary: Vote queries voted information based on proposalID, voterAddr. operationId: FBridgeVote responses: '200': @@ -34767,7 +34678,7 @@ paths: - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. description: Vote defines a vote on a role proposal. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34802,7 +34713,7 @@ paths: type: string tags: - Query - '/lbm/fbridge/v1/receiving/commitments/{seq}': + /lbm/fbridge/v1/receiving/commitments/{seq}: get: summary: Commitments queries commitments of a specific sequence number operationId: FBridgeCommitments @@ -34817,7 +34728,7 @@ paths: items: type: string default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34863,7 +34774,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34886,7 +34797,7 @@ paths: format: byte tags: - Query - '/lbm/fbridge/v1/receiving/operators/{operator}/needed_submission_seqs': + /lbm/fbridge/v1/receiving/operators/{operator}/needed_submission_seqs: get: summary: >- NeededSubmissionSeqs queries a list of sequence numbers that need to be @@ -34912,7 +34823,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34947,7 +34858,7 @@ paths: format: uint64 tags: - Query - '/lbm/fbridge/v1/receiving/operators/{operator}/provision/{seq}': + /lbm/fbridge/v1/receiving/operators/{operator}/provision/{seq}: get: summary: >- SubmittedProvision queries a provision submitted by a particular @@ -34993,7 +34904,6 @@ paths: provision is_claimed: type: boolean - format: boolean title: whether the provision has been claimed description: >- ProvisionStatus is a struct that represents the status of a @@ -35002,7 +34912,7 @@ paths: To optimize computational cost, we have collected frequently changing values from provision. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -35037,7 +34947,7 @@ paths: format: uint64 tags: - Query - '/lbm/fbridge/v1/receiving/operators/{operator}/seq': + /lbm/fbridge/v1/receiving/operators/{operator}/seq: get: summary: >- GreatestSeqByOperator queries a greatest sequence number confirmed by a @@ -35053,7 +34963,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -35082,7 +34992,7 @@ paths: type: string tags: - Query - '/lbm/fbridge/v1/receiving/provision/{seq}': + /lbm/fbridge/v1/receiving/provision/{seq}: get: summary: ConfirmedProvision queries a particular sequence of confirmed provisions operationId: ConfirmedProvision @@ -35126,7 +35036,6 @@ paths: provision is_claimed: type: boolean - format: boolean title: whether the provision has been claimed description: >- ProvisionStatus is a struct that represents the status of a @@ -35135,7 +35044,7 @@ paths: To optimize computational cost, we have collected frequently changing values from provision. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -35183,7 +35092,426 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: seqs + description: list of sequence number of the bridge request. + in: query + required: false + type: array + items: + type: string + format: uint64 + collectionFormat: multi + tags: + - Query + /lbm/fbridge/v1/sending/nextseq: + get: + summary: NextSeqSend queries the sequence of next bridge request + operationId: NextSeqSend + responses: + '200': + description: A successful response. + schema: + type: object + properties: + seq: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /lbm/fbridge/v1/status: + get: + summary: BridgeStatus queries the status of the bridge + operationId: BridgeStatus + responses: + '200': + description: A successful response. + schema: + type: object + properties: + status: + type: string + enum: + - BRIDGE_STATUS_UNSPECIFIED + - BRIDGE_STATUS_ACTIVE + - BRIDGE_STATUS_INACTIVE + default: BRIDGE_STATUS_UNSPECIFIED + description: |2- + - BRIDGE_STATUS_UNSPECIFIED: BRIDGE_STATUS_UNSPECIFIED defines an unspecified bridge status. + - BRIDGE_STATUS_ACTIVE: BRIDGE_STATUS_ACTIVE defines an active bridge status. + - BRIDGE_STATUS_INACTIVE: BRIDGE_STATUS_INACTIVE defines an inactive bridge status. + metadata: + type: object + properties: + inactive: + type: string + format: uint64 + title: the number of inactived bridge switch + active: + type: string + format: uint64 + title: the number of activated bridge switch + description: >- + BridgeStatusMetadata defines the metadata of the bridge + status. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /lbm/fswap/v1/swap: + get: + summary: Swap queries a swap + operationId: Swap + responses: + '200': + description: A successful response. + schema: + type: object + properties: + swap: + type: object + properties: + from_denom: + type: string + to_denom: + type: string + amount_cap_for_to_denom: + type: string + swap_rate: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: fromDenom + in: query + required: false + type: string + - name: toDenom + in: query + required: false + type: string + tags: + - Query + /lbm/fswap/v1/swapped: + get: + summary: >- + Swapped queries the current swapped status that includes a burnt amount + of from-coin and a minted amount of + + to-coin. + operationId: Swapped + responses: + '200': + description: A successful response. + schema: + type: object + properties: + from_coin_amount: + type: object + properties: + denom: + type: string + amount: + type: string + 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. + to_coin_amount: + type: object + properties: + denom: + type: string + amount: + type: string + 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. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: fromDenom + in: query + required: false + type: string + - name: toDenom + in: query + required: false + type: string + tags: + - Query + /lbm/fswap/v1/swaps: + get: + summary: Swaps queries all the swap that registered + operationId: Swaps + responses: + '200': + description: A successful response. + schema: + type: object + properties: + swaps: + type: array + items: + type: object + properties: + from_denom: + type: string + to_denom: + type: string + amount_cap_for_to_denom: + type: string + swap_rate: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: pagination.key + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + 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 + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /lbm/fswap/v1/total_swappable_to_coin_amount: + get: + summary: >- + TotalSwappableToCoinAmount queries the current swappable amount for + to-coin. + operationId: TotalSwappableToCoinAmount + responses: + '200': + description: A successful response. + schema: + type: object + properties: + swappable_amount: + type: object + properties: + denom: + type: string + amount: + type: string + 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. + default: + description: An unexpected error response. schema: type: object properties: @@ -35205,111 +35533,14 @@ paths: type: string format: byte parameters: - - name: seqs - description: list of sequence number of the bridge request. + - name: fromDenom in: query required: false - type: array - items: - type: string - format: uint64 - collectionFormat: multi - tags: - - Query - /lbm/fbridge/v1/sending/nextseq: - get: - summary: NextSeqSend queries the sequence of next bridge request - operationId: NextSeqSend - responses: - '200': - description: A successful response. - schema: - type: object - properties: - seq: - type: string - format: uint64 - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - tags: - - Query - /lbm/fbridge/v1/status: - get: - summary: BridgeStatus queries the status of the bridge - operationId: BridgeStatus - responses: - '200': - description: A successful response. - schema: - type: object - properties: - status: - type: string - enum: - - BRIDGE_STATUS_UNSPECIFIED - - BRIDGE_STATUS_ACTIVE - - BRIDGE_STATUS_INACTIVE - default: BRIDGE_STATUS_UNSPECIFIED - description: |2- - - BRIDGE_STATUS_UNSPECIFIED: BRIDGE_STATUS_UNSPECIFIED defines an unspecified bridge status. - - BRIDGE_STATUS_ACTIVE: BRIDGE_STATUS_ACTIVE defines an active bridge status. - - BRIDGE_STATUS_INACTIVE: BRIDGE_STATUS_INACTIVE defines an inactive bridge status. - metadata: - type: object - properties: - inactive: - type: string - format: uint64 - title: the number of inactived bridge switch - active: - type: string - format: uint64 - title: the number of activated bridge switch - description: >- - BridgeStatusMetadata defines the metadata of the bridge - status. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte + type: string + - name: toDenom + in: query + required: false + type: string tags: - Query definitions: @@ -35914,7 +36145,6 @@ definitions: If left empty it will default to a value to be set by each app. count_total: type: boolean - format: boolean description: >- count_total is set to true to indicate that the result set should include @@ -35927,7 +36157,6 @@ definitions: is set. reverse: type: boolean - format: boolean description: >- reverse is set to true if results are to be returned in the descending order. @@ -36400,7 +36629,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -36408,7 +36636,6 @@ definitions: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. cosmos.bank.v1beta1.QueryAllBalancesResponse: type: object @@ -36655,7 +36882,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -36663,7 +36889,6 @@ definitions: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank @@ -36778,7 +37003,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). @@ -43650,7 +43874,6 @@ definitions: properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. @@ -44654,7 +44877,6 @@ definitions: type: string withdraw_addr_enabled: type: boolean - format: boolean description: Params defines the set of params for the distribution module. cosmos.distribution.v1beta1.QueryCommunityPoolResponse: type: object @@ -44785,7 +45007,6 @@ definitions: type: string withdraw_addr_enabled: type: boolean - format: boolean description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: type: object @@ -46735,7 +46956,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -46794,7 +47014,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -46873,7 +47092,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -46919,7 +47137,7 @@ definitions: properties: rate: type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' + description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- @@ -46940,7 +47158,7 @@ definitions: properties: rate: type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' + description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- @@ -47288,7 +47506,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -47823,7 +48040,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -48121,7 +48337,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -48527,7 +48742,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -49121,7 +49335,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -49488,7 +49701,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -50067,7 +50279,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -50270,7 +50481,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -50327,7 +50537,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -50580,7 +50790,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -50804,7 +51013,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -51064,7 +51273,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -51754,7 +51962,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -52014,7 +52222,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -52075,7 +52282,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -52339,7 +52546,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -52790,7 +52996,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -53770,179 +53975,220 @@ definitions: when the default options are not sufficient. If any of these are present - and can't be handled, the transaction will be rejected - non_critical_extension_options: + and can't be handled, the transaction will be rejected + non_critical_extension_options: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by chains + + when the default options are not sufficient. If any of these are + present + + and can't be handled, they will be ignored + description: TxBody is the body of a transaction that all signers sign over. +<<<<<<< HEAD +======= + tendermint.abci.Event: + type: object + properties: + type: + type: string + attributes: type: array items: type: object properties: - type_url: + key: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. + format: byte value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by chains + index: + type: boolean + description: EventAttribute is a single key-value pair, associated with an event. + description: >- + Event allows application developers to attach additional information to - when the default options are not sufficient. If any of these are - present + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - and can't be handled, they will be ignored - description: TxBody is the body of a transaction that all signers sign over. + Later, transactions may be queried using these events. + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + description: EventAttribute is a single key-value pair, associated with an event. +>>>>>>> 92ad67530 (feat: add new query to get a swap (#1387)) cosmos.upgrade.v1beta1.ModuleVersion: type: object properties: @@ -57246,7 +57492,6 @@ definitions: to get its user representation. mintable: type: boolean - format: boolean description: mintable represents whether the token is allowed to mint or burn. description: Contract defines token information. lbm.token.v1.Grant: @@ -57327,7 +57572,6 @@ definitions: amount by to get its user representation. mintable: type: boolean - format: boolean description: mintable represents whether the token is allowed to mint or burn. description: Contract defines token information. title: >- @@ -57410,7 +57654,6 @@ definitions: properties: authorized: type: boolean - format: boolean title: >- QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method @@ -57703,7 +57946,6 @@ definitions: properties: has_parent: type: boolean - format: boolean description: whether the token has its parent. description: >- QueryHasParentResponse is the response type for the Query/HasParent RPC @@ -57741,7 +57983,6 @@ definitions: properties: authorized: type: boolean - format: boolean description: >- QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method. @@ -59119,7 +59360,6 @@ definitions: title: a value that tells how many operators have submitted this provision is_claimed: type: boolean - format: boolean title: whether the provision has been claimed description: >- ProvisionStatus is a struct that represents the status of a provision. @@ -59196,7 +59436,6 @@ definitions: provision is_claimed: type: boolean - format: boolean title: whether the provision has been claimed description: >- ProvisionStatus is a struct that represents the status of a provision. @@ -59319,7 +59558,7 @@ definitions: - OPERATOR - JUDGE default: UNSPECIFIED - description: 'Role defines the role of the operator, guardian, and judge.' + description: Role defines the role of the operator, guardian, and judge. expired_at: type: string format: date-time @@ -59355,7 +59594,7 @@ definitions: - OPERATOR - JUDGE default: UNSPECIFIED - description: 'Role defines the role of the operator, guardian, and judge.' + description: Role defines the role of the operator, guardian, and judge. expired_at: type: string format: date-time @@ -59423,7 +59662,6 @@ definitions: provision is_claimed: type: boolean - format: boolean title: whether the provision has been claimed description: >- ProvisionStatus is a struct that represents the status of a provision. @@ -59493,7 +59731,7 @@ definitions: - OPERATOR - JUDGE default: UNSPECIFIED - description: 'Role defines the role of the operator, guardian, and judge.' + description: Role defines the role of the operator, guardian, and judge. lbm.fbridge.v1.RoleProposal: type: object properties: @@ -59520,7 +59758,7 @@ definitions: - OPERATOR - JUDGE default: UNSPECIFIED - description: 'Role defines the role of the operator, guardian, and judge.' + description: Role defines the role of the operator, guardian, and judge. expired_at: type: string format: date-time @@ -59561,3 +59799,111 @@ definitions: - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + lbm.fswap.v1.QuerySwapResponse: + type: object + properties: + swap: + type: object + properties: + from_denom: + type: string + to_denom: + type: string + amount_cap_for_to_denom: + type: string + swap_rate: + type: string + lbm.fswap.v1.QuerySwappedResponse: + type: object + properties: + from_coin_amount: + type: object + properties: + denom: + type: string + amount: + type: string + 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. + to_coin_amount: + type: object + properties: + denom: + type: string + amount: + type: string + 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. + lbm.fswap.v1.QuerySwapsResponse: + type: object + properties: + swaps: + type: array + items: + type: object + properties: + from_denom: + type: string + to_denom: + type: string + amount_cap_for_to_denom: + type: string + swap_rate: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + lbm.fswap.v1.QueryTotalSwappableToCoinAmountResponse: + type: object + properties: + swappable_amount: + type: object + properties: + denom: + type: string + amount: + type: string + 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. + lbm.fswap.v1.Swap: + type: object + properties: + from_denom: + type: string + to_denom: + type: string + amount_cap_for_to_denom: + type: string + swap_rate: + type: string diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 8ac2e922b3..32205add25 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -991,6 +991,8 @@ - [GenesisState](#lbm.fswap.v1.GenesisState) - [lbm/fswap/v1/query.proto](#lbm/fswap/v1/query.proto) + - [QuerySwapRequest](#lbm.fswap.v1.QuerySwapRequest) + - [QuerySwapResponse](#lbm.fswap.v1.QuerySwapResponse) - [QuerySwappedRequest](#lbm.fswap.v1.QuerySwappedRequest) - [QuerySwappedResponse](#lbm.fswap.v1.QuerySwappedResponse) - [QuerySwapsRequest](#lbm.fswap.v1.QuerySwapsRequest) @@ -14717,6 +14719,37 @@ GenesisState defines the fswap module's genesis state. + + +### QuerySwapRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fromDenom` | [string](#string) | | | +| `toDenom` | [string](#string) | | | + + + + + + + + +### QuerySwapResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `swap` | [Swap](#lbm.fswap.v1.Swap) | | | + + + + + + ### QuerySwappedRequest @@ -14826,6 +14859,7 @@ GenesisState defines the fswap module's genesis state. | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `Swapped` | [QuerySwappedRequest](#lbm.fswap.v1.QuerySwappedRequest) | [QuerySwappedResponse](#lbm.fswap.v1.QuerySwappedResponse) | Swapped queries the current swapped status that includes a burnt amount of from-coin and a minted amount of to-coin. | GET|/lbm/fswap/v1/swapped| | `TotalSwappableToCoinAmount` | [QueryTotalSwappableToCoinAmountRequest](#lbm.fswap.v1.QueryTotalSwappableToCoinAmountRequest) | [QueryTotalSwappableToCoinAmountResponse](#lbm.fswap.v1.QueryTotalSwappableToCoinAmountResponse) | TotalSwappableToCoinAmount queries the current swappable amount for to-coin. | GET|/lbm/fswap/v1/total_swappable_to_coin_amount| +| `Swap` | [QuerySwapRequest](#lbm.fswap.v1.QuerySwapRequest) | [QuerySwapResponse](#lbm.fswap.v1.QuerySwapResponse) | Swap queries a swap | GET|/lbm/fswap/v1/swap| | `Swaps` | [QuerySwapsRequest](#lbm.fswap.v1.QuerySwapsRequest) | [QuerySwapsResponse](#lbm.fswap.v1.QuerySwapsResponse) | Swaps queries all the swap that registered | GET|/lbm/fswap/v1/swaps| diff --git a/proto/lbm/fswap/v1/query.proto b/proto/lbm/fswap/v1/query.proto index a2a88b7093..e5fa09168b 100644 --- a/proto/lbm/fswap/v1/query.proto +++ b/proto/lbm/fswap/v1/query.proto @@ -20,6 +20,10 @@ service Query { returns (QueryTotalSwappableToCoinAmountResponse) { option (google.api.http).get = "/lbm/fswap/v1/total_swappable_to_coin_amount"; } + // Swap queries a swap + rpc Swap(QuerySwapRequest) returns (QuerySwapResponse) { + option (google.api.http).get = "/lbm/fswap/v1/swap"; + } // Swaps queries all the swap that registered rpc Swaps(QuerySwapsRequest) returns (QuerySwapsResponse) { option (google.api.http).get = "/lbm/fswap/v1/swaps"; @@ -46,6 +50,14 @@ message QueryTotalSwappableToCoinAmountResponse { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coin"]; } +message QuerySwapRequest { + string fromDenom = 1; + string toDenom = 2; +} +message QuerySwapResponse { + Swap swap = 1 [(gogoproto.nullable) = false]; +} + message QuerySwapsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } diff --git a/x/fswap/client/cli/query.go b/x/fswap/client/cli/query.go index 46c87aa868..723e5200ec 100644 --- a/x/fswap/client/cli/query.go +++ b/x/fswap/client/cli/query.go @@ -24,6 +24,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand( CmdQuerySwapped(), CmdQueryTotalSwappableAmount(), + CmdQuerySwap(), CmdQuerySwaps(), ) return cmd @@ -86,10 +87,40 @@ func CmdQueryTotalSwappableAmount() *cobra.Command { return cmd } +func CmdQuerySwap() *cobra.Command { + cmd := &cobra.Command{ + Use: "swap [from_denom] [to_denom]", + Short: "shows a swap", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + req := &types.QuerySwapRequest{ + FromDenom: args[0], + ToDenom: args[1], + } + + res, err := queryClient.Swap(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + func CmdQuerySwaps() *cobra.Command { cmd := &cobra.Command{ Use: "swaps", - Short: "shows the all the swaps that proposed", + Short: "shows the all the swaps", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -98,7 +129,15 @@ func CmdQuerySwaps() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Swaps(cmd.Context(), &types.QuerySwapsRequest{}) + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + req := &types.QuerySwapsRequest{ + Pagination: pageReq, + } + res, err := queryClient.Swaps(cmd.Context(), req) if err != nil { return err } diff --git a/x/fswap/keeper/grpc_query.go b/x/fswap/keeper/grpc_query.go index 8e2e94a5e2..ba888d6e4d 100644 --- a/x/fswap/keeper/grpc_query.go +++ b/x/fswap/keeper/grpc_query.go @@ -3,6 +3,9 @@ package keeper import ( "context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "github.com/Finschia/finschia-sdk/store/prefix" sdk "github.com/Finschia/finschia-sdk/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" @@ -59,6 +62,20 @@ func (s QueryServer) TotalSwappableToCoinAmount(ctx context.Context, req *types. return &types.QueryTotalSwappableToCoinAmountResponse{SwappableAmount: amount}, nil } +func (s QueryServer) Swap(ctx context.Context, req *types.QuerySwapRequest) (*types.QuerySwapResponse, error) { + if err := req.Validate(); err != nil { + return nil, err + } + + c := sdk.UnwrapSDKContext(ctx) + swap, err := s.Keeper.getSwap(c, req.GetFromDenom(), req.GetToDenom()) + if err != nil { + return nil, status.Error(codes.NotFound, err.Error()) + } + + return &types.QuerySwapResponse{Swap: swap}, nil +} + func (s QueryServer) Swaps(ctx context.Context, req *types.QuerySwapsRequest) (*types.QuerySwapsResponse, error) { c := sdk.UnwrapSDKContext(ctx) diff --git a/x/fswap/keeper/grpc_query_test.go b/x/fswap/keeper/grpc_query_test.go new file mode 100644 index 0000000000..f141459d09 --- /dev/null +++ b/x/fswap/keeper/grpc_query_test.go @@ -0,0 +1,121 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/Finschia/finschia-sdk/baseapp" + "github.com/Finschia/finschia-sdk/simapp" + sdk "github.com/Finschia/finschia-sdk/types" + bank "github.com/Finschia/finschia-sdk/x/bank/types" + "github.com/Finschia/finschia-sdk/x/fswap/keeper" + "github.com/Finschia/finschia-sdk/x/fswap/types" +) + +func TestFSwapQueryTestSuite(t *testing.T) { + suite.Run(t, &FSwapQueryTestSuite{}) +} + +type FSwapQueryTestSuite struct { + suite.Suite + + app *simapp.SimApp + ctx sdk.Context + queryClient types.QueryClient + keeper keeper.Keeper + swap types.Swap + toDenomMetadata bank.Metadata + fromDenom string + toDenom string +} + +func (s *FSwapQueryTestSuite) SetupTest() { + s.app = simapp.Setup(false) + s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) + + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.app.InterfaceRegistry()) + types.RegisterQueryServer(queryHelper, keeper.NewQueryServer(s.app.FswapKeeper)) + s.queryClient = types.NewQueryClient(queryHelper) + s.keeper = s.app.FswapKeeper + + pebSwapRateForCony, err := sdk.NewDecFromStr("148079656000000") + s.Require().NoError(err) + swapCap := sdk.NewInt(1000) + s.Require().NoError(err) + s.fromDenom = "cony" + s.toDenom = "kei" + s.swap = types.Swap{ + FromDenom: s.fromDenom, + ToDenom: s.toDenom, + AmountCapForToDenom: swapCap, + SwapRate: pebSwapRateForCony, + } + s.toDenomMetadata = bank.Metadata{ + Description: "This is metadata for to-coin", + DenomUnits: []*bank.DenomUnit{ + {Denom: s.swap.ToDenom, Exponent: 0}, + }, + Base: s.toDenom, + Display: "dummycoin", + Name: "DUMMY", + Symbol: "DUM", + } + + err = s.keeper.SetSwap(s.ctx, s.swap, s.toDenomMetadata) + s.Require().NoError(err) +} + +func (s *FSwapQueryTestSuite) TestQuerySwapRequest() { + tests := []struct { + name string + FromDenom string + ToDenom string + wantErr bool + expectedGrpcCode codes.Code + }{ + { + name: "valid", + FromDenom: s.fromDenom, + ToDenom: s.toDenom, + wantErr: false, + expectedGrpcCode: codes.OK, + }, + { + name: "invalid: empty fromDenom", + FromDenom: "", + ToDenom: s.toDenom, + wantErr: true, + expectedGrpcCode: codes.InvalidArgument, + }, + { + name: "invalid: empty toDenom", + FromDenom: s.fromDenom, + ToDenom: "", + wantErr: true, + expectedGrpcCode: codes.InvalidArgument, + }, + { + name: "invalid: the same fromDenom and toDenom", + FromDenom: s.fromDenom, + ToDenom: s.fromDenom, + wantErr: true, + expectedGrpcCode: codes.InvalidArgument, + }, + } + for _, tc := range tests { + s.Run(tc.name, func() { + m := &types.QuerySwapRequest{ + FromDenom: tc.FromDenom, + ToDenom: tc.ToDenom, + } + + _, err := s.queryClient.Swap(s.ctx.Context(), m) + actualGrpcCode := status.Code(err) + s.Require().Equal(tc.expectedGrpcCode, actualGrpcCode, actualGrpcCode.String()) + }) + } +} diff --git a/x/fswap/testutil/expected_keepers_mocks.go b/x/fswap/testutil/expected_keepers_mocks.go index 8718d93937..27cbf452b7 100644 --- a/x/fswap/testutil/expected_keepers_mocks.go +++ b/x/fswap/testutil/expected_keepers_mocks.go @@ -7,9 +7,8 @@ package testutil import ( reflect "reflect" - types "github.com/Finschia/finschia-sdk/snapshots/types" - types0 "github.com/Finschia/finschia-sdk/types" - types1 "github.com/Finschia/finschia-sdk/x/bank/types" + types "github.com/Finschia/finschia-sdk/types" + types0 "github.com/Finschia/finschia-sdk/x/bank/types" gomock "github.com/golang/mock/gomock" ) @@ -37,7 +36,7 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { } // BurnCoins mocks base method. -func (m *MockBankKeeper) BurnCoins(ctx types0.Context, moduleName string, amt types0.Coins) error { +func (m *MockBankKeeper) BurnCoins(ctx types.Context, moduleName string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "BurnCoins", ctx, moduleName, amt) ret0, _ := ret[0].(error) @@ -51,10 +50,10 @@ func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, moduleName, amt interface{} } // GetBalance mocks base method. -func (m *MockBankKeeper) GetBalance(ctx types0.Context, addr types0.AccAddress, denom string) types0.Coin { +func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) - ret0, _ := ret[0].(types0.Coin) + ret0, _ := ret[0].(types.Coin) return ret0 } @@ -65,10 +64,10 @@ func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) * } // GetDenomMetaData mocks base method. -func (m *MockBankKeeper) GetDenomMetaData(ctx types0.Context, denom string) (types.Metadata, bool) { +func (m *MockBankKeeper) GetDenomMetaData(ctx types.Context, denom string) (types0.Metadata, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetDenomMetaData", ctx, denom) - ret0, _ := ret[0].(types.Metadata) + ret0, _ := ret[0].(types0.Metadata) ret1, _ := ret[1].(bool) return ret0, ret1 } @@ -80,7 +79,7 @@ func (mr *MockBankKeeperMockRecorder) GetDenomMetaData(ctx, denom interface{}) * } // IsSendEnabledCoins mocks base method. -func (m *MockBankKeeper) IsSendEnabledCoins(ctx types0.Context, coins ...types0.Coin) error { +func (m *MockBankKeeper) IsSendEnabledCoins(ctx types.Context, coins ...types.Coin) error { m.ctrl.T.Helper() varargs := []interface{}{ctx} for _, a := range coins { @@ -99,7 +98,7 @@ func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx interface{}, coins } // MintCoins mocks base method. -func (m *MockBankKeeper) MintCoins(ctx types0.Context, moduleName string, amt types0.Coins) error { +func (m *MockBankKeeper) MintCoins(ctx types.Context, moduleName string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "MintCoins", ctx, moduleName, amt) ret0, _ := ret[0].(error) @@ -113,7 +112,7 @@ func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{} } // SendCoinsFromAccountToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types0.Context, senderAddr types0.AccAddress, recipientModule string, amt types0.Coins) error { +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) ret0, _ := ret[0].(error) @@ -127,7 +126,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAd } // SendCoinsFromModuleToAccount mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types0.Context, senderModule string, recipientAddr types0.AccAddress, amt types0.Coins) error { +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) ret0, _ := ret[0].(error) @@ -141,7 +140,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo } // SetDenomMetaData mocks base method. -func (m *MockBankKeeper) SetDenomMetaData(ctx types0.Context, denomMetaData types1.Metadata) { +func (m *MockBankKeeper) SetDenomMetaData(ctx types.Context, denomMetaData types0.Metadata) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetDenomMetaData", ctx, denomMetaData) } diff --git a/x/fswap/types/msgs.go b/x/fswap/types/msgs.go index f8ca3407c2..5e71738fa9 100644 --- a/x/fswap/types/msgs.go +++ b/x/fswap/types/msgs.go @@ -1,6 +1,9 @@ package types import ( + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + sdk "github.com/Finschia/finschia-sdk/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" "github.com/Finschia/finschia-sdk/x/foundation/codec" @@ -141,3 +144,20 @@ func (m *MsgSetSwap) Route() string { func (m *MsgSetSwap) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m)) } + +func (m *QuerySwapRequest) Validate() error { + if m == nil { + return status.Error(codes.InvalidArgument, "empty QuerySwapRequest is not allowed") + } + if m.GetFromDenom() == m.GetToDenom() { + return status.Error(codes.InvalidArgument, "fromDenom and toDenom cannot be the same") + } + + if m.GetFromDenom() == "" { + return status.Error(codes.InvalidArgument, "from denom is empty") + } + if m.GetToDenom() == "" { + return status.Error(codes.InvalidArgument, "to denom is empty") + } + return nil +} diff --git a/x/fswap/types/msgs_test.go b/x/fswap/types/msgs_test.go index 1ae1c71636..eb5611f858 100644 --- a/x/fswap/types/msgs_test.go +++ b/x/fswap/types/msgs_test.go @@ -4,6 +4,8 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/auth/legacy/legacytx" @@ -83,3 +85,53 @@ func TestAminoJSON(t *testing.T) { }) } } + +func TestQuerySwapRequestValidate(t *testing.T) { + tests := []struct { + name string + FromDenom string + ToDenom string + wantErr bool + expectedGrpcCode codes.Code + }{ + { + name: "valid", + FromDenom: "cony", + ToDenom: "peb", + wantErr: false, + expectedGrpcCode: codes.OK, + }, + { + name: "invalid: empty fromDenom", + FromDenom: "", + ToDenom: "peb", + wantErr: true, + expectedGrpcCode: codes.InvalidArgument, + }, + { + name: "invalid: empty toDenom", + FromDenom: "cony", + ToDenom: "", + wantErr: true, + expectedGrpcCode: codes.InvalidArgument, + }, + { + name: "invalid: the same fromDenom and toDenom", + FromDenom: "cony", + ToDenom: "cony", + wantErr: true, + expectedGrpcCode: codes.InvalidArgument, + }, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + m := &fswaptypes.QuerySwapRequest{ + FromDenom: tc.FromDenom, + ToDenom: tc.ToDenom, + } + err := m.Validate() + actualGrpcCode := status.Code(err) + require.Equal(t, tc.expectedGrpcCode, actualGrpcCode) + }) + } +} diff --git a/x/fswap/types/query.pb.go b/x/fswap/types/query.pb.go index 80beb5195a..7f5685ac75 100644 --- a/x/fswap/types/query.pb.go +++ b/x/fswap/types/query.pb.go @@ -235,6 +235,102 @@ func (m *QueryTotalSwappableToCoinAmountResponse) GetSwappableAmount() types.Coi return types.Coin{} } +type QuerySwapRequest struct { + FromDenom string `protobuf:"bytes,1,opt,name=fromDenom,proto3" json:"fromDenom,omitempty"` + ToDenom string `protobuf:"bytes,2,opt,name=toDenom,proto3" json:"toDenom,omitempty"` +} + +func (m *QuerySwapRequest) Reset() { *m = QuerySwapRequest{} } +func (m *QuerySwapRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySwapRequest) ProtoMessage() {} +func (*QuerySwapRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_01deae9da7816d6a, []int{4} +} +func (m *QuerySwapRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapRequest.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 *QuerySwapRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapRequest.Merge(m, src) +} +func (m *QuerySwapRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapRequest proto.InternalMessageInfo + +func (m *QuerySwapRequest) GetFromDenom() string { + if m != nil { + return m.FromDenom + } + return "" +} + +func (m *QuerySwapRequest) GetToDenom() string { + if m != nil { + return m.ToDenom + } + return "" +} + +type QuerySwapResponse struct { + Swap Swap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap"` +} + +func (m *QuerySwapResponse) Reset() { *m = QuerySwapResponse{} } +func (m *QuerySwapResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySwapResponse) ProtoMessage() {} +func (*QuerySwapResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_01deae9da7816d6a, []int{5} +} +func (m *QuerySwapResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapResponse.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 *QuerySwapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapResponse.Merge(m, src) +} +func (m *QuerySwapResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapResponse proto.InternalMessageInfo + +func (m *QuerySwapResponse) GetSwap() Swap { + if m != nil { + return m.Swap + } + return Swap{} +} + type QuerySwapsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -243,7 +339,7 @@ func (m *QuerySwapsRequest) Reset() { *m = QuerySwapsRequest{} } func (m *QuerySwapsRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapsRequest) ProtoMessage() {} func (*QuerySwapsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_01deae9da7816d6a, []int{4} + return fileDescriptor_01deae9da7816d6a, []int{6} } func (m *QuerySwapsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -288,7 +384,7 @@ func (m *QuerySwapsResponse) Reset() { *m = QuerySwapsResponse{} } func (m *QuerySwapsResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapsResponse) ProtoMessage() {} func (*QuerySwapsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_01deae9da7816d6a, []int{5} + return fileDescriptor_01deae9da7816d6a, []int{7} } func (m *QuerySwapsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -336,6 +432,8 @@ func init() { proto.RegisterType((*QuerySwappedResponse)(nil), "lbm.fswap.v1.QuerySwappedResponse") proto.RegisterType((*QueryTotalSwappableToCoinAmountRequest)(nil), "lbm.fswap.v1.QueryTotalSwappableToCoinAmountRequest") proto.RegisterType((*QueryTotalSwappableToCoinAmountResponse)(nil), "lbm.fswap.v1.QueryTotalSwappableToCoinAmountResponse") + proto.RegisterType((*QuerySwapRequest)(nil), "lbm.fswap.v1.QuerySwapRequest") + proto.RegisterType((*QuerySwapResponse)(nil), "lbm.fswap.v1.QuerySwapResponse") proto.RegisterType((*QuerySwapsRequest)(nil), "lbm.fswap.v1.QuerySwapsRequest") proto.RegisterType((*QuerySwapsResponse)(nil), "lbm.fswap.v1.QuerySwapsResponse") } @@ -343,44 +441,47 @@ func init() { func init() { proto.RegisterFile("lbm/fswap/v1/query.proto", fileDescriptor_01deae9da7816d6a) } var fileDescriptor_01deae9da7816d6a = []byte{ - // 590 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0xe3, 0xf4, 0xd7, 0x5f, 0xd5, 0x6d, 0x55, 0xca, 0xb6, 0x15, 0xc1, 0x14, 0x27, 0xf8, - 0xd0, 0x56, 0xfc, 0xd9, 0x55, 0xd2, 0xf2, 0x00, 0x04, 0x54, 0xb8, 0x20, 0x41, 0xe8, 0x09, 0x0e, - 0x61, 0x9d, 0x6e, 0x5c, 0x8b, 0xd8, 0xe3, 0x66, 0x37, 0x69, 0x73, 0xe5, 0xc0, 0x0d, 0x09, 0x89, - 0x47, 0x80, 0x13, 0x2f, 0xc1, 0xb5, 0xc7, 0x4a, 0x5c, 0x38, 0x01, 0x4a, 0x78, 0x10, 0xb4, 0xeb, - 0x75, 0x63, 0x8b, 0x86, 0x08, 0xa1, 0xde, 0x36, 0x3b, 0xdf, 0x99, 0xef, 0x67, 0x27, 0x33, 0x46, - 0xa5, 0x8e, 0x17, 0xd2, 0xb6, 0x38, 0x62, 0x31, 0xed, 0x57, 0xe9, 0x61, 0x8f, 0x77, 0x07, 0x24, - 0xee, 0x82, 0x04, 0xbc, 0xd8, 0xf1, 0x42, 0xa2, 0x23, 0xa4, 0x5f, 0xb5, 0xd7, 0x7d, 0x00, 0xbf, - 0xc3, 0x29, 0x8b, 0x03, 0xca, 0xa2, 0x08, 0x24, 0x93, 0x01, 0x44, 0x22, 0xd1, 0xda, 0xab, 0x3e, - 0xf8, 0xa0, 0x8f, 0x54, 0x9d, 0xcc, 0xed, 0xcd, 0x16, 0x88, 0x10, 0x04, 0xf5, 0x98, 0xe0, 0x49, - 0x69, 0xda, 0xaf, 0x7a, 0x5c, 0xb2, 0x2a, 0x8d, 0x99, 0x1f, 0x44, 0xba, 0x84, 0xd1, 0x3a, 0x59, - 0x6d, 0xaa, 0x6a, 0x41, 0x90, 0xc6, 0xf3, 0x9c, 0x09, 0x96, 0x8e, 0xb8, 0x8f, 0xd1, 0xca, 0x53, - 0x55, 0xfb, 0xd9, 0x11, 0x8b, 0x63, 0xbe, 0xdf, 0xe0, 0x87, 0x3d, 0x2e, 0x24, 0x5e, 0x47, 0xf3, - 0xed, 0x2e, 0x84, 0x0f, 0x78, 0x04, 0x61, 0xc9, 0xaa, 0x58, 0x5b, 0xf3, 0x8d, 0xf1, 0x05, 0x2e, - 0xa1, 0x39, 0x09, 0x49, 0xac, 0xa8, 0x63, 0xe9, 0x4f, 0xf7, 0x4d, 0x11, 0xad, 0xe6, 0xeb, 0x89, - 0x18, 0x22, 0xc1, 0xf1, 0x31, 0x5a, 0x56, 0xf9, 0x4d, 0x05, 0xd5, 0x64, 0x21, 0xf4, 0x22, 0xa9, - 0xeb, 0x2e, 0xd4, 0xae, 0x92, 0x04, 0x9e, 0x28, 0x78, 0x62, 0xe0, 0xc9, 0x7d, 0x08, 0xa2, 0xfa, - 0xf6, 0xc9, 0xb7, 0x72, 0xe1, 0xd3, 0xf7, 0xf2, 0x2d, 0x3f, 0x90, 0x07, 0x3d, 0x8f, 0xb4, 0x20, - 0xa4, 0xbb, 0x41, 0x24, 0x5a, 0x07, 0x01, 0xa3, 0x6d, 0x73, 0xb8, 0x23, 0xf6, 0x5f, 0x51, 0x39, - 0x88, 0xb9, 0xd0, 0x49, 0x8d, 0x25, 0xe5, 0xa3, 0x4e, 0xf7, 0xb4, 0x0b, 0x96, 0x68, 0x49, 0x42, - 0xce, 0xb7, 0x78, 0x21, 0xbe, 0x8b, 0x12, 0xc6, 0xae, 0xee, 0x4b, 0xb4, 0xa1, 0xfb, 0xb0, 0x07, - 0x92, 0x75, 0x74, 0x33, 0x98, 0xd7, 0xe1, 0x7b, 0x19, 0xc9, 0xbf, 0xb6, 0xfa, 0xa3, 0x85, 0x36, - 0xa7, 0x5a, 0x98, 0xee, 0x0f, 0xd0, 0xb2, 0x48, 0x05, 0x17, 0xdb, 0xfd, 0x4b, 0x67, 0x3e, 0xa6, - 0x11, 0x2f, 0xd0, 0xe5, 0xb3, 0x81, 0x10, 0xe9, 0x9b, 0x77, 0x11, 0x1a, 0xcf, 0xb0, 0x21, 0xd9, - 0xc8, 0x91, 0x24, 0xbb, 0x94, 0xf2, 0x3c, 0x61, 0x3e, 0x37, 0xb9, 0x8d, 0x4c, 0xa6, 0xfb, 0xd6, - 0x42, 0x38, 0x5b, 0xdd, 0x3c, 0x97, 0xa0, 0x59, 0x85, 0x21, 0x4a, 0x56, 0x65, 0x66, 0x6b, 0xa1, - 0x86, 0x49, 0x76, 0x19, 0x89, 0xd2, 0xd6, 0xff, 0x53, 0x8f, 0x6b, 0x24, 0x32, 0xfc, 0x30, 0x87, - 0x93, 0x8c, 0xc7, 0xe6, 0x54, 0x9c, 0xc4, 0x2c, 0xcb, 0x53, 0xfb, 0x30, 0x83, 0x66, 0x35, 0x0f, - 0x06, 0x34, 0x67, 0x56, 0x00, 0xdf, 0xc8, 0xdb, 0x9f, 0xb3, 0x6e, 0xb6, 0xfb, 0x27, 0x49, 0xe2, - 0xe3, 0x5e, 0x7f, 0xfd, 0xe5, 0xe7, 0xfb, 0xe2, 0x15, 0xbc, 0x46, 0x73, 0xcb, 0x2c, 0x8c, 0xcb, - 0x67, 0x0b, 0xd9, 0x93, 0x27, 0x01, 0xef, 0x9c, 0xe3, 0x30, 0x75, 0x36, 0xed, 0xbb, 0x7f, 0x99, - 0x65, 0x50, 0x77, 0x34, 0x2a, 0xc1, 0xb7, 0xf3, 0xa8, 0x52, 0x65, 0x36, 0xc7, 0x83, 0x98, 0x5f, - 0x4b, 0xec, 0xa3, 0x59, 0xfd, 0x37, 0xe2, 0xf2, 0x84, 0x6e, 0xa4, 0xe3, 0x63, 0x57, 0x26, 0x0b, - 0x0c, 0xc1, 0x35, 0x4d, 0xb0, 0x86, 0x57, 0x7e, 0x6f, 0x96, 0xa8, 0x3f, 0x3a, 0x19, 0x3a, 0xd6, - 0xe9, 0xd0, 0xb1, 0x7e, 0x0c, 0x1d, 0xeb, 0xdd, 0xc8, 0x29, 0x9c, 0x8e, 0x9c, 0xc2, 0xd7, 0x91, - 0x53, 0x78, 0x4e, 0xa6, 0x8e, 0xfa, 0xb1, 0x29, 0xa6, 0x47, 0xde, 0xfb, 0x5f, 0x7f, 0x44, 0xb7, - 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x87, 0x53, 0x1d, 0x08, 0x06, 0x00, 0x00, + // 630 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x6f, 0xd3, 0x30, + 0x18, 0x6d, 0x4a, 0xcb, 0x34, 0x33, 0x8d, 0xe2, 0x75, 0xa2, 0x84, 0x91, 0x96, 0x1c, 0x36, 0x04, + 0xc3, 0x56, 0xb7, 0xf1, 0x03, 0x56, 0xd0, 0x40, 0x48, 0x48, 0x50, 0x76, 0x82, 0x43, 0x71, 0x3a, + 0x37, 0x8b, 0x68, 0xe2, 0xac, 0x76, 0xbb, 0xf5, 0xca, 0x01, 0x71, 0x41, 0x42, 0xe2, 0x2f, 0x70, + 0xe2, 0x4f, 0x70, 0xdd, 0x71, 0x12, 0x17, 0x4e, 0x80, 0x5a, 0x7e, 0x08, 0xb2, 0xe3, 0xac, 0x89, + 0xb6, 0xac, 0x9a, 0xa6, 0xdd, 0xdc, 0x7c, 0xef, 0x7b, 0xef, 0xf9, 0xe9, 0xfb, 0x5c, 0x50, 0xe9, + 0x3a, 0x3e, 0xee, 0xf0, 0x7d, 0x12, 0xe2, 0x41, 0x1d, 0xef, 0xf5, 0x69, 0x6f, 0x88, 0xc2, 0x1e, + 0x13, 0x0c, 0xce, 0x75, 0x1d, 0x1f, 0xa9, 0x0a, 0x1a, 0xd4, 0xcd, 0x25, 0x97, 0x31, 0xb7, 0x4b, + 0x31, 0x09, 0x3d, 0x4c, 0x82, 0x80, 0x09, 0x22, 0x3c, 0x16, 0xf0, 0x08, 0x6b, 0x96, 0x5d, 0xe6, + 0x32, 0x75, 0xc4, 0xf2, 0xa4, 0xbf, 0xde, 0x6f, 0x33, 0xee, 0x33, 0x8e, 0x1d, 0xc2, 0x69, 0x44, + 0x8d, 0x07, 0x75, 0x87, 0x0a, 0x52, 0xc7, 0x21, 0x71, 0xbd, 0x40, 0x51, 0x68, 0xac, 0x95, 0xc4, + 0xc6, 0xa8, 0x36, 0xf3, 0xe2, 0x7a, 0xda, 0x67, 0x64, 0x4b, 0x55, 0xec, 0x17, 0x60, 0xe1, 0x95, + 0xe4, 0x7e, 0xbd, 0x4f, 0xc2, 0x90, 0xee, 0x34, 0xe9, 0x5e, 0x9f, 0x72, 0x01, 0x97, 0xc0, 0x6c, + 0xa7, 0xc7, 0xfc, 0x27, 0x34, 0x60, 0x7e, 0xc5, 0xa8, 0x19, 0xf7, 0x66, 0x9b, 0x93, 0x0f, 0xb0, + 0x02, 0x66, 0x04, 0x8b, 0x6a, 0x79, 0x55, 0x8b, 0x7f, 0xda, 0x1f, 0xf3, 0xa0, 0x9c, 0xe6, 0xe3, + 0x21, 0x0b, 0x38, 0x85, 0x07, 0xa0, 0x24, 0xfb, 0x5b, 0xd2, 0x54, 0x8b, 0xf8, 0xac, 0x1f, 0x08, + 0xc5, 0x7b, 0x6d, 0xed, 0x16, 0x8a, 0xcc, 0x23, 0x69, 0x1e, 0x69, 0xf3, 0xe8, 0x31, 0xf3, 0x82, + 0xc6, 0xfa, 0xe1, 0xef, 0x6a, 0xee, 0xfb, 0x9f, 0xea, 0x03, 0xd7, 0x13, 0xbb, 0x7d, 0x07, 0xb5, + 0x99, 0x8f, 0xb7, 0xbc, 0x80, 0xb7, 0x77, 0x3d, 0x82, 0x3b, 0xfa, 0xf0, 0x90, 0xef, 0xbc, 0xc7, + 0x62, 0x18, 0x52, 0xae, 0x9a, 0x9a, 0xf3, 0x52, 0x47, 0x9e, 0x36, 0x95, 0x0a, 0x14, 0x60, 0x5e, + 0xb0, 0x94, 0x6e, 0xfe, 0x52, 0x74, 0xe7, 0x04, 0x9b, 0xa8, 0xda, 0xef, 0xc0, 0xb2, 0xca, 0x61, + 0x9b, 0x09, 0xd2, 0x55, 0x61, 0x10, 0xa7, 0x4b, 0xb7, 0x13, 0x90, 0x8b, 0x46, 0xfd, 0xcd, 0x00, + 0x2b, 0x53, 0x25, 0x74, 0xfa, 0x43, 0x50, 0xe2, 0x31, 0xe0, 0x72, 0xd3, 0xbf, 0x7e, 0xac, 0xa3, + 0x83, 0x78, 0x0e, 0x4a, 0xc7, 0x03, 0x71, 0xd1, 0x2b, 0x6f, 0x82, 0x1b, 0x09, 0x2e, 0x7d, 0xb7, + 0x55, 0x50, 0x90, 0x9a, 0xfa, 0x3e, 0x10, 0x25, 0x17, 0x0f, 0x49, 0x64, 0xa3, 0x20, 0x2f, 0xd2, + 0x54, 0x28, 0xfb, 0x6d, 0x82, 0x82, 0xc7, 0x7e, 0xb6, 0x00, 0x98, 0xac, 0x94, 0x26, 0x5a, 0x4e, + 0x05, 0x13, 0xad, 0x76, 0x1c, 0xcf, 0x4b, 0xe2, 0x52, 0xdd, 0xdb, 0x4c, 0x74, 0xda, 0x9f, 0x0d, + 0x00, 0x93, 0xec, 0xda, 0x21, 0x02, 0x45, 0xa9, 0xcd, 0x2b, 0x46, 0xed, 0xca, 0x99, 0x16, 0x23, + 0x18, 0x7c, 0x9a, 0xb2, 0x13, 0x4d, 0xeb, 0xca, 0x54, 0x3b, 0x91, 0x58, 0xd2, 0xcf, 0xda, 0xa7, + 0x02, 0x28, 0x2a, 0x3f, 0x90, 0x81, 0x19, 0xbd, 0x91, 0xf0, 0x6e, 0x5a, 0xfe, 0x94, 0xed, 0x37, + 0xed, 0xb3, 0x20, 0x91, 0x8e, 0x7d, 0xe7, 0xc3, 0xcf, 0x7f, 0x5f, 0xf3, 0x37, 0xe1, 0x22, 0x4e, + 0xbd, 0x2d, 0x5c, 0xab, 0xfc, 0x30, 0x80, 0x99, 0x3d, 0x98, 0x70, 0xe3, 0x14, 0x85, 0xa9, 0xab, + 0x62, 0x3e, 0x3a, 0x67, 0x97, 0xb6, 0xba, 0xa1, 0xac, 0x22, 0xb8, 0x9a, 0xb6, 0x2a, 0x64, 0x67, + 0x6b, 0xb2, 0x17, 0xe9, 0x57, 0x02, 0xb6, 0x41, 0x41, 0xd2, 0x42, 0x2b, 0x23, 0x8c, 0xd8, 0x54, + 0x35, 0xb3, 0xae, 0xe5, 0x4d, 0x25, 0x5f, 0x86, 0xf0, 0x64, 0x52, 0xd0, 0x05, 0x45, 0x35, 0x2b, + 0x30, 0x8b, 0x25, 0x9e, 0x51, 0xb3, 0x96, 0x0d, 0xd0, 0x3a, 0xb7, 0x95, 0xce, 0x22, 0x5c, 0x38, + 0xa9, 0xc3, 0x1b, 0xcf, 0x0e, 0x47, 0x96, 0x71, 0x34, 0xb2, 0x8c, 0xbf, 0x23, 0xcb, 0xf8, 0x32, + 0xb6, 0x72, 0x47, 0x63, 0x2b, 0xf7, 0x6b, 0x6c, 0xe5, 0xde, 0xa0, 0xa9, 0xeb, 0x7d, 0xa0, 0xc9, + 0xd4, 0x9a, 0x3b, 0x57, 0xd5, 0x1f, 0xc7, 0xfa, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x88, + 0x7c, 0xcc, 0xfc, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -400,6 +501,8 @@ type QueryClient interface { Swapped(ctx context.Context, in *QuerySwappedRequest, opts ...grpc.CallOption) (*QuerySwappedResponse, error) // TotalSwappableToCoinAmount queries the current swappable amount for to-coin. TotalSwappableToCoinAmount(ctx context.Context, in *QueryTotalSwappableToCoinAmountRequest, opts ...grpc.CallOption) (*QueryTotalSwappableToCoinAmountResponse, error) + // Swap queries a swap + Swap(ctx context.Context, in *QuerySwapRequest, opts ...grpc.CallOption) (*QuerySwapResponse, error) // Swaps queries all the swap that registered Swaps(ctx context.Context, in *QuerySwapsRequest, opts ...grpc.CallOption) (*QuerySwapsResponse, error) } @@ -430,6 +533,15 @@ func (c *queryClient) TotalSwappableToCoinAmount(ctx context.Context, in *QueryT return out, nil } +func (c *queryClient) Swap(ctx context.Context, in *QuerySwapRequest, opts ...grpc.CallOption) (*QuerySwapResponse, error) { + out := new(QuerySwapResponse) + err := c.cc.Invoke(ctx, "/lbm.fswap.v1.Query/Swap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Swaps(ctx context.Context, in *QuerySwapsRequest, opts ...grpc.CallOption) (*QuerySwapsResponse, error) { out := new(QuerySwapsResponse) err := c.cc.Invoke(ctx, "/lbm.fswap.v1.Query/Swaps", in, out, opts...) @@ -446,6 +558,8 @@ type QueryServer interface { Swapped(context.Context, *QuerySwappedRequest) (*QuerySwappedResponse, error) // TotalSwappableToCoinAmount queries the current swappable amount for to-coin. TotalSwappableToCoinAmount(context.Context, *QueryTotalSwappableToCoinAmountRequest) (*QueryTotalSwappableToCoinAmountResponse, error) + // Swap queries a swap + Swap(context.Context, *QuerySwapRequest) (*QuerySwapResponse, error) // Swaps queries all the swap that registered Swaps(context.Context, *QuerySwapsRequest) (*QuerySwapsResponse, error) } @@ -460,6 +574,9 @@ func (*UnimplementedQueryServer) Swapped(ctx context.Context, req *QuerySwappedR func (*UnimplementedQueryServer) TotalSwappableToCoinAmount(ctx context.Context, req *QueryTotalSwappableToCoinAmountRequest) (*QueryTotalSwappableToCoinAmountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalSwappableToCoinAmount not implemented") } +func (*UnimplementedQueryServer) Swap(ctx context.Context, req *QuerySwapRequest) (*QuerySwapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Swap not implemented") +} func (*UnimplementedQueryServer) Swaps(ctx context.Context, req *QuerySwapsRequest) (*QuerySwapsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Swaps not implemented") } @@ -504,6 +621,24 @@ func _Query_TotalSwappableToCoinAmount_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _Query_Swap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySwapRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Swap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lbm.fswap.v1.Query/Swap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Swap(ctx, req.(*QuerySwapRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Swaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QuerySwapsRequest) if err := dec(in); err != nil { @@ -534,6 +669,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TotalSwappableToCoinAmount", Handler: _Query_TotalSwappableToCoinAmount_Handler, }, + { + MethodName: "Swap", + Handler: _Query_Swap_Handler, + }, { MethodName: "Swaps", Handler: _Query_Swaps_Handler, @@ -693,6 +832,76 @@ func (m *QueryTotalSwappableToCoinAmountResponse) MarshalToSizedBuffer(dAtA []by return len(dAtA) - i, nil } +func (m *QuerySwapRequest) 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 *QuerySwapRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ToDenom) > 0 { + i -= len(m.ToDenom) + copy(dAtA[i:], m.ToDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ToDenom))) + i-- + dAtA[i] = 0x12 + } + if len(m.FromDenom) > 0 { + i -= len(m.FromDenom) + copy(dAtA[i:], m.FromDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FromDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySwapResponse) 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 *QuerySwapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Swap.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 *QuerySwapsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -846,6 +1055,34 @@ func (m *QueryTotalSwappableToCoinAmountResponse) Size() (n int) { return n } +func (m *QuerySwapRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ToDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySwapResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Swap.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QuerySwapsRequest) Size() (n int) { if m == nil { return 0 @@ -1311,6 +1548,203 @@ func (m *QueryTotalSwappableToCoinAmountResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySwapRequest) 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: QuerySwapRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromDenom", 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.FromDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToDenom", 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.ToDenom = 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 *QuerySwapResponse) 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: QuerySwapResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Swap", 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 err := m.Swap.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 *QuerySwapsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/fswap/types/query.pb.gw.go b/x/fswap/types/query.pb.gw.go index 00786290bd..5442d360f7 100644 --- a/x/fswap/types/query.pb.gw.go +++ b/x/fswap/types/query.pb.gw.go @@ -103,6 +103,42 @@ func local_request_Query_TotalSwappableToCoinAmount_0(ctx context.Context, marsh } +var ( + filter_Query_Swap_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Swap_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Swap_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Swap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Swap_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Swap_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Swap(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_Swaps_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -185,6 +221,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Swap_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_Swap_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_Swap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Swaps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -286,6 +342,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Swap_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_Swap_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_Swap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Swaps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -314,6 +390,8 @@ var ( pattern_Query_TotalSwappableToCoinAmount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fswap", "v1", "total_swappable_to_coin_amount"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Swap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fswap", "v1", "swap"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Swaps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"lbm", "fswap", "v1", "swaps"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -322,5 +400,7 @@ var ( forward_Query_TotalSwappableToCoinAmount_0 = runtime.ForwardResponseMessage + forward_Query_Swap_0 = runtime.ForwardResponseMessage + forward_Query_Swaps_0 = runtime.ForwardResponseMessage )