diff --git a/CHANGELOG.md b/CHANGELOG.md index 3651e805c0..305c380880 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,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 * chore(deps) [\#1141](https://github.com/Finschia/finschia-sdk/pull/1141) Bump github.com/cosmos/ledger-cosmos-go from 0.12.2 to 0.13.2 to fix ledger signing issue diff --git a/client/docs/config.json b/client/docs/config.json index 6670e56370..ed7ab27e15 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -179,6 +179,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 e91fe4bf05..6d6d52c205 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: @@ -3139,7 +3127,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: @@ -3329,7 +3317,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 @@ -3897,7 +3885,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: @@ -4176,7 +4164,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: @@ -4378,12 +4366,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: @@ -4799,7 +4786,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: @@ -5034,7 +5021,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 @@ -5045,10 +5031,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 @@ -5274,7 +5259,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: @@ -5514,7 +5499,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 @@ -5525,7 +5509,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Service /cosmos/distribution/v1beta1/community_pool: @@ -5563,7 +5546,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5586,7 +5569,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 @@ -5650,7 +5633,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: @@ -5679,7 +5662,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 @@ -5712,7 +5695,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: @@ -5746,7 +5729,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 @@ -5767,7 +5750,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: @@ -5796,7 +5779,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 @@ -5813,7 +5796,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: @@ -5864,12 +5847,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: @@ -5892,7 +5874,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 @@ -5928,7 +5910,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: @@ -5957,7 +5939,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 @@ -6000,7 +5982,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6029,7 +6011,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 @@ -6082,7 +6064,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: @@ -6171,7 +6153,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 @@ -6182,7 +6163,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/evidence/v1beta1/evidence: @@ -6397,7 +6377,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6632,7 +6612,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 @@ -6643,10 +6622,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 @@ -6831,7 +6809,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: @@ -7028,7 +7006,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 @@ -7101,7 +7079,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: @@ -7592,7 +7570,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -7863,7 +7841,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 @@ -7874,10 +7851,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 @@ -8143,7 +8119,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: @@ -8340,7 +8316,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 @@ -8405,7 +8381,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: @@ -8646,7 +8622,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 @@ -8657,10 +8632,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, @@ -8706,7 +8680,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: @@ -8908,7 +8882,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 @@ -8936,7 +8910,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: @@ -9133,7 +9107,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 @@ -9231,7 +9205,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: @@ -9472,7 +9446,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 @@ -9483,12 +9456,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': @@ -9563,7 +9535,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: @@ -9785,7 +9757,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: @@ -9828,7 +9800,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9888,7 +9860,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: @@ -9937,7 +9909,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: @@ -10005,7 +9977,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: @@ -10071,7 +10043,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 @@ -10125,7 +10096,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10193,7 +10164,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 @@ -10204,10 +10174,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 @@ -10248,7 +10217,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 @@ -10277,7 +10245,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10306,7 +10274,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 @@ -10393,7 +10361,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: @@ -10633,7 +10601,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 @@ -10644,10 +10611,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 @@ -10794,7 +10760,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11044,7 +11010,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 @@ -11055,10 +11020,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 @@ -11147,7 +11111,7 @@ paths: Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11387,7 +11351,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 @@ -11398,10 +11361,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 @@ -11602,7 +11564,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -11749,7 +11710,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: @@ -11989,7 +11950,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 @@ -12000,10 +11960,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 @@ -12200,7 +12159,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -12327,7 +12285,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: @@ -12528,7 +12486,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 @@ -12809,7 +12767,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -12940,7 +12897,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13177,7 +13134,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: @@ -13387,7 +13344,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: @@ -13776,7 +13733,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -13923,7 +13879,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: @@ -14163,7 +14119,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 @@ -14174,10 +14129,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 @@ -14372,7 +14326,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -14499,7 +14452,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: @@ -14695,7 +14648,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 @@ -14777,7 +14730,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: @@ -15017,7 +14970,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 @@ -15028,10 +14980,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 @@ -15093,7 +15044,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: @@ -15294,7 +15245,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 @@ -15359,7 +15310,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15560,7 +15511,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 @@ -15647,7 +15598,7 @@ paths: Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15887,7 +15838,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 @@ -15898,7 +15848,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/tx/v1beta1/simulate: @@ -15963,7 +15912,6 @@ paths: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -15984,7 +15932,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: @@ -16190,7 +16138,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16433,7 +16381,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 @@ -16444,7 +16391,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. @@ -16488,7 +16434,7 @@ paths: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: >- @@ -16760,7 +16706,6 @@ paths: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -16796,7 +16741,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: @@ -17020,7 +16965,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: 'Since: cosmos-sdk 0.45.2' @@ -17031,7 +16976,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17272,7 +17217,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 @@ -17283,10 +17227,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 @@ -17296,7 +17239,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17486,13 +17429,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 @@ -17512,7 +17455,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17949,7 +17892,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18178,7 +18121,7 @@ paths: Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18377,7 +18320,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 @@ -18408,7 +18351,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18609,7 +18552,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': @@ -18830,7 +18773,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: @@ -19080,7 +19023,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 @@ -19091,10 +19033,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' @@ -19323,7 +19264,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: @@ -19562,7 +19503,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 @@ -19573,12 +19513,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: @@ -19805,7 +19744,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: @@ -20044,7 +19983,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 @@ -20055,7 +19993,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /lbm/foundation/v1/censorships: @@ -20109,7 +20046,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: @@ -20344,7 +20281,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 @@ -20355,7 +20291,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /lbm/foundation/v1/foundation_info: @@ -20568,7 +20503,7 @@ paths: QueryFoundationInfoResponse is the Query/FoundationInfo response type. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20811,7 +20746,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: @@ -21046,7 +20981,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 @@ -21057,10 +20991,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 @@ -21092,7 +21025,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: @@ -21287,9 +21220,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': @@ -21497,7 +21430,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: @@ -21743,7 +21676,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 @@ -21754,7 +21686,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /lbm/foundation/v1/params: @@ -21777,7 +21708,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: @@ -22292,7 +22223,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: @@ -22527,7 +22458,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 @@ -22538,10 +22468,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 @@ -22844,7 +22773,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: @@ -23041,7 +22970,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 @@ -23069,7 +22998,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: @@ -23266,7 +23195,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 @@ -23331,7 +23260,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: @@ -23572,7 +23501,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 @@ -23583,10 +23511,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 @@ -23628,7 +23555,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: @@ -23862,7 +23789,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: @@ -24052,7 +23979,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 @@ -24092,7 +24019,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. @@ -24101,7 +24027,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: @@ -24130,7 +24056,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 @@ -24149,7 +24075,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: @@ -24183,7 +24109,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 @@ -24200,7 +24126,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: @@ -24229,7 +24155,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 @@ -24280,7 +24206,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: @@ -24358,7 +24284,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 @@ -24369,10 +24294,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 @@ -24389,7 +24313,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: @@ -24418,7 +24342,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 @@ -24435,7 +24359,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: @@ -24464,7 +24388,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 @@ -24494,7 +24418,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: @@ -24690,7 +24614,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 @@ -24737,7 +24661,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: @@ -24982,7 +24906,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 @@ -24993,10 +24916,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 @@ -25022,7 +24944,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: @@ -25228,7 +25150,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 @@ -25247,7 +25169,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: @@ -25448,7 +25370,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 @@ -25467,7 +25389,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: @@ -25668,7 +25590,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 @@ -25687,7 +25609,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: @@ -25888,7 +25810,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 @@ -25942,7 +25864,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: @@ -26187,7 +26109,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 @@ -26198,10 +26119,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 @@ -26252,7 +26172,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: @@ -26497,7 +26417,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 @@ -26508,10 +26427,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 @@ -26523,13 +26441,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: @@ -26730,7 +26647,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 @@ -26760,7 +26677,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: @@ -26961,7 +26878,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 @@ -26991,7 +26908,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: @@ -27192,7 +27109,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 @@ -27215,7 +27132,7 @@ paths: Since: 0.46.0 (finschia) default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27416,7 +27333,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 @@ -27451,7 +27368,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: @@ -27654,7 +27571,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 @@ -27673,7 +27590,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: @@ -27876,7 +27793,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 @@ -27895,7 +27812,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: @@ -28098,7 +28015,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 @@ -28117,7 +28034,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: @@ -28320,7 +28237,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 @@ -28505,7 +28422,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: @@ -28706,7 +28623,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 @@ -28805,7 +28722,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: @@ -29010,7 +28927,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 @@ -29131,7 +29048,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: @@ -29370,7 +29287,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 @@ -29381,10 +29297,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 @@ -29507,7 +29422,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: @@ -29746,7 +29661,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 @@ -29757,7 +29671,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/base/node/v1beta1/config: @@ -29776,7 +29689,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: @@ -29814,7 +29727,7 @@ paths: items: type: string default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29837,13 +29750,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 @@ -29856,7 +29769,7 @@ paths: role: type: string default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29949,7 +29862,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: @@ -30043,7 +29956,7 @@ paths: was set, its value is undefined otherwise default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30111,7 +30024,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 @@ -30122,10 +30034,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 @@ -30171,7 +30082,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: @@ -30201,7 +30112,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 @@ -30238,7 +30149,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: @@ -30268,9 +30179,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': @@ -30302,7 +30213,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: @@ -30337,7 +30248,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 @@ -30352,7 +30263,7 @@ paths: items: type: string default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30398,7 +30309,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30421,7 +30332,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 @@ -30447,7 +30358,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30482,7 +30393,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 @@ -30528,7 +30439,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 @@ -30537,7 +30447,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: @@ -30572,7 +30482,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 @@ -30588,7 +30498,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30617,7 +30527,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 @@ -30661,7 +30571,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 @@ -30670,7 +30579,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: @@ -30718,7 +30627,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30765,7 +30674,7 @@ paths: type: string format: uint64 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30824,7 +30733,7 @@ paths: BridgeStatusMetadata defines the metadata of the bridge status. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30847,6 +30756,328 @@ paths: 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: + 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 definitions: cosmos.auth.v1beta1.Params: type: object @@ -31449,7 +31680,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 @@ -31462,7 +31692,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. @@ -31935,7 +32164,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -31943,7 +32171,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 @@ -32190,7 +32417,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -32198,7 +32424,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 @@ -32313,7 +32538,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). @@ -33721,7 +33945,6 @@ definitions: properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. @@ -36587,7 +36810,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 @@ -36718,7 +36940,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 @@ -38668,7 +38889,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 @@ -38727,7 +38947,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 @@ -38806,7 +39025,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 @@ -38852,7 +39070,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: >- @@ -38873,7 +39091,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: >- @@ -39221,7 +39439,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -39756,7 +39973,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -40054,7 +40270,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -40460,7 +40675,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -41054,7 +41268,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -41421,7 +41634,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -42000,7 +42212,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -42203,7 +42414,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -42260,7 +42470,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -42513,7 +42723,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -42737,7 +42946,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -42997,7 +43206,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -43687,7 +43895,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -43947,7 +44155,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -44008,7 +44215,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -44272,7 +44479,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -44723,7 +44929,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -45894,8 +46099,7 @@ definitions: format: byte index: type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' + description: EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to @@ -45914,8 +46118,7 @@ definitions: format: byte index: type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' + description: EventAttribute is a single key-value pair, associated with an event. cosmos.upgrade.v1beta1.ModuleVersion: type: object properties: @@ -49219,7 +49422,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: @@ -49300,7 +49502,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: >- @@ -49383,7 +49584,6 @@ definitions: properties: authorized: type: boolean - format: boolean title: >- QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method @@ -49676,7 +49876,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 @@ -49714,7 +49913,6 @@ definitions: properties: authorized: type: boolean - format: boolean description: >- QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method. @@ -50505,7 +50703,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. @@ -50582,7 +50779,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. @@ -50705,7 +50901,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 @@ -50741,7 +50937,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 @@ -50809,7 +51005,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. @@ -50879,7 +51074,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: @@ -50906,7 +51101,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 @@ -50947,3 +51142,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 51e5e676ea..4242e7621a 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -968,6 +968,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) @@ -14356,6 +14358,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 @@ -14465,6 +14498,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 )