From 80bf29aefd086dc38134c505ba355edd11456561 Mon Sep 17 00:00:00 2001 From: mattverse Date: Wed, 20 Jul 2022 21:53:29 +0900 Subject: [PATCH 01/11] Stargate query enable --- .../wasm/v1/stargate/auth/query.proto | 35 + .../wasm/v1/stargate/bank/query.proto | 86 + .../wasm/v1/stargate/distribution/query.proto | 95 + .../wasm/v1/stargate/feegrant/query.proto | 25 + .../cosmwasm/wasm/v1/stargate/gov/query.proto | 72 + .../wasm/v1/stargate/mint/query.proto | 33 + .../wasm/v1/stargate/slashing/query.proto | 30 + .../wasm/v1/stargate/staking/query.proto | 131 + x/wasm/keeper/query_plugins.go | 56 +- x/wasm/keeper/stargate_bindings.go | 97 + x/wasm/stargate/auth/query.pb.go | 791 ++++ x/wasm/stargate/bank/query.pb.go | 1914 ++++++++++ x/wasm/stargate/distribution/query.pb.go | 1963 ++++++++++ x/wasm/stargate/feegrant/query.pb.go | 603 +++ x/wasm/stargate/gov/query.pb.go | 1935 ++++++++++ x/wasm/stargate/mint/query.pb.go | 695 ++++ x/wasm/stargate/slashing/query.pb.go | 779 ++++ x/wasm/stargate/staking/query.pb.go | 3226 +++++++++++++++++ 18 files changed, 12564 insertions(+), 2 deletions(-) create mode 100644 proto/cosmwasm/wasm/v1/stargate/auth/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/bank/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/distribution/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/gov/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/mint/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/slashing/query.proto create mode 100644 proto/cosmwasm/wasm/v1/stargate/staking/query.proto create mode 100644 x/wasm/keeper/stargate_bindings.go create mode 100644 x/wasm/stargate/auth/query.pb.go create mode 100644 x/wasm/stargate/bank/query.pb.go create mode 100644 x/wasm/stargate/distribution/query.pb.go create mode 100644 x/wasm/stargate/feegrant/query.pb.go create mode 100644 x/wasm/stargate/gov/query.pb.go create mode 100644 x/wasm/stargate/mint/query.pb.go create mode 100644 x/wasm/stargate/slashing/query.pb.go create mode 100644 x/wasm/stargate/staking/query.pb.go diff --git a/proto/cosmwasm/wasm/v1/stargate/auth/query.proto b/proto/cosmwasm/wasm/v1/stargate/auth/query.proto new file mode 100644 index 0000000000..709b94dbe1 --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/auth/query.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.auth; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos/auth/v1beta1/auth.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/auth"; + +// QueryAccountsResponse is the response type for the Query/Accounts RPC method. +// +// Since: cosmos-sdk 0.43 +message QueryAccountsResponse { + // accounts are the existing accounts + repeated google.protobuf.Any accounts = 1 + [ (cosmos_proto.accepts_interface) = "AccountI" ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryAccountResponse is the response type for the Query/Account RPC method. +message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 + [ (cosmos_proto.accepts_interface) = "AccountI" ]; +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + cosmos.auth.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/bank/query.proto b/proto/cosmwasm/wasm/v1/stargate/bank/query.proto new file mode 100644 index 0000000000..392453dd15 --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/bank/query.proto @@ -0,0 +1,86 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.bank; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/bank"; + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +message QueryBalanceResponse { + // balance is the balance of the coin. + cosmos.base.v1beta1.Coin balance = 1; +} + +// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +// method. +message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QuerySpendableBalancesResponse defines the gRPC response structure for +// querying an account's spendable balances. +message QuerySpendableBalancesResponse { + // balances is the spendable balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +// method +message QueryTotalSupplyResponse { + // supply is the supply of the coins + repeated cosmos.base.v1beta1.Coin supply = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // pagination defines the pagination in the response. + // + // Since: cosmos-sdk 0.43 + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +message QuerySupplyOfResponse { + // amount is the supply of the coin. + cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryParamsResponse defines the response type for querying x/bank parameters. +message QueryParamsResponse { + cosmos.bank.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata +// RPC method. +message QueryDenomsMetadataResponse { + // metadata provides the client information for all the registered tokens. + repeated cosmos.bank.v1beta1.Metadata metadatas = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata +// RPC method. +message QueryDenomMetadataResponse { + // metadata describes and provides all the client information for the + // requested token. + cosmos.bank.v1beta1.Metadata metadata = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/distribution/query.proto b/proto/cosmwasm/wasm/v1/stargate/distribution/query.proto new file mode 100644 index 0000000000..50cbeba355 --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/distribution/query.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.distribution; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/distribution/v1beta1/distribution.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/distribution"; + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + cosmos.distribution.v1beta1.Params params = 1 + [ (gogoproto.nullable) = false ]; +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsResponse { + cosmos.distribution.v1beta1.ValidatorOutstandingRewards rewards = 1 + [ (gogoproto.nullable) = false ]; +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionResponse { + // commission defines the commision the validator received. + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission commission = 1 + [ (gogoproto.nullable) = false ]; +} + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +message QueryValidatorSlashesResponse { + // slashes defines the slashes the validator received. + repeated cosmos.distribution.v1beta1.ValidatorSlashEvent slashes = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsResponse { + // rewards defines the rewards accrued by a delegation. + repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsResponse { + // rewards defines all the rewards accrued by a delegator. + repeated cosmos.distribution.v1beta1.DelegationDelegatorReward rewards = 1 + [ (gogoproto.nullable) = false ]; + // total defines the sum of all the rewards. + repeated cosmos.base.v1beta1.DecCoin total = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validators defines the validators a delegator is delegating for. + repeated string validators = 1; +} + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // withdraw_address defines the delegator address to query for. + string withdraw_address = 1; +} + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +message QueryCommunityPoolResponse { + // pool defines community pool's coins. + repeated cosmos.base.v1beta1.DecCoin pool = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto b/proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto new file mode 100644 index 0000000000..ab7757fabf --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto @@ -0,0 +1,25 @@ +// Since: cosmos-sdk 0.43 +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.feegrant; + +import "cosmos/feegrant/v1beta1/feegrant.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/feegrant"; + +// QueryAllowanceResponse is the response type for the Query/Allowance RPC +// method. +message QueryAllowanceResponse { + // allowance is a allowance granted for grantee by granter. + cosmos.feegrant.v1beta1.Grant allowance = 1; +} + +// QueryAllowancesResponse is the response type for the Query/Allowances RPC +// method. +message QueryAllowancesResponse { + // allowances are allowance's granted for grantee by granter. + repeated cosmos.feegrant.v1beta1.Grant allowances = 1; + + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/gov/query.proto b/proto/cosmwasm/wasm/v1/stargate/gov/query.proto new file mode 100644 index 0000000000..4cf6bd7dee --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/gov/query.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.gov; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/gov/v1beta1/gov.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/gov"; + +// QueryProposalResponse is the response type for the Query/Proposal RPC method. +message QueryProposalResponse { + cosmos.gov.v1beta1.Proposal proposal = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. +message QueryProposalsResponse { + repeated cosmos.gov.v1beta1.Proposal proposals = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVoteResponse is the response type for the Query/Vote RPC method. +message QueryVoteResponse { + // vote defined the queried vote. + cosmos.gov.v1beta1.Vote vote = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryVotesResponse is the response type for the Query/Votes RPC method. +message QueryVotesResponse { + // votes defined the queried votes. + repeated cosmos.gov.v1beta1.Vote votes = 1 [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // voting_params defines the parameters related to voting. + cosmos.gov.v1beta1.VotingParams voting_params = 1 + [ (gogoproto.nullable) = false ]; + // deposit_params defines the parameters related to deposit. + cosmos.gov.v1beta1.DepositParams deposit_params = 2 + [ (gogoproto.nullable) = false ]; + // tally_params defines the parameters related to tally. + cosmos.gov.v1beta1.TallyParams tally_params = 3 + [ (gogoproto.nullable) = false ]; +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +message QueryDepositResponse { + // deposit defines the requested deposit. + cosmos.gov.v1beta1.Deposit deposit = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +message QueryDepositsResponse { + repeated cosmos.gov.v1beta1.Deposit deposits = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +message QueryTallyResultResponse { + // tally defines the requested tally. + cosmos.gov.v1beta1.TallyResult tally = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/mint/query.proto b/proto/cosmwasm/wasm/v1/stargate/mint/query.proto new file mode 100644 index 0000000000..2ac3779e7d --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/mint/query.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.mint; + +import "gogoproto/gogo.proto"; +import "cosmos/mint/v1beta1/mint.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/mint"; + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + cosmos.mint.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. +message QueryInflationResponse { + // inflation is the current minting inflation value. + bytes inflation = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. +message QueryAnnualProvisionsResponse { + // annual_provisions is the current minting annual provisions value. + bytes annual_provisions = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/slashing/query.proto b/proto/cosmwasm/wasm/v1/stargate/slashing/query.proto new file mode 100644 index 0000000000..58fa9daea3 --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/slashing/query.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.slashing; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/slashing/v1beta1/slashing.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/slashing"; + +// QueryParamsResponse is the response type for the Query/Params RPC method +message QueryParamsResponse { + cosmos.slashing.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; +} + +// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +// method +message QuerySigningInfoResponse { + // val_signing_info is the signing info of requested val cons address + cosmos.slashing.v1beta1.ValidatorSigningInfo val_signing_info = 1 + [ (gogoproto.nullable) = false ]; +} + +// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +// method +message QuerySigningInfosResponse { + // info is the signing info of all validators + repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 + [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmwasm/wasm/v1/stargate/staking/query.proto b/proto/cosmwasm/wasm/v1/stargate/staking/query.proto new file mode 100644 index 0000000000..5b694b8bac --- /dev/null +++ b/proto/cosmwasm/wasm/v1/stargate/staking/query.proto @@ -0,0 +1,131 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1.stargate.staking; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/staking"; + +// QueryValidatorsResponse is response type for the Query/Validators RPC method +message QueryValidatorsResponse { + // validators contains all the queried validators. + repeated cosmos.staking.v1beta1.Validator validators = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryValidatorResponse is response type for the Query/Validator RPC method +message QueryValidatorResponse { + // validator defines the the validator info. + cosmos.staking.v1beta1.Validator validator = 1 + [ (gogoproto.nullable) = false ]; +} + +// QueryValidatorDelegationsResponse is response type for the +// Query/ValidatorDelegations RPC method +message QueryValidatorDelegationsResponse { + repeated cosmos.staking.v1beta1.DelegationResponse delegation_responses = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = + "github.com/cosmos/cosmos-sdk/x/staking/types.DelegationResponses" + ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryValidatorUnbondingDelegationsResponse is response type for the +// Query/ValidatorUnbondingDelegations RPC method. +message QueryValidatorUnbondingDelegationsResponse { + repeated cosmos.staking.v1beta1.UnbondingDelegation unbonding_responses = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationResponse is response type for the Query/Delegation RPC method. +message QueryDelegationResponse { + // delegation_responses defines the delegation info of a delegation. + cosmos.staking.v1beta1.DelegationResponse delegation_response = 1; +} + +// QueryDelegationResponse is response type for the Query/UnbondingDelegation +// RPC method. +message QueryUnbondingDelegationResponse { + // unbond defines the unbonding information of a delegation. + cosmos.staking.v1beta1.UnbondingDelegation unbond = 1 + [ (gogoproto.nullable) = false ]; +} + +// QueryDelegatorDelegationsResponse is response type for the +// Query/DelegatorDelegations RPC method. +message QueryDelegatorDelegationsResponse { + // delegation_responses defines all the delegations' info of a delegator. + repeated cosmos.staking.v1beta1.DelegationResponse delegation_responses = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryUnbondingDelegatorDelegationsResponse is response type for the +// Query/UnbondingDelegatorDelegations RPC method. +message QueryDelegatorUnbondingDelegationsResponse { + repeated cosmos.staking.v1beta1.UnbondingDelegation unbonding_responses = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +// method. +message QueryRedelegationsResponse { + repeated cosmos.staking.v1beta1.RedelegationResponse redelegation_responses = + 1 [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorValidatorsResponse is response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + // validators defines the the validators' info of a delegator. + repeated cosmos.staking.v1beta1.Validator validators = 1 + [ (gogoproto.nullable) = false ]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorValidatorResponse response type for the +// Query/DelegatorValidator RPC method. +message QueryDelegatorValidatorResponse { + // validator defines the the validator info. + cosmos.staking.v1beta1.Validator validator = 1 + [ (gogoproto.nullable) = false ]; +} + +// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +// method. +message QueryHistoricalInfoResponse { + // hist defines the historical info at the given height. + cosmos.staking.v1beta1.HistoricalInfo hist = 1; +} + +// QueryPoolResponse is response type for the Query/Pool RPC method. +message QueryPoolResponse { + // pool defines the pool info. + cosmos.staking.v1beta1.Pool pool = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + cosmos.staking.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index 371242d00a..c4b935ffe7 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -3,8 +3,11 @@ package keeper import ( "encoding/json" "errors" + "fmt" "github.com/cosmos/cosmos-sdk/baseapp" + proto "github.com/gogo/protobuf/proto" + abci "github.com/tendermint/tendermint/abci/types" channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" @@ -279,8 +282,32 @@ func IBCQuerier(wasm contractMetaDataSource, channelKeeper types.ChannelKeeper) } func StargateQuerier(queryRouter GRPCQueryRouter) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - return func(ctx sdk.Context, msg *wasmvmtypes.StargateQuery) ([]byte, error) { - return nil, wasmvmtypes.UnsupportedRequest{Kind: "Stargate queries are disabled."} + return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { + binding, whitelisted := StargateLayerBindings.Load(request.Path) + if !whitelisted { + return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)} + } + + route := queryRouter.Route(request.Path) + if route == nil { + return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("No route to query '%s'", request.Path)} + } + + res, err := route(ctx, abci.RequestQuery{ + Data: request.Data, + Path: request.Path, + }) + if err != nil { + return nil, err + } + + // normalize response to ensure backward compatibility + bz, err := NormalizeReponses(binding, res.Value) + if err != nil { + return nil, err + } + + return bz, nil } } @@ -527,6 +554,31 @@ func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin { } } +func NormalizeReponses(binding interface{}, bz []byte) ([]byte, error) { + // all values are proto message + message, ok := binding.(proto.Message) + if !ok { + return nil, wasmvmtypes.Unknown{} + } + + // unmarshal binary into stargate response data structure + err := proto.Unmarshal(bz, message) + if err != nil { + return nil, wasmvmtypes.Unknown{} + } + + // build new deterministic response + bz, err = proto.Marshal(message) + if err != nil { + return nil, wasmvmtypes.Unknown{} + } + + // clear proto message + message.Reset() + + return bz, nil +} + var _ WasmVMQueryHandler = WasmVMQueryHandlerFn(nil) // WasmVMQueryHandlerFn is a helper to construct a function based query handler. diff --git a/x/wasm/keeper/stargate_bindings.go b/x/wasm/keeper/stargate_bindings.go new file mode 100644 index 0000000000..36d1d5d5cf --- /dev/null +++ b/x/wasm/keeper/stargate_bindings.go @@ -0,0 +1,97 @@ +package keeper + +//DONTCOVER + +import ( + "sync" + + "github.com/CosmWasm/wasmd/x/wasm/stargate/auth" + "github.com/CosmWasm/wasmd/x/wasm/stargate/bank" + distr "github.com/CosmWasm/wasmd/x/wasm/stargate/distribution" + "github.com/CosmWasm/wasmd/x/wasm/stargate/feegrant" + "github.com/CosmWasm/wasmd/x/wasm/stargate/gov" + "github.com/CosmWasm/wasmd/x/wasm/stargate/mint" + "github.com/CosmWasm/wasmd/x/wasm/stargate/slashing" + "github.com/CosmWasm/wasmd/x/wasm/stargate/staking" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +// StargateLayerBindings keeps whitelist and its deterministic +// response binding for stargate queries. +// +// The query can be multi-thread, so we have to use +// thread safe sync.Map instead map[string]bool. +var StargateLayerBindings sync.Map + +func init() { + // auth + StargateLayerBindings.Store("/cosmos.auth.v1beta1.Query/Account", &auth.QueryAccountResponse{}) + StargateLayerBindings.Store("/cosmos.auth.v1beta1.Query/Accounts", &auth.QueryAccountsResponse{}) + StargateLayerBindings.Store("/cosmos.auth.v1beta1.Query/Params", &auth.QueryParamsResponse{}) + + // authz + StargateLayerBindings.Store("/cosmos.authz.v1beta1.Query/Grants", &authz.QueryGrantsResponse{}) + StargateLayerBindings.Store("/cosmos.authz.v1beta1.Query/GranterGrants", &authz.QueryGranterGrantsResponse{}) + StargateLayerBindings.Store("/cosmos.authz.v1beta1.Query/GranteeGrants", &authz.QueryGranteeGrantsResponse{}) + + // bank + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/Balance", &bank.QueryBalanceResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/AllBalances", &bank.QueryAllBalancesResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/SpendableBalances", &bank.QuerySpendableBalancesResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/TotalSupply", &bank.QueryTotalSupplyResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/SupplyOf", &bank.QuerySupplyOfResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/Params", &bank.QueryParamsResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/DenomMetadata", &bank.QueryDenomMetadataResponse{}) + StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/DenomsMetadata", &bank.QueryDenomsMetadataResponse{}) + + // distribution + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/Params", &distr.QueryParamsResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", &distr.QueryValidatorOutstandingRewardsResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/ValidatorCommission", &distr.QueryValidatorCommissionResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/ValidatorSlashes", &distr.QueryValidatorSlashesResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegationRewards", &distr.QueryDelegationRewardsResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", &distr.QueryDelegationTotalRewardsResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegatorValidators", &distr.QueryDelegatorValidatorsResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", &distr.QueryDelegatorWithdrawAddressResponse{}) + StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/CommunityPool", &distr.QueryCommunityPoolResponse{}) + + // feegrant + StargateLayerBindings.Store("/cosmos.feegrant.v1beta1.Query/Allowance", &feegrant.QueryAllowanceResponse{}) + StargateLayerBindings.Store("/cosmos.feegrant.v1beta1.Query/Allowances", &feegrant.QueryAllowancesResponse{}) + + // gov + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Proposal", &gov.QueryProposalResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Proposals", &gov.QueryProposalsResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Vote", &gov.QueryVoteResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Votes", &gov.QueryVotesResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Params", &gov.QueryParamsResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Deposit", &gov.QueryDepositResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Deposits", &gov.QueryDepositsResponse{}) + StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/TallyResult", &gov.QueryTallyResultResponse{}) + + // mint + StargateLayerBindings.Store("/cosmos.mint.v1beta1.Query/AnnualProvisions", &mint.QueryAnnualProvisionsResponse{}) + StargateLayerBindings.Store("/cosmos.mint.v1beta1.Query/Inflation", &mint.QueryInflationResponse{}) + StargateLayerBindings.Store("/cosmos.mint.v1beta1.Query/Params", &mint.QueryParamsResponse{}) + + // slashing + StargateLayerBindings.Store("/cosmos.slashing.v1beta1.Query/Params", &slashing.QueryParamsResponse{}) + StargateLayerBindings.Store("/cosmos.slashing.v1beta1.Query/SigningInfo", &slashing.QuerySigningInfoResponse{}) + StargateLayerBindings.Store("/cosmos.slashing.v1beta1.Query/SigningInfos", &slashing.QuerySigningInfosResponse{}) + + // staking + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Validator", &staking.QueryValidatorResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Validators", &staking.QueryValidatorsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/ValidatorDelegations", &staking.QueryValidatorDelegationsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", &staking.QueryValidatorUnbondingDelegationsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Delegation", &staking.QueryDelegationResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/UnbondingDelegation", &staking.QueryUnbondingDelegationResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorDelegations", &staking.QueryDelegatorDelegationsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", &staking.QueryDelegatorUnbondingDelegationsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Redelegations", &staking.QueryRedelegationsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorValidator", &staking.QueryDelegatorValidatorResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorValidators", &staking.QueryDelegatorValidatorsResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/HistoricalInfo", &staking.QueryHistoricalInfoResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Pool", &staking.QueryPoolResponse{}) + StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Params", &staking.QueryParamsResponse{}) +} diff --git a/x/wasm/stargate/auth/query.pb.go b/x/wasm/stargate/auth/query.pb.go new file mode 100644 index 0000000000..1fb8af5c58 --- /dev/null +++ b/x/wasm/stargate/auth/query.pb.go @@ -0,0 +1,791 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/auth/query.proto + +package auth + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + types "github.com/cosmos/cosmos-sdk/codec/types" + query "github.com/cosmos/cosmos-sdk/types/query" + types1 "github.com/cosmos/cosmos-sdk/x/auth/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryAccountsResponse is the response type for the Query/Accounts RPC method. +// +// Since: cosmos-sdk 0.43 +type QueryAccountsResponse struct { + // accounts are the existing accounts + Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } +func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsResponse) ProtoMessage() {} +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_46d60c9da81fdbbf, []int{0} +} + +func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsResponse.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 *QueryAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsResponse.Merge(m, src) +} + +func (m *QueryAccountsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo + +func (m *QueryAccountsResponse) GetAccounts() []*types.Any { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *QueryAccountsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { + // account defines the account of the corresponding address. + Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } +func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_46d60c9da81fdbbf, []int{1} +} + +func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountResponse.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 *QueryAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountResponse.Merge(m, src) +} + +func (m *QueryAccountResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo + +func (m *QueryAccountResponse) GetAccount() *types.Any { + if m != nil { + return m.Account + } + return nil +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params types1.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_46d60c9da81fdbbf, []int{2} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() types1.Params { + if m != nil { + return m.Params + } + return types1.Params{} +} + +func init() { + proto.RegisterType((*QueryAccountsResponse)(nil), "cosmwasm.wasm.v1.stargate.auth.QueryAccountsResponse") + proto.RegisterType((*QueryAccountResponse)(nil), "cosmwasm.wasm.v1.stargate.auth.QueryAccountResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.auth.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/auth/query.proto", fileDescriptor_46d60c9da81fdbbf) +} + +var fileDescriptor_46d60c9da81fdbbf = []byte{ + // 375 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4a, 0x03, 0x31, + 0x10, 0xc6, 0x37, 0x2a, 0xb5, 0xa4, 0x9e, 0x6a, 0x85, 0x5a, 0x21, 0x96, 0x5e, 0x2c, 0x82, 0x09, + 0x5b, 0x4f, 0x82, 0x08, 0xad, 0x07, 0xf5, 0x56, 0x17, 0x41, 0xf0, 0x22, 0xd9, 0x35, 0xa6, 0x05, + 0x77, 0xb3, 0x6e, 0xb2, 0xd5, 0xbe, 0x85, 0x8f, 0xe0, 0x43, 0xf8, 0x10, 0xc5, 0x53, 0x8f, 0x9e, + 0x44, 0xda, 0x17, 0x91, 0xcd, 0x9f, 0xb6, 0xde, 0xbc, 0x84, 0x64, 0x32, 0xdf, 0x37, 0xbf, 0x19, + 0x06, 0x1e, 0x46, 0x42, 0xc6, 0x2f, 0x54, 0xc6, 0x44, 0x1f, 0x23, 0x9f, 0x48, 0x45, 0x33, 0x4e, + 0x15, 0x23, 0x34, 0x57, 0x03, 0xf2, 0x9c, 0xb3, 0x6c, 0x8c, 0xd3, 0x4c, 0x28, 0x51, 0x45, 0x2e, + 0x17, 0xeb, 0x63, 0xe4, 0x63, 0x97, 0x8b, 0x8b, 0xdc, 0x86, 0xf6, 0x12, 0x92, 0x84, 0x54, 0x32, + 0x23, 0x24, 0x23, 0x3f, 0x64, 0x8a, 0xfa, 0x24, 0xa5, 0x7c, 0x98, 0x50, 0x35, 0x14, 0x89, 0xf1, + 0x6a, 0xd4, 0xb8, 0xe0, 0x42, 0x5f, 0x49, 0x71, 0xb3, 0xd1, 0x5d, 0x2e, 0x04, 0x7f, 0x62, 0x44, + 0xbf, 0xc2, 0xfc, 0x91, 0xd0, 0xc4, 0x16, 0x6f, 0x20, 0x6b, 0xae, 0xa9, 0x9c, 0x6d, 0xf1, 0x70, + 0x52, 0xf3, 0x7f, 0x6f, 0x3c, 0xcd, 0xc3, 0x7c, 0xb5, 0xde, 0x01, 0xdc, 0xb9, 0x2e, 0x70, 0xba, + 0x51, 0x24, 0xf2, 0x44, 0xc9, 0x80, 0xc9, 0x54, 0x24, 0x92, 0x55, 0xcf, 0x60, 0x99, 0xda, 0x58, + 0x1d, 0x34, 0xd7, 0xdb, 0x95, 0x4e, 0x0d, 0x1b, 0x04, 0xec, 0x10, 0x70, 0x37, 0x19, 0xf7, 0xb6, + 0x3e, 0x3f, 0x8e, 0xca, 0x56, 0x7d, 0x15, 0x2c, 0x34, 0xd5, 0x0b, 0x08, 0x97, 0x9d, 0xd5, 0xd7, + 0x9a, 0xa0, 0x5d, 0xe9, 0x1c, 0x60, 0x5b, 0xbc, 0x18, 0x03, 0x36, 0xf3, 0xb3, 0xbc, 0xb8, 0x4f, + 0x39, 0x73, 0xc5, 0x83, 0x15, 0x69, 0xeb, 0x06, 0xd6, 0x56, 0x09, 0x17, 0x80, 0xa7, 0x70, 0xd3, + 0x16, 0xab, 0x03, 0xed, 0xfe, 0x1f, 0x3e, 0x27, 0x69, 0xf5, 0xe1, 0xb6, 0x76, 0xed, 0xd3, 0x8c, + 0xc6, 0xcb, 0xae, 0x4f, 0x60, 0x29, 0xd5, 0x11, 0xeb, 0xb9, 0xe7, 0x88, 0xf5, 0x38, 0x97, 0xac, + 0x45, 0x4a, 0x6f, 0x63, 0xf2, 0xbd, 0xef, 0x05, 0x56, 0xd0, 0xbb, 0x9c, 0xcc, 0x10, 0x98, 0xce, + 0x10, 0xf8, 0x99, 0x21, 0xf0, 0x36, 0x47, 0xde, 0x74, 0x8e, 0xbc, 0xaf, 0x39, 0xf2, 0xee, 0x30, + 0x1f, 0xaa, 0x41, 0x1e, 0xe2, 0x48, 0xc4, 0xe4, 0x5c, 0xc8, 0xf8, 0xd6, 0xed, 0xd4, 0x03, 0x79, + 0x35, 0xbb, 0xf5, 0x67, 0xb1, 0xc2, 0x92, 0x6e, 0xe0, 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x0a, + 0x56, 0xde, 0x05, 0x81, 0x02, 0x00, 0x00, +} + +func (m *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountResponse) 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 *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.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 *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, &types.Any{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryAccountResponse) 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: QueryAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/bank/query.pb.go b/x/wasm/stargate/bank/query.pb.go new file mode 100644 index 0000000000..b02d0a9719 --- /dev/null +++ b/x/wasm/stargate/bank/query.pb.go @@ -0,0 +1,1914 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/bank/query.proto + +package bank + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + types1 "github.com/cosmos/cosmos-sdk/x/bank/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +type QueryBalanceResponse struct { + // balance is the balance of the coin. + Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } +func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceResponse) ProtoMessage() {} +func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{0} +} + +func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceResponse.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 *QueryBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +} + +func (m *QueryBalanceResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo + +func (m *QueryBalanceResponse) GetBalance() *types.Coin { + if m != nil { + return m.Balance + } + return nil +} + +// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +// method. +type QueryAllBalancesResponse struct { + // balances is the balances of all the coins. + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} } +func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesResponse) ProtoMessage() {} +func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{1} +} + +func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesResponse.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 *QueryAllBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src) +} + +func (m *QueryAllBalancesResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo + +func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + +func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QuerySpendableBalancesResponse defines the gRPC response structure for +// querying an account's spendable balances. +type QuerySpendableBalancesResponse struct { + // balances is the spendable balances of all the coins. + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySpendableBalancesResponse) Reset() { *m = QuerySpendableBalancesResponse{} } +func (m *QuerySpendableBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpendableBalancesResponse) ProtoMessage() {} +func (*QuerySpendableBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{2} +} + +func (m *QuerySpendableBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QuerySpendableBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpendableBalancesResponse.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 *QuerySpendableBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpendableBalancesResponse.Merge(m, src) +} + +func (m *QuerySpendableBalancesResponse) XXX_Size() int { + return m.Size() +} + +func (m *QuerySpendableBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpendableBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpendableBalancesResponse proto.InternalMessageInfo + +func (m *QuerySpendableBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + +func (m *QuerySpendableBalancesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +// method +type QueryTotalSupplyResponse struct { + // supply is the supply of the coins + Supply github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=supply,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"supply"` + // pagination defines the pagination in the response. + // + // Since: cosmos-sdk 0.43 + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTotalSupplyResponse) Reset() { *m = QueryTotalSupplyResponse{} } +func (m *QueryTotalSupplyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalSupplyResponse) ProtoMessage() {} +func (*QueryTotalSupplyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{3} +} + +func (m *QueryTotalSupplyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryTotalSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalSupplyResponse.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 *QueryTotalSupplyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalSupplyResponse.Merge(m, src) +} + +func (m *QueryTotalSupplyResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryTotalSupplyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalSupplyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalSupplyResponse proto.InternalMessageInfo + +func (m *QueryTotalSupplyResponse) GetSupply() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Supply + } + return nil +} + +func (m *QueryTotalSupplyResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +type QuerySupplyOfResponse struct { + // amount is the supply of the coin. + Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` +} + +func (m *QuerySupplyOfResponse) Reset() { *m = QuerySupplyOfResponse{} } +func (m *QuerySupplyOfResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySupplyOfResponse) ProtoMessage() {} +func (*QuerySupplyOfResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{4} +} + +func (m *QuerySupplyOfResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QuerySupplyOfResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySupplyOfResponse.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 *QuerySupplyOfResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySupplyOfResponse.Merge(m, src) +} + +func (m *QuerySupplyOfResponse) XXX_Size() int { + return m.Size() +} + +func (m *QuerySupplyOfResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySupplyOfResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySupplyOfResponse proto.InternalMessageInfo + +func (m *QuerySupplyOfResponse) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +// QueryParamsResponse defines the response type for querying x/bank parameters. +type QueryParamsResponse struct { + Params types1.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{5} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() types1.Params { + if m != nil { + return m.Params + } + return types1.Params{} +} + +// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata +// RPC method. +type QueryDenomsMetadataResponse struct { + // metadata provides the client information for all the registered tokens. + Metadatas []types1.Metadata `protobuf:"bytes,1,rep,name=metadatas,proto3" json:"metadatas"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDenomsMetadataResponse) Reset() { *m = QueryDenomsMetadataResponse{} } +func (m *QueryDenomsMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomsMetadataResponse) ProtoMessage() {} +func (*QueryDenomsMetadataResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{6} +} + +func (m *QueryDenomsMetadataResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDenomsMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomsMetadataResponse.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 *QueryDenomsMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomsMetadataResponse.Merge(m, src) +} + +func (m *QueryDenomsMetadataResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDenomsMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomsMetadataResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomsMetadataResponse proto.InternalMessageInfo + +func (m *QueryDenomsMetadataResponse) GetMetadatas() []types1.Metadata { + if m != nil { + return m.Metadatas + } + return nil +} + +func (m *QueryDenomsMetadataResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata +// RPC method. +type QueryDenomMetadataResponse struct { + // metadata describes and provides all the client information for the + // requested token. + Metadata types1.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` +} + +func (m *QueryDenomMetadataResponse) Reset() { *m = QueryDenomMetadataResponse{} } +func (m *QueryDenomMetadataResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomMetadataResponse) ProtoMessage() {} +func (*QueryDenomMetadataResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8253d806399b6a41, []int{7} +} + +func (m *QueryDenomMetadataResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDenomMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomMetadataResponse.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 *QueryDenomMetadataResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomMetadataResponse.Merge(m, src) +} + +func (m *QueryDenomMetadataResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDenomMetadataResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomMetadataResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomMetadataResponse proto.InternalMessageInfo + +func (m *QueryDenomMetadataResponse) GetMetadata() types1.Metadata { + if m != nil { + return m.Metadata + } + return types1.Metadata{} +} + +func init() { + proto.RegisterType((*QueryBalanceResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryBalanceResponse") + proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryAllBalancesResponse") + proto.RegisterType((*QuerySpendableBalancesResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QuerySpendableBalancesResponse") + proto.RegisterType((*QueryTotalSupplyResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryTotalSupplyResponse") + proto.RegisterType((*QuerySupplyOfResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QuerySupplyOfResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryParamsResponse") + proto.RegisterType((*QueryDenomsMetadataResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryDenomsMetadataResponse") + proto.RegisterType((*QueryDenomMetadataResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryDenomMetadataResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/bank/query.proto", fileDescriptor_8253d806399b6a41) +} + +var fileDescriptor_8253d806399b6a41 = []byte{ + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0xcf, 0x8a, 0x13, 0x41, + 0x10, 0xc6, 0x33, 0x2a, 0x71, 0x2d, 0x6f, 0x71, 0x85, 0x98, 0xc5, 0xde, 0x65, 0x2e, 0x2e, 0x82, + 0xdd, 0xc6, 0x3d, 0x88, 0x27, 0xd9, 0xac, 0xa0, 0x20, 0x62, 0x9c, 0x15, 0x04, 0xc1, 0x43, 0xcd, + 0xa4, 0x1d, 0x87, 0xcc, 0x74, 0x8f, 0xe9, 0x4e, 0x34, 0x6f, 0xe1, 0x6b, 0xe8, 0x93, 0xe4, 0xe0, + 0x61, 0xf1, 0xe4, 0x49, 0x25, 0x79, 0x11, 0x99, 0xfe, 0x33, 0x93, 0x65, 0x45, 0x3d, 0xc4, 0x8b, + 0x97, 0x49, 0xa7, 0xba, 0xbe, 0x5f, 0xd5, 0xd7, 0xdd, 0x14, 0xdc, 0x4c, 0xa4, 0x2a, 0xde, 0xa1, + 0x2a, 0x98, 0xf9, 0xcc, 0xfa, 0x4c, 0x69, 0x9c, 0xa4, 0xa8, 0x39, 0x8b, 0x51, 0x8c, 0xd9, 0xdb, + 0x29, 0x9f, 0xcc, 0x69, 0x39, 0x91, 0x5a, 0x76, 0x88, 0xcf, 0xa5, 0xe6, 0x33, 0xeb, 0x53, 0x9f, + 0x4b, 0xab, 0xdc, 0x9e, 0x61, 0x49, 0xc5, 0x62, 0x54, 0xdc, 0x0a, 0xd9, 0xac, 0x1f, 0x73, 0x8d, + 0x7d, 0x56, 0x62, 0x9a, 0x09, 0xd4, 0x99, 0x14, 0x96, 0xd5, 0xdb, 0x4e, 0x65, 0x2a, 0xcd, 0x92, + 0x55, 0x2b, 0x17, 0x25, 0xeb, 0x04, 0xaf, 0x4d, 0x64, 0x26, 0xce, 0xec, 0x8b, 0x71, 0xbd, 0x5f, + 0xfd, 0xb1, 0xfb, 0xe1, 0x63, 0xd8, 0x7e, 0x56, 0xd5, 0x1d, 0x60, 0x8e, 0x22, 0xe1, 0x11, 0x57, + 0xa5, 0x14, 0x8a, 0x77, 0x0e, 0xe0, 0x62, 0x6c, 0x43, 0xdd, 0x60, 0x2f, 0xd8, 0xbf, 0x7c, 0xe7, + 0x1a, 0xb5, 0x24, 0x5a, 0x55, 0xa2, 0x8e, 0x44, 0x8f, 0x64, 0x26, 0x22, 0x9f, 0x19, 0x7e, 0x0e, + 0xa0, 0x6b, 0x68, 0x87, 0x79, 0xee, 0x80, 0xaa, 0x26, 0xa6, 0xb0, 0xe5, 0xf2, 0x54, 0x37, 0xd8, + 0x3b, 0xff, 0x5b, 0xe4, 0xe0, 0xf6, 0xe2, 0xdb, 0x6e, 0xeb, 0xd3, 0xf7, 0xdd, 0xfd, 0x34, 0xd3, + 0x6f, 0xa6, 0x31, 0x4d, 0x64, 0xc1, 0x9c, 0x13, 0xfb, 0x73, 0x4b, 0x8d, 0xc6, 0x4c, 0xcf, 0x4b, + 0xae, 0x8c, 0x40, 0x45, 0x35, 0xbc, 0xf3, 0x10, 0xa0, 0x39, 0xbc, 0xee, 0x39, 0xd3, 0xfd, 0x8d, + 0x53, 0xa5, 0xec, 0x15, 0xf9, 0x82, 0x43, 0x4c, 0x6b, 0xdf, 0xd1, 0x9a, 0x34, 0xfc, 0x12, 0x00, + 0x31, 0x76, 0x8e, 0x4b, 0x2e, 0x46, 0x18, 0xe7, 0xfc, 0x3f, 0x30, 0xb5, 0xf0, 0x77, 0xf4, 0x5c, + 0x6a, 0xcc, 0x8f, 0xa7, 0x65, 0x99, 0xcf, 0x6b, 0x3b, 0x09, 0xb4, 0x95, 0x89, 0xfc, 0x0b, 0x33, + 0x0e, 0xbd, 0x39, 0x2b, 0x43, 0xb8, 0x6a, 0xaf, 0xc7, 0x70, 0x9f, 0xbe, 0xae, 0x6d, 0xdc, 0x85, + 0x36, 0x16, 0x72, 0x2a, 0xf4, 0x1f, 0xdf, 0xee, 0xe0, 0x42, 0x65, 0x23, 0x72, 0xe9, 0xe1, 0x10, + 0xae, 0x18, 0xe2, 0x10, 0x27, 0x58, 0x34, 0xb7, 0x7c, 0x0f, 0xda, 0xa5, 0x89, 0x38, 0xde, 0x4e, + 0xc3, 0x13, 0xe3, 0xb5, 0x3e, 0xab, 0x14, 0x4f, 0xb4, 0x82, 0xf0, 0x63, 0x00, 0x3b, 0x06, 0xf9, + 0x80, 0x0b, 0x59, 0xa8, 0x27, 0x5c, 0xe3, 0x08, 0x35, 0xd6, 0xe8, 0x43, 0xb8, 0x54, 0xb8, 0x98, + 0x7f, 0x41, 0xd7, 0x7f, 0x49, 0xf7, 0x4a, 0xc7, 0x6f, 0x54, 0x9b, 0x3b, 0xcf, 0x57, 0xd0, 0x6b, + 0x5a, 0x3d, 0xd3, 0xe9, 0x7d, 0xd8, 0xf2, 0x35, 0xdd, 0x31, 0xfc, 0x55, 0xa3, 0xb5, 0x68, 0xf0, + 0x68, 0xb1, 0x24, 0xc1, 0xc9, 0x92, 0x04, 0x3f, 0x96, 0x24, 0xf8, 0xb0, 0x22, 0xad, 0x93, 0x15, + 0x69, 0x7d, 0x5d, 0x91, 0xd6, 0x4b, 0xba, 0xf6, 0x86, 0x8e, 0xa4, 0x2a, 0x5e, 0xf8, 0xe9, 0x3a, + 0x62, 0xef, 0xed, 0x94, 0x3d, 0x35, 0x62, 0xe3, 0xb6, 0x99, 0x5d, 0x07, 0x3f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x47, 0x1b, 0x95, 0xe1, 0x8b, 0x05, 0x00, 0x00, +} + +func (m *QueryBalanceResponse) 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 *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Balance != nil { + { + size, err := m.Balance.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 *QueryAllBalancesResponse) 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 *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySpendableBalancesResponse) 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 *QuerySpendableBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpendableBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTotalSupplyResponse) 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 *QueryTotalSupplyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalSupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Supply) > 0 { + for iNdEx := len(m.Supply) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Supply[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySupplyOfResponse) 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 *QuerySupplyOfResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySupplyOfResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.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 *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QueryDenomsMetadataResponse) 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 *QueryDenomsMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomsMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Metadatas) > 0 { + for iNdEx := len(m.Metadatas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metadatas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDenomMetadataResponse) 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 *QueryDenomMetadataResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySpendableBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTotalSupplyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Supply) > 0 { + for _, e := range m.Supply { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QuerySupplyOfResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDenomsMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Metadatas) > 0 { + for _, e := range m.Metadatas { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDenomMetadataResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryBalanceResponse) 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: QueryBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Balance == nil { + m.Balance = &types.Coin{} + } + if err := m.Balance.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 *QueryAllBalancesResponse) 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: QueryAllBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QuerySpendableBalancesResponse) 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: QuerySpendableBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpendableBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryTotalSupplyResponse) 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: QueryTotalSupplyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalSupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Supply = append(m.Supply, types.Coin{}) + if err := m.Supply[len(m.Supply)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QuerySupplyOfResponse) 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: QuerySupplyOfResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySupplyOfResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryDenomsMetadataResponse) 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: QueryDenomsMetadataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomsMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadatas = append(m.Metadatas, types1.Metadata{}) + if err := m.Metadatas[len(m.Metadatas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDenomMetadataResponse) 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: QueryDenomMetadataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/distribution/query.pb.go b/x/wasm/stargate/distribution/query.pb.go new file mode 100644 index 0000000000..dc19378140 --- /dev/null +++ b/x/wasm/stargate/distribution/query.pb.go @@ -0,0 +1,1963 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/distribution/query.proto + +package distribution + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + types "github.com/cosmos/cosmos-sdk/x/distribution/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{0} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() types.Params { + if m != nil { + return m.Params + } + return types.Params{} +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +type QueryValidatorOutstandingRewardsResponse struct { + Rewards types.ValidatorOutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"` +} + +func (m *QueryValidatorOutstandingRewardsResponse) Reset() { + *m = QueryValidatorOutstandingRewardsResponse{} +} +func (m *QueryValidatorOutstandingRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {} +func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{1} +} + +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.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 *QueryValidatorOutstandingRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.Merge(m, src) +} + +func (m *QueryValidatorOutstandingRewardsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorOutstandingRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorOutstandingRewardsResponse proto.InternalMessageInfo + +func (m *QueryValidatorOutstandingRewardsResponse) GetRewards() types.ValidatorOutstandingRewards { + if m != nil { + return m.Rewards + } + return types.ValidatorOutstandingRewards{} +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +type QueryValidatorCommissionResponse struct { + // commission defines the commission the validator received. + Commission types.ValidatorAccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission"` +} + +func (m *QueryValidatorCommissionResponse) Reset() { *m = QueryValidatorCommissionResponse{} } +func (m *QueryValidatorCommissionResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorCommissionResponse) ProtoMessage() {} +func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{2} +} + +func (m *QueryValidatorCommissionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorCommissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorCommissionResponse.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 *QueryValidatorCommissionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorCommissionResponse.Merge(m, src) +} + +func (m *QueryValidatorCommissionResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorCommissionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorCommissionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorCommissionResponse proto.InternalMessageInfo + +func (m *QueryValidatorCommissionResponse) GetCommission() types.ValidatorAccumulatedCommission { + if m != nil { + return m.Commission + } + return types.ValidatorAccumulatedCommission{} +} + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +type QueryValidatorSlashesResponse struct { + // slashes defines the slashes the validator received. + Slashes []types.ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryValidatorSlashesResponse) Reset() { *m = QueryValidatorSlashesResponse{} } +func (m *QueryValidatorSlashesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorSlashesResponse) ProtoMessage() {} +func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{3} +} + +func (m *QueryValidatorSlashesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorSlashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorSlashesResponse.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 *QueryValidatorSlashesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorSlashesResponse.Merge(m, src) +} + +func (m *QueryValidatorSlashesResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorSlashesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorSlashesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorSlashesResponse proto.InternalMessageInfo + +func (m *QueryValidatorSlashesResponse) GetSlashes() []types.ValidatorSlashEvent { + if m != nil { + return m.Slashes + } + return nil +} + +func (m *QueryValidatorSlashesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +type QueryDelegationRewardsResponse struct { + // rewards defines the rewards accrued by a delegation. + Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` +} + +func (m *QueryDelegationRewardsResponse) Reset() { *m = QueryDelegationRewardsResponse{} } +func (m *QueryDelegationRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationRewardsResponse) ProtoMessage() {} +func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{4} +} + +func (m *QueryDelegationRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegationRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationRewardsResponse.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 *QueryDelegationRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationRewardsResponse.Merge(m, src) +} + +func (m *QueryDelegationRewardsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegationRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationRewardsResponse proto.InternalMessageInfo + +func (m *QueryDelegationRewardsResponse) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Rewards + } + return nil +} + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +type QueryDelegationTotalRewardsResponse struct { + // rewards defines all the rewards accrued by a delegator. + Rewards []types.DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards"` + // total defines the sum of all the rewards. + Total github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=total,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"total"` +} + +func (m *QueryDelegationTotalRewardsResponse) Reset() { *m = QueryDelegationTotalRewardsResponse{} } +func (m *QueryDelegationTotalRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {} +func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{5} +} + +func (m *QueryDelegationTotalRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegationTotalRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationTotalRewardsResponse.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 *QueryDelegationTotalRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationTotalRewardsResponse.Merge(m, src) +} + +func (m *QueryDelegationTotalRewardsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegationTotalRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationTotalRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationTotalRewardsResponse proto.InternalMessageInfo + +func (m *QueryDelegationTotalRewardsResponse) GetRewards() []types.DelegationDelegatorReward { + if m != nil { + return m.Rewards + } + return nil +} + +func (m *QueryDelegationTotalRewardsResponse) GetTotal() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Total + } + return nil +} + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +type QueryDelegatorValidatorsResponse struct { + // validators defines the validators a delegator is delegating for. + Validators []string `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` +} + +func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegatorValidatorsResponse{} } +func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} +func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{6} +} + +func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegatorValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorValidatorsResponse.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 *QueryDelegatorValidatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorValidatorsResponse.Merge(m, src) +} + +func (m *QueryDelegatorValidatorsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegatorValidatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorValidatorsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorValidatorsResponse proto.InternalMessageInfo + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressResponse struct { + // withdraw_address defines the delegator address to query for. + WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDelegatorWithdrawAddressResponse{} } +func (m *QueryDelegatorWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} +func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{7} +} + +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.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 *QueryDelegatorWithdrawAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.Merge(m, src) +} + +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorWithdrawAddressResponse proto.InternalMessageInfo + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +type QueryCommunityPoolResponse struct { + // pool defines community pool's coins. + Pool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=pool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"pool"` +} + +func (m *QueryCommunityPoolResponse) Reset() { *m = QueryCommunityPoolResponse{} } +func (m *QueryCommunityPoolResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCommunityPoolResponse) ProtoMessage() {} +func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9522630a60c4f8f, []int{8} +} + +func (m *QueryCommunityPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryCommunityPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCommunityPoolResponse.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 *QueryCommunityPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCommunityPoolResponse.Merge(m, src) +} + +func (m *QueryCommunityPoolResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryCommunityPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCommunityPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCommunityPoolResponse proto.InternalMessageInfo + +func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Pool + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryParamsResponse") + proto.RegisterType((*QueryValidatorOutstandingRewardsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryValidatorOutstandingRewardsResponse") + proto.RegisterType((*QueryValidatorCommissionResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryValidatorCommissionResponse") + proto.RegisterType((*QueryValidatorSlashesResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryValidatorSlashesResponse") + proto.RegisterType((*QueryDelegationRewardsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegationRewardsResponse") + proto.RegisterType((*QueryDelegationTotalRewardsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegationTotalRewardsResponse") + proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegatorValidatorsResponse") + proto.RegisterType((*QueryDelegatorWithdrawAddressResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegatorWithdrawAddressResponse") + proto.RegisterType((*QueryCommunityPoolResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryCommunityPoolResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/distribution/query.proto", fileDescriptor_d9522630a60c4f8f) +} + +var fileDescriptor_d9522630a60c4f8f = []byte{ + // 630 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x6b, 0xd4, 0x40, + 0x18, 0xc7, 0x33, 0xb5, 0xb6, 0x76, 0x7a, 0x50, 0x56, 0x0f, 0x4b, 0xd1, 0x6c, 0x49, 0x51, 0xab, + 0x62, 0xe2, 0xb6, 0x50, 0x44, 0x4f, 0xdd, 0xad, 0x78, 0x11, 0x5c, 0xa3, 0xb4, 0x45, 0x04, 0x99, + 0x4d, 0x86, 0xec, 0xd0, 0x24, 0x13, 0x33, 0x93, 0x5d, 0xf7, 0xac, 0x82, 0x17, 0xc1, 0x8f, 0xd0, + 0xb3, 0x1f, 0xc1, 0x4f, 0xd0, 0x63, 0x8f, 0x9e, 0x54, 0x76, 0x41, 0xfc, 0x18, 0x92, 0x79, 0xc9, + 0xcb, 0x22, 0x4b, 0x2f, 0xbd, 0x24, 0xc3, 0x33, 0xf3, 0xff, 0x3d, 0xff, 0x27, 0xcf, 0x93, 0x81, + 0x5b, 0x1e, 0x65, 0xd1, 0x08, 0xb1, 0xc8, 0x11, 0x8f, 0x61, 0xdb, 0x61, 0x1c, 0xa5, 0x01, 0xe2, + 0xd8, 0xf1, 0x09, 0xe3, 0x29, 0xe9, 0x67, 0x9c, 0xd0, 0xd8, 0x79, 0x97, 0xe1, 0x74, 0x6c, 0x27, + 0x29, 0xe5, 0xb4, 0x71, 0x4b, 0x6b, 0x6c, 0xf1, 0x18, 0xb6, 0x6d, 0xad, 0xb1, 0xab, 0x9a, 0xb5, + 0xbb, 0xf9, 0x39, 0xca, 0x9c, 0x3e, 0x62, 0x58, 0x02, 0x9c, 0x61, 0xbb, 0x8f, 0x39, 0x6a, 0x3b, + 0x09, 0x0a, 0x48, 0x8c, 0xf2, 0x53, 0x92, 0xb9, 0x76, 0x2d, 0xa0, 0x01, 0x15, 0x4b, 0x27, 0x5f, + 0xa9, 0xa8, 0x59, 0x25, 0x68, 0xad, 0x47, 0x89, 0x56, 0xd9, 0x6a, 0xbf, 0x66, 0x55, 0x9f, 0xab, + 0x06, 0xe5, 0x79, 0xeb, 0x10, 0x5e, 0x7d, 0x91, 0xfb, 0xe8, 0xa1, 0x14, 0x45, 0xcc, 0xc5, 0x2c, + 0xa1, 0x31, 0xc3, 0x8d, 0x5d, 0xb8, 0x94, 0x88, 0x48, 0x13, 0xac, 0x83, 0xcd, 0xd5, 0xad, 0x0d, + 0xc5, 0xad, 0x95, 0x63, 0x2b, 0xae, 0x2d, 0xc5, 0x9d, 0xc5, 0x93, 0x9f, 0x2d, 0xc3, 0x55, 0x42, + 0xeb, 0x23, 0x80, 0x9b, 0x02, 0xbd, 0x8f, 0x42, 0xe2, 0x23, 0x4e, 0xd3, 0xe7, 0x19, 0x67, 0x1c, + 0xc5, 0x3e, 0x89, 0x03, 0x17, 0x8f, 0x50, 0xea, 0x97, 0xf9, 0x0e, 0xe1, 0x72, 0x2a, 0x43, 0x2a, + 0xe1, 0xc3, 0xb9, 0x09, 0xe7, 0x20, 0x95, 0x0b, 0x8d, 0xb3, 0x3e, 0x01, 0xb8, 0x5e, 0xb7, 0xd1, + 0xa5, 0x51, 0x44, 0x18, 0x23, 0x34, 0x2e, 0xd2, 0x23, 0x08, 0xbd, 0x22, 0xaa, 0x1c, 0x3c, 0x3e, + 0x9b, 0x83, 0x5d, 0xcf, 0xcb, 0xa2, 0x2c, 0x44, 0x1c, 0xfb, 0x25, 0x58, 0x99, 0xa8, 0x40, 0xad, + 0xef, 0x00, 0xde, 0xa8, 0xfb, 0x78, 0x19, 0x22, 0x36, 0xc0, 0xe5, 0x37, 0xe8, 0xc1, 0x65, 0x26, + 0x43, 0x4d, 0xb0, 0x7e, 0x61, 0x73, 0x75, 0xeb, 0xc1, 0xd9, 0x1c, 0x08, 0xce, 0x93, 0x21, 0x8e, + 0xb9, 0xae, 0x5d, 0x61, 0x1a, 0x4f, 0x21, 0x2c, 0xc7, 0xaa, 0xb9, 0x20, 0xca, 0xba, 0xad, 0xa1, + 0xf9, 0x04, 0xd9, 0x72, 0x88, 0xcb, 0x3e, 0x06, 0x58, 0xdb, 0x71, 0x2b, 0x52, 0xeb, 0x0b, 0x80, + 0xa6, 0x30, 0xbf, 0x87, 0x43, 0x1c, 0x88, 0xd8, 0x6c, 0x07, 0x8f, 0xaa, 0x1d, 0xcc, 0xdd, 0x5f, + 0xaf, 0x25, 0xd2, 0x29, 0xf6, 0xb0, 0xd7, 0xa5, 0x24, 0xee, 0x6c, 0xe7, 0x4e, 0xbf, 0xfd, 0x6a, + 0xdd, 0x0b, 0x08, 0x1f, 0x64, 0x7d, 0xdb, 0xa3, 0x91, 0xa3, 0x46, 0x57, 0xbe, 0xee, 0x33, 0xff, + 0xc8, 0xe1, 0xe3, 0x04, 0x33, 0xad, 0x61, 0x65, 0x53, 0xff, 0x00, 0xb8, 0x31, 0xe3, 0xe7, 0x15, + 0xe5, 0x28, 0x9c, 0x35, 0xb5, 0x3f, 0x6b, 0x6a, 0x67, 0xee, 0x27, 0x2d, 0x69, 0x6a, 0x45, 0x53, + 0x49, 0x9c, 0x19, 0xaa, 0x46, 0x00, 0x2f, 0xf2, 0x3c, 0x5f, 0x73, 0xe1, 0xbc, 0x4a, 0x95, 0x7c, + 0xeb, 0x99, 0x1a, 0xde, 0xc2, 0x4f, 0xd1, 0xf5, 0xb2, 0x48, 0x13, 0xc2, 0x61, 0x11, 0x15, 0x75, + 0xae, 0xb8, 0x95, 0xc8, 0xa3, 0x4b, 0x9f, 0x8f, 0x5b, 0xc6, 0xdf, 0xe3, 0x96, 0x61, 0xbd, 0x81, + 0x37, 0xeb, 0xb4, 0x03, 0xc2, 0x07, 0x7e, 0x8a, 0x46, 0xbb, 0xbe, 0x9f, 0x62, 0x56, 0x22, 0xef, + 0xc0, 0x2b, 0x23, 0xb5, 0xf5, 0x16, 0xc9, 0x3d, 0xf1, 0x57, 0xac, 0xb8, 0x97, 0x47, 0x75, 0x49, + 0x85, 0xfe, 0x01, 0xc0, 0x35, 0x81, 0xcf, 0xff, 0x83, 0x2c, 0x26, 0x7c, 0xdc, 0xa3, 0x34, 0x2c, + 0x98, 0x18, 0x2e, 0x26, 0x94, 0x86, 0xe7, 0x37, 0x1d, 0x02, 0xdf, 0xe9, 0x9d, 0x4c, 0x4c, 0x70, + 0x3a, 0x31, 0xc1, 0xef, 0x89, 0x09, 0xbe, 0x4e, 0x4d, 0xe3, 0x74, 0x6a, 0x1a, 0x3f, 0xa6, 0xa6, + 0xf1, 0x7a, 0xa7, 0x02, 0xeb, 0x52, 0x16, 0x1d, 0xe8, 0x3b, 0xde, 0x77, 0xde, 0xcb, 0xbb, 0xfe, + 0xbf, 0x17, 0x7d, 0x7f, 0x49, 0xdc, 0x94, 0xdb, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xba, + 0x88, 0xc1, 0x19, 0x06, 0x00, 0x00, +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QueryValidatorOutstandingRewardsResponse) 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 *QueryValidatorOutstandingRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorOutstandingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Rewards.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 *QueryValidatorCommissionResponse) 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 *QueryValidatorCommissionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorCommissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Commission.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 *QueryValidatorSlashesResponse) 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 *QueryValidatorSlashesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorSlashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Slashes) > 0 { + for iNdEx := len(m.Slashes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Slashes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationRewardsResponse) 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 *QueryDelegationRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationTotalRewardsResponse) 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 *QueryDelegationTotalRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationTotalRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Total) > 0 { + for iNdEx := len(m.Total) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Total[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorValidatorsResponse) 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 *QueryDelegatorValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Validators[iNdEx]) + copy(dAtA[i:], m.Validators[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validators[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorWithdrawAddressResponse) 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 *QueryDelegatorWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WithdrawAddress) > 0 { + i -= len(m.WithdrawAddress) + copy(dAtA[i:], m.WithdrawAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.WithdrawAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCommunityPoolResponse) 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 *QueryCommunityPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pool) > 0 { + for iNdEx := len(m.Pool) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pool[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorOutstandingRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Rewards.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorCommissionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Commission.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorSlashesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Slashes) > 0 { + for _, e := range m.Slashes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegationRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDelegationTotalRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Total) > 0 { + for _, e := range m.Total { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDelegatorValidatorsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Validators) > 0 { + for _, s := range m.Validators { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryDelegatorWithdrawAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.WithdrawAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCommunityPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pool) > 0 { + for _, e := range m.Pool { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryValidatorOutstandingRewardsResponse) 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: QueryValidatorOutstandingRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", 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.Rewards.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 *QueryValidatorCommissionResponse) 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: QueryValidatorCommissionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorCommissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commission", 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.Commission.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 *QueryValidatorSlashesResponse) 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: QueryValidatorSlashesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorSlashesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Slashes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Slashes = append(m.Slashes, types.ValidatorSlashEvent{}) + if err := m.Slashes[len(m.Slashes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDelegationRewardsResponse) 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: QueryDelegationRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types1.DecCoin{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *QueryDelegationTotalRewardsResponse) 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: QueryDelegationTotalRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rewards = append(m.Rewards, types.DelegationDelegatorReward{}) + if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Total = append(m.Total, types1.DecCoin{}) + if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *QueryDelegatorValidatorsResponse) 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: QueryDelegatorValidatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", 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.Validators = append(m.Validators, 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 *QueryDelegatorWithdrawAddressResponse) 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: QueryDelegatorWithdrawAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", 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.WithdrawAddress = 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 *QueryCommunityPoolResponse) 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: QueryCommunityPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pool = append(m.Pool, types1.DecCoin{}) + if err := m.Pool[len(m.Pool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/feegrant/query.pb.go b/x/wasm/stargate/feegrant/query.pb.go new file mode 100644 index 0000000000..b6376735a5 --- /dev/null +++ b/x/wasm/stargate/feegrant/query.pb.go @@ -0,0 +1,603 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/feegrant/query.proto + +package feegrant + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + query "github.com/cosmos/cosmos-sdk/types/query" + feegrant "github.com/cosmos/cosmos-sdk/x/feegrant" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryAllowanceResponse is the response type for the Query/Allowance RPC +// method. +type QueryAllowanceResponse struct { + // allowance is a allowance granted for grantee by granter. + Allowance *feegrant.Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` +} + +func (m *QueryAllowanceResponse) Reset() { *m = QueryAllowanceResponse{} } +func (m *QueryAllowanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllowanceResponse) ProtoMessage() {} +func (*QueryAllowanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_409749d27c4086d8, []int{0} +} + +func (m *QueryAllowanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllowanceResponse.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 *QueryAllowanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllowanceResponse.Merge(m, src) +} + +func (m *QueryAllowanceResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryAllowanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllowanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllowanceResponse proto.InternalMessageInfo + +func (m *QueryAllowanceResponse) GetAllowance() *feegrant.Grant { + if m != nil { + return m.Allowance + } + return nil +} + +// QueryAllowancesResponse is the response type for the Query/Allowances RPC +// method. +type QueryAllowancesResponse struct { + // allowances are allowance's granted for grantee by granter. + Allowances []*feegrant.Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` + // pagination defines an pagination for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllowancesResponse) Reset() { *m = QueryAllowancesResponse{} } +func (m *QueryAllowancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllowancesResponse) ProtoMessage() {} +func (*QueryAllowancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_409749d27c4086d8, []int{1} +} + +func (m *QueryAllowancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllowancesResponse.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 *QueryAllowancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllowancesResponse.Merge(m, src) +} + +func (m *QueryAllowancesResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryAllowancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllowancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllowancesResponse proto.InternalMessageInfo + +func (m *QueryAllowancesResponse) GetAllowances() []*feegrant.Grant { + if m != nil { + return m.Allowances + } + return nil +} + +func (m *QueryAllowancesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryAllowanceResponse)(nil), "cosmwasm.wasm.v1.stargate.feegrant.QueryAllowanceResponse") + proto.RegisterType((*QueryAllowancesResponse)(nil), "cosmwasm.wasm.v1.stargate.feegrant.QueryAllowancesResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/feegrant/query.proto", fileDescriptor_409749d27c4086d8) +} + +var fileDescriptor_409749d27c4086d8 = []byte{ + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x4e, 0xc3, 0x30, + 0x14, 0x87, 0x6b, 0x90, 0x90, 0x30, 0x5b, 0x06, 0x88, 0x3a, 0x58, 0x55, 0x06, 0x40, 0x0c, 0xb6, + 0x52, 0x56, 0x84, 0x04, 0x0c, 0x5d, 0x18, 0x20, 0x03, 0x48, 0x6c, 0x2f, 0xc1, 0x84, 0x48, 0x4d, + 0x1c, 0xf2, 0xdc, 0x14, 0x6e, 0xc1, 0x19, 0x38, 0x0d, 0x63, 0x47, 0x46, 0x94, 0x5c, 0x04, 0x25, + 0xae, 0x9d, 0x22, 0x16, 0x16, 0x4b, 0x79, 0xfa, 0x7e, 0x5f, 0xde, 0x1f, 0xca, 0x13, 0x85, 0xf9, + 0x12, 0x30, 0x17, 0xfd, 0x53, 0x87, 0x02, 0x35, 0x54, 0x29, 0x68, 0x29, 0x9e, 0xa4, 0x4c, 0x2b, + 0x28, 0xb4, 0x78, 0x59, 0xc8, 0xea, 0x8d, 0x97, 0x95, 0xd2, 0xca, 0x0b, 0x2c, 0xcf, 0xfb, 0xa7, + 0x0e, 0xb9, 0xe5, 0xb9, 0xe5, 0xc7, 0x87, 0x1d, 0xa3, 0x70, 0x10, 0xd4, 0x61, 0x2c, 0x35, 0x84, + 0xae, 0x60, 0x5c, 0xe3, 0x93, 0x35, 0x17, 0x03, 0x4a, 0xf3, 0x13, 0x47, 0x96, 0x90, 0x66, 0x05, + 0xe8, 0x4c, 0x15, 0x86, 0x0d, 0xee, 0xe8, 0xfe, 0x6d, 0x47, 0x5c, 0xcc, 0xe7, 0x6a, 0x09, 0x45, + 0x22, 0x23, 0x89, 0xa5, 0x2a, 0x50, 0x7a, 0x67, 0x74, 0x17, 0x6c, 0xd1, 0x27, 0x13, 0x72, 0xbc, + 0x37, 0x65, 0xdc, 0x98, 0x5d, 0x4b, 0x7c, 0xed, 0xe5, 0xb3, 0xee, 0x2b, 0x1a, 0x02, 0xc1, 0x07, + 0xa1, 0x07, 0xbf, 0xc5, 0xe8, 0xcc, 0xe7, 0x94, 0x3a, 0x10, 0x7d, 0x32, 0xd9, 0xfe, 0x87, 0x7a, + 0x23, 0xe1, 0xcd, 0x28, 0x1d, 0xe6, 0xf0, 0xb7, 0xfa, 0xd6, 0x8e, 0x6c, 0xbe, 0x1b, 0x9a, 0x9b, + 0xcd, 0x5a, 0xc3, 0x0d, 0xa4, 0x6e, 0xac, 0x68, 0x23, 0x7a, 0x79, 0xfd, 0xd9, 0x30, 0xb2, 0x6a, + 0x18, 0xf9, 0x6e, 0x18, 0x79, 0x6f, 0xd9, 0x68, 0xd5, 0xb2, 0xd1, 0x57, 0xcb, 0x46, 0x0f, 0xd3, + 0x34, 0xd3, 0xcf, 0x8b, 0x98, 0x27, 0x2a, 0x17, 0x57, 0x0a, 0xf3, 0x7b, 0x7b, 0xc9, 0x47, 0xf1, + 0x6a, 0x2e, 0xfa, 0xe7, 0x9c, 0xf1, 0x4e, 0xbf, 0xd1, 0xd3, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xae, 0xa8, 0xb7, 0x7f, 0xfb, 0x01, 0x00, 0x00, +} + +func (m *QueryAllowanceResponse) 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 *QueryAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Allowance != nil { + { + size, err := m.Allowance.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 *QueryAllowancesResponse) 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 *QueryAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Allowances) > 0 { + for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Allowances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryAllowanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Allowance != nil { + l = m.Allowance.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllowancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Allowances) > 0 { + for _, e := range m.Allowances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryAllowanceResponse) 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: QueryAllowanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Allowance == nil { + m.Allowance = &feegrant.Grant{} + } + if err := m.Allowance.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 *QueryAllowancesResponse) 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: QueryAllowancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Allowances = append(m.Allowances, &feegrant.Grant{}) + if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/gov/query.pb.go b/x/wasm/stargate/gov/query.pb.go new file mode 100644 index 0000000000..b0eedaec53 --- /dev/null +++ b/x/wasm/stargate/gov/query.pb.go @@ -0,0 +1,1935 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/gov/query.proto + +package gov + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + query "github.com/cosmos/cosmos-sdk/types/query" + types "github.com/cosmos/cosmos-sdk/x/gov/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryProposalResponse is the response type for the Query/Proposal RPC method. +type QueryProposalResponse struct { + Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` +} + +func (m *QueryProposalResponse) Reset() { *m = QueryProposalResponse{} } +func (m *QueryProposalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalResponse) ProtoMessage() {} +func (*QueryProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{0} +} + +func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalResponse.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 *QueryProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalResponse.Merge(m, src) +} + +func (m *QueryProposalResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalResponse proto.InternalMessageInfo + +func (m *QueryProposalResponse) GetProposal() types.Proposal { + if m != nil { + return m.Proposal + } + return types.Proposal{} +} + +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. +type QueryProposalsResponse struct { + Proposals []types.Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProposalsResponse) Reset() { *m = QueryProposalsResponse{} } +func (m *QueryProposalsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProposalsResponse) ProtoMessage() {} +func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{1} +} + +func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProposalsResponse.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 *QueryProposalsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProposalsResponse.Merge(m, src) +} + +func (m *QueryProposalsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryProposalsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProposalsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProposalsResponse proto.InternalMessageInfo + +func (m *QueryProposalsResponse) GetProposals() []types.Proposal { + if m != nil { + return m.Proposals + } + return nil +} + +func (m *QueryProposalsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryVoteResponse is the response type for the Query/Vote RPC method. +type QueryVoteResponse struct { + // vote defined the queried vote. + Vote types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"` +} + +func (m *QueryVoteResponse) Reset() { *m = QueryVoteResponse{} } +func (m *QueryVoteResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVoteResponse) ProtoMessage() {} +func (*QueryVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{2} +} + +func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVoteResponse.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 *QueryVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteResponse.Merge(m, src) +} + +func (m *QueryVoteResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVoteResponse proto.InternalMessageInfo + +func (m *QueryVoteResponse) GetVote() types.Vote { + if m != nil { + return m.Vote + } + return types.Vote{} +} + +// QueryVotesResponse is the response type for the Query/Votes RPC method. +type QueryVotesResponse struct { + // votes defined the queried votes. + Votes []types.Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryVotesResponse) Reset() { *m = QueryVotesResponse{} } +func (m *QueryVotesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVotesResponse) ProtoMessage() {} +func (*QueryVotesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{3} +} + +func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVotesResponse.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 *QueryVotesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVotesResponse.Merge(m, src) +} + +func (m *QueryVotesResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryVotesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVotesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVotesResponse proto.InternalMessageInfo + +func (m *QueryVotesResponse) GetVotes() []types.Vote { + if m != nil { + return m.Votes + } + return nil +} + +func (m *QueryVotesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // voting_params defines the parameters related to voting. + VotingParams types.VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params"` + // deposit_params defines the parameters related to deposit. + DepositParams types.DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params"` + // tally_params defines the parameters related to tally. + TallyParams types.TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{4} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetVotingParams() types.VotingParams { + if m != nil { + return m.VotingParams + } + return types.VotingParams{} +} + +func (m *QueryParamsResponse) GetDepositParams() types.DepositParams { + if m != nil { + return m.DepositParams + } + return types.DepositParams{} +} + +func (m *QueryParamsResponse) GetTallyParams() types.TallyParams { + if m != nil { + return m.TallyParams + } + return types.TallyParams{} +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +type QueryDepositResponse struct { + // deposit defines the requested deposit. + Deposit types.Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` +} + +func (m *QueryDepositResponse) Reset() { *m = QueryDepositResponse{} } +func (m *QueryDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositResponse) ProtoMessage() {} +func (*QueryDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{5} +} + +func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDepositResponse.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 *QueryDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositResponse.Merge(m, src) +} + +func (m *QueryDepositResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDepositResponse proto.InternalMessageInfo + +func (m *QueryDepositResponse) GetDeposit() types.Deposit { + if m != nil { + return m.Deposit + } + return types.Deposit{} +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +type QueryDepositsResponse struct { + Deposits []types.Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDepositsResponse) Reset() { *m = QueryDepositsResponse{} } +func (m *QueryDepositsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositsResponse) ProtoMessage() {} +func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{6} +} + +func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDepositsResponse.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 *QueryDepositsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositsResponse.Merge(m, src) +} + +func (m *QueryDepositsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDepositsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDepositsResponse proto.InternalMessageInfo + +func (m *QueryDepositsResponse) GetDeposits() []types.Deposit { + if m != nil { + return m.Deposits + } + return nil +} + +func (m *QueryDepositsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +type QueryTallyResultResponse struct { + // tally defines the requested tally. + Tally types.TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally"` +} + +func (m *QueryTallyResultResponse) Reset() { *m = QueryTallyResultResponse{} } +func (m *QueryTallyResultResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTallyResultResponse) ProtoMessage() {} +func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8a6ba112aa0885a9, []int{7} +} + +func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTallyResultResponse.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 *QueryTallyResultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTallyResultResponse.Merge(m, src) +} + +func (m *QueryTallyResultResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryTallyResultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTallyResultResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTallyResultResponse proto.InternalMessageInfo + +func (m *QueryTallyResultResponse) GetTally() types.TallyResult { + if m != nil { + return m.Tally + } + return types.TallyResult{} +} + +func init() { + proto.RegisterType((*QueryProposalResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryProposalResponse") + proto.RegisterType((*QueryProposalsResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryProposalsResponse") + proto.RegisterType((*QueryVoteResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryVoteResponse") + proto.RegisterType((*QueryVotesResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryVotesResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryParamsResponse") + proto.RegisterType((*QueryDepositResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryDepositResponse") + proto.RegisterType((*QueryDepositsResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryDepositsResponse") + proto.RegisterType((*QueryTallyResultResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryTallyResultResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/gov/query.proto", fileDescriptor_8a6ba112aa0885a9) +} + +var fileDescriptor_8a6ba112aa0885a9 = []byte{ + // 523 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6b, 0xd4, 0x40, + 0x18, 0xc6, 0x77, 0x6c, 0xab, 0xf5, 0x6d, 0x2b, 0x18, 0xab, 0x84, 0x5a, 0xd3, 0x9a, 0x8b, 0x7f, + 0xc0, 0x0c, 0x5b, 0xbd, 0x89, 0x22, 0x55, 0x58, 0x41, 0x10, 0x5d, 0xc5, 0x05, 0x2f, 0x32, 0xdb, + 0x1d, 0xc6, 0xc0, 0x26, 0x6f, 0xcc, 0xcc, 0x46, 0xfb, 0x2d, 0x04, 0x3f, 0x80, 0x07, 0xbf, 0x4c, + 0x8f, 0x3d, 0x7a, 0x12, 0xd9, 0xfd, 0x1a, 0x1e, 0x64, 0xfe, 0x25, 0x59, 0xd8, 0x6a, 0x0f, 0xbd, + 0x84, 0x30, 0xf3, 0x3c, 0xbf, 0x79, 0x9e, 0x37, 0xbb, 0x03, 0x77, 0x0e, 0x50, 0x66, 0x9f, 0x99, + 0xcc, 0xa8, 0x79, 0x54, 0x5d, 0x2a, 0x15, 0x2b, 0x05, 0x53, 0x9c, 0x0a, 0xac, 0xe8, 0xa7, 0x09, + 0x2f, 0x0f, 0x93, 0xa2, 0x44, 0x85, 0xc1, 0x0d, 0x2f, 0x4d, 0xcc, 0xa3, 0xea, 0x26, 0x5e, 0x9a, + 0x08, 0xac, 0xb6, 0xee, 0xea, 0x6d, 0x94, 0x74, 0xc8, 0x24, 0xb7, 0x3e, 0x5a, 0x75, 0x87, 0x5c, + 0xb1, 0x2e, 0x2d, 0x98, 0x48, 0x73, 0xa6, 0x52, 0xcc, 0x2d, 0x6a, 0x6b, 0x53, 0xa0, 0x40, 0xf3, + 0x4a, 0xf5, 0x9b, 0x5b, 0xdd, 0x76, 0x04, 0x7d, 0xb0, 0xb7, 0x0a, 0xac, 0xec, 0x6e, 0x3c, 0x80, + 0xab, 0xaf, 0x35, 0xf5, 0x55, 0x89, 0x05, 0x4a, 0x36, 0xee, 0x73, 0x59, 0x60, 0x2e, 0x79, 0xf0, + 0x18, 0x56, 0x0b, 0xb7, 0x16, 0x92, 0x5d, 0x72, 0x7b, 0x6d, 0x6f, 0x3b, 0xb1, 0x24, 0x9d, 0x2b, + 0x71, 0xa4, 0xc4, 0xfb, 0xf6, 0x97, 0x8f, 0x7e, 0xed, 0x74, 0xfa, 0xb5, 0x27, 0xfe, 0x41, 0xe0, + 0xda, 0x1c, 0x59, 0xd6, 0xe8, 0x27, 0x70, 0xd1, 0xcb, 0x64, 0x48, 0x76, 0x97, 0x4e, 0xc9, 0x6e, + 0x4c, 0x41, 0x0f, 0xa0, 0x69, 0x1f, 0x9e, 0x33, 0xf1, 0x6e, 0x79, 0x84, 0x1e, 0x55, 0x62, 0x47, + 0x5c, 0x93, 0x98, 0xe0, 0xfe, 0xf8, 0x7e, 0xcb, 0x1a, 0xf7, 0xe0, 0xb2, 0x09, 0xf9, 0x0e, 0x55, + 0x2d, 0x08, 0xf6, 0x60, 0xb9, 0x42, 0xc5, 0x5d, 0xed, 0x70, 0x51, 0x34, 0xad, 0x77, 0xb1, 0x8c, + 0x36, 0xfe, 0x46, 0x20, 0xa8, 0x49, 0x4d, 0xd5, 0x07, 0xb0, 0xa2, 0xb7, 0x7d, 0xcd, 0xff, 0xb1, + 0xac, 0xf8, 0xec, 0xea, 0xfd, 0x21, 0x70, 0xc5, 0x7e, 0x04, 0x56, 0xb2, 0xac, 0x89, 0xf5, 0x02, + 0x36, 0x2a, 0x54, 0x69, 0x2e, 0x3e, 0x14, 0x66, 0xc3, 0x55, 0xdd, 0x3d, 0x21, 0x5e, 0x9a, 0x0b, + 0x0b, 0x70, 0x31, 0xd7, 0xab, 0xd6, 0x5a, 0xf0, 0x12, 0x2e, 0x8d, 0x78, 0x81, 0x32, 0x55, 0x9e, + 0x66, 0x13, 0xdf, 0x5c, 0x44, 0x7b, 0x66, 0x95, 0x73, 0xb8, 0x8d, 0x51, 0x7b, 0x31, 0x78, 0x0e, + 0xeb, 0x8a, 0x8d, 0xc7, 0x87, 0x9e, 0xb6, 0x64, 0x68, 0x3b, 0x8b, 0x68, 0x6f, 0xb5, 0x6e, 0x8e, + 0xb5, 0xa6, 0x9a, 0xa5, 0xf8, 0x0d, 0x6c, 0x9a, 0xf6, 0xee, 0xd0, 0xba, 0xfe, 0x43, 0xb8, 0xe0, + 0x8e, 0x74, 0xc5, 0xaf, 0xff, 0x23, 0xaa, 0x03, 0x7b, 0x47, 0xfc, 0x9d, 0xb8, 0xbf, 0x8c, 0xdb, + 0x6f, 0xa6, 0xfa, 0x08, 0x56, 0x9d, 0xc8, 0x7f, 0xef, 0x53, 0x70, 0x6b, 0xcb, 0xd9, 0x7d, 0xf5, + 0x01, 0x84, 0x26, 0xa0, 0x99, 0x4e, 0x9f, 0xcb, 0xc9, 0xb8, 0x5d, 0x7d, 0xc5, 0x4c, 0xc8, 0x15, + 0x3f, 0x79, 0xaa, 0xd6, 0xe7, 0x7f, 0x97, 0xc6, 0xb3, 0xdf, 0x3b, 0x9a, 0x46, 0xe4, 0x78, 0x1a, + 0x91, 0xdf, 0xd3, 0x88, 0x7c, 0x9d, 0x45, 0x9d, 0xe3, 0x59, 0xd4, 0xf9, 0x39, 0x8b, 0x3a, 0xef, + 0xef, 0x89, 0x54, 0x7d, 0x9c, 0x0c, 0x93, 0x03, 0xcc, 0xe8, 0x53, 0x94, 0xd9, 0xc0, 0xdf, 0x7d, + 0x23, 0xfa, 0xc5, 0xde, 0x81, 0xed, 0x0b, 0x70, 0x78, 0xde, 0x5c, 0x3e, 0xf7, 0xff, 0x06, 0x00, + 0x00, 0xff, 0xff, 0x4d, 0xd6, 0x94, 0xb0, 0x28, 0x05, 0x00, 0x00, +} + +func (m *QueryProposalResponse) 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 *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Proposal.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 *QueryProposalsResponse) 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 *QueryProposalsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Proposals) > 0 { + for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryVoteResponse) 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 *QueryVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Vote.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 *QueryVotesResponse) 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 *QueryVotesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.VotingParams.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 *QueryDepositResponse) 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 *QueryDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Deposit.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 *QueryDepositsResponse) 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 *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTallyResultResponse) 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 *QueryTallyResultResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTallyResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Tally.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Proposal.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryProposalsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Proposals) > 0 { + for _, e := range m.Proposals { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Vote.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryVotesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VotingParams.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.DepositParams.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.TallyParams.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deposit.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDepositsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTallyResultResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tally.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryProposalResponse) 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: QueryProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", 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.Proposal.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 *QueryProposalsResponse) 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: QueryProposalsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProposalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposals = append(m.Proposals, types.Proposal{}) + if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryVoteResponse) 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: QueryVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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.Vote.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 *QueryVotesResponse) 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: QueryVotesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, types.Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", 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.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", 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.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", 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.TallyParams.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 *QueryDepositResponse) 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: QueryDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", 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.Deposit.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 *QueryDepositsResponse) 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: QueryDepositsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposits = append(m.Deposits, types.Deposit{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryTallyResultResponse) 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: QueryTallyResultResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTallyResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tally", 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.Tally.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/mint/query.pb.go b/x/wasm/stargate/mint/query.pb.go new file mode 100644 index 0000000000..a8259f8de1 --- /dev/null +++ b/x/wasm/stargate/mint/query.pb.go @@ -0,0 +1,695 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/mint/query.proto + +package mint + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/x/mint/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b8ebde63af3133dc, []int{0} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() types.Params { + if m != nil { + return m.Params + } + return types.Params{} +} + +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. +type QueryInflationResponse struct { + // inflation is the current minting inflation value. + Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"` +} + +func (m *QueryInflationResponse) Reset() { *m = QueryInflationResponse{} } +func (m *QueryInflationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryInflationResponse) ProtoMessage() {} +func (*QueryInflationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b8ebde63af3133dc, []int{1} +} + +func (m *QueryInflationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryInflationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInflationResponse.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 *QueryInflationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInflationResponse.Merge(m, src) +} + +func (m *QueryInflationResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryInflationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInflationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInflationResponse proto.InternalMessageInfo + +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. +type QueryAnnualProvisionsResponse struct { + // annual_provisions is the current minting annual provisions value. + AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"annual_provisions"` +} + +func (m *QueryAnnualProvisionsResponse) Reset() { *m = QueryAnnualProvisionsResponse{} } +func (m *QueryAnnualProvisionsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAnnualProvisionsResponse) ProtoMessage() {} +func (*QueryAnnualProvisionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b8ebde63af3133dc, []int{2} +} + +func (m *QueryAnnualProvisionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryAnnualProvisionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAnnualProvisionsResponse.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 *QueryAnnualProvisionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAnnualProvisionsResponse.Merge(m, src) +} + +func (m *QueryAnnualProvisionsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryAnnualProvisionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAnnualProvisionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAnnualProvisionsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.mint.QueryParamsResponse") + proto.RegisterType((*QueryInflationResponse)(nil), "cosmwasm.wasm.v1.stargate.mint.QueryInflationResponse") + proto.RegisterType((*QueryAnnualProvisionsResponse)(nil), "cosmwasm.wasm.v1.stargate.mint.QueryAnnualProvisionsResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/mint/query.proto", fileDescriptor_b8ebde63af3133dc) +} + +var fileDescriptor_b8ebde63af3133dc = []byte{ + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xb1, 0x4b, 0x03, 0x31, + 0x14, 0xc6, 0xef, 0x40, 0x0a, 0x46, 0x07, 0xad, 0x22, 0x52, 0x31, 0x95, 0x0e, 0x22, 0x82, 0x09, + 0xa7, 0x93, 0xa3, 0xd5, 0x41, 0xc1, 0xa1, 0x76, 0x11, 0x74, 0x90, 0xb4, 0x4d, 0xcf, 0x60, 0x93, + 0x77, 0x5e, 0xd2, 0xd3, 0x82, 0x7f, 0x84, 0x7f, 0x56, 0xc7, 0x8e, 0xe2, 0x50, 0xa4, 0xfd, 0x47, + 0xe4, 0x5e, 0x7a, 0xad, 0x3a, 0xba, 0xe4, 0xee, 0xde, 0xfb, 0xbe, 0xdf, 0x77, 0xe1, 0x23, 0x87, + 0x6d, 0xb0, 0xfa, 0x45, 0x58, 0xcd, 0xf1, 0xc8, 0x22, 0x6e, 0x9d, 0x48, 0x63, 0xe1, 0x24, 0xd7, + 0xca, 0x38, 0xfe, 0xdc, 0x97, 0xe9, 0x80, 0x25, 0x29, 0x38, 0x28, 0xd3, 0x42, 0xcb, 0xf0, 0xc8, + 0x22, 0x56, 0x68, 0x59, 0xae, 0xad, 0x6c, 0xc6, 0x10, 0x03, 0x4a, 0x79, 0xfe, 0xe6, 0x5d, 0x15, + 0x74, 0x81, 0xf5, 0xb8, 0x2c, 0x6a, 0x49, 0x27, 0x22, 0xfc, 0xf0, 0xfb, 0x5a, 0x83, 0x6c, 0xdc, + 0xe4, 0x21, 0x0d, 0x91, 0x0a, 0x6d, 0x9b, 0xd2, 0x26, 0x60, 0xac, 0x2c, 0x9f, 0x92, 0x52, 0x82, + 0x93, 0xed, 0x70, 0x2f, 0x3c, 0x58, 0x39, 0xde, 0x61, 0x9e, 0x83, 0x51, 0x6c, 0xc6, 0x61, 0xde, + 0x54, 0x5f, 0x1a, 0x8e, 0xab, 0x41, 0x73, 0x66, 0xa8, 0x75, 0xc9, 0x16, 0x12, 0xaf, 0x4c, 0xb7, + 0x27, 0x9c, 0x02, 0x33, 0x87, 0x5e, 0x93, 0x65, 0x55, 0x0c, 0x91, 0xbb, 0x5a, 0x67, 0xb9, 0xf5, + 0x73, 0x5c, 0xdd, 0x8f, 0x95, 0x7b, 0xec, 0xb7, 0x58, 0x1b, 0x34, 0x9f, 0xfd, 0xb1, 0x7f, 0x1c, + 0xd9, 0xce, 0x13, 0x77, 0x83, 0x44, 0x5a, 0x76, 0x21, 0xdb, 0xcd, 0x05, 0xa0, 0xf6, 0x46, 0x76, + 0x31, 0xe7, 0xcc, 0x98, 0xbe, 0xe8, 0x35, 0x52, 0xc8, 0x94, 0x55, 0x60, 0x16, 0x77, 0xb8, 0x27, + 0xeb, 0x02, 0x77, 0x0f, 0xc9, 0x7c, 0xf9, 0xcf, 0xd8, 0x35, 0xf1, 0x27, 0xa4, 0x7e, 0x39, 0x9c, + 0xd0, 0x70, 0x34, 0xa1, 0xe1, 0xd7, 0x84, 0x86, 0xef, 0x53, 0x1a, 0x8c, 0xa6, 0x34, 0xf8, 0x98, + 0xd2, 0xe0, 0x8e, 0xfd, 0x60, 0x9e, 0x83, 0xd5, 0xb7, 0x45, 0xbd, 0x1d, 0xfe, 0xea, 0x6b, 0xfe, + 0xd5, 0x71, 0xab, 0x84, 0x45, 0x9c, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x55, 0x7d, 0x13, + 0x0c, 0x02, 0x00, 0x00, +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QueryInflationResponse) 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 *QueryInflationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInflationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Inflation.Size() + i -= size + if _, err := m.Inflation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAnnualProvisionsResponse) 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 *QueryAnnualProvisionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAnnualProvisionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.AnnualProvisions.Size() + i -= size + if _, err := m.AnnualProvisions.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryInflationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Inflation.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAnnualProvisionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AnnualProvisions.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryInflationResponse) 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: QueryInflationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInflationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Inflation", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Inflation.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 *QueryAnnualProvisionsResponse) 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: QueryAnnualProvisionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAnnualProvisionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnnualProvisions", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AnnualProvisions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/slashing/query.pb.go b/x/wasm/stargate/slashing/query.pb.go new file mode 100644 index 0000000000..e72b138cc7 --- /dev/null +++ b/x/wasm/stargate/slashing/query.pb.go @@ -0,0 +1,779 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/slashing/query.proto + +package slashing + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + query "github.com/cosmos/cosmos-sdk/types/query" + types "github.com/cosmos/cosmos-sdk/x/slashing/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsResponse is the response type for the Query/Params RPC method +type QueryParamsResponse struct { + Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5380f563330f7cc0, []int{0} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() types.Params { + if m != nil { + return m.Params + } + return types.Params{} +} + +// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +// method +type QuerySigningInfoResponse struct { + // val_signing_info is the signing info of requested val cons address + ValSigningInfo types.ValidatorSigningInfo `protobuf:"bytes,1,opt,name=val_signing_info,json=valSigningInfo,proto3" json:"val_signing_info"` +} + +func (m *QuerySigningInfoResponse) Reset() { *m = QuerySigningInfoResponse{} } +func (m *QuerySigningInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySigningInfoResponse) ProtoMessage() {} +func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5380f563330f7cc0, []int{1} +} + +func (m *QuerySigningInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QuerySigningInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySigningInfoResponse.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 *QuerySigningInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySigningInfoResponse.Merge(m, src) +} + +func (m *QuerySigningInfoResponse) XXX_Size() int { + return m.Size() +} + +func (m *QuerySigningInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySigningInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySigningInfoResponse proto.InternalMessageInfo + +func (m *QuerySigningInfoResponse) GetValSigningInfo() types.ValidatorSigningInfo { + if m != nil { + return m.ValSigningInfo + } + return types.ValidatorSigningInfo{} +} + +// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +// method +type QuerySigningInfosResponse struct { + // info is the signing info of all validators + Info []types.ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySigningInfosResponse) Reset() { *m = QuerySigningInfosResponse{} } +func (m *QuerySigningInfosResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySigningInfosResponse) ProtoMessage() {} +func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5380f563330f7cc0, []int{2} +} + +func (m *QuerySigningInfosResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QuerySigningInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySigningInfosResponse.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 *QuerySigningInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySigningInfosResponse.Merge(m, src) +} + +func (m *QuerySigningInfosResponse) XXX_Size() int { + return m.Size() +} + +func (m *QuerySigningInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySigningInfosResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySigningInfosResponse proto.InternalMessageInfo + +func (m *QuerySigningInfosResponse) GetInfo() []types.ValidatorSigningInfo { + if m != nil { + return m.Info + } + return nil +} + +func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.slashing.QueryParamsResponse") + proto.RegisterType((*QuerySigningInfoResponse)(nil), "cosmwasm.wasm.v1.stargate.slashing.QuerySigningInfoResponse") + proto.RegisterType((*QuerySigningInfosResponse)(nil), "cosmwasm.wasm.v1.stargate.slashing.QuerySigningInfosResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/slashing/query.proto", fileDescriptor_5380f563330f7cc0) +} + +var fileDescriptor_5380f563330f7cc0 = []byte{ + // 360 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x4a, 0xc3, 0x40, + 0x10, 0xc6, 0x13, 0x2d, 0x3d, 0xac, 0x20, 0x52, 0x3d, 0xd4, 0x1e, 0x52, 0xc9, 0x41, 0x45, 0x70, + 0x97, 0xd4, 0xb3, 0x97, 0x7a, 0x28, 0x82, 0x07, 0xad, 0xa2, 0x20, 0x48, 0x99, 0xb4, 0xe9, 0x76, + 0x21, 0xd9, 0x8d, 0xd9, 0x34, 0xda, 0xb7, 0xf0, 0x45, 0x7c, 0x8f, 0x1e, 0x7b, 0xf4, 0x24, 0xd2, + 0xbe, 0x88, 0x64, 0xff, 0xb4, 0x45, 0xf1, 0xe2, 0x65, 0x59, 0x26, 0xdf, 0xf7, 0xfb, 0x26, 0x3b, + 0x83, 0x70, 0x5f, 0xc8, 0xe4, 0x05, 0x64, 0x42, 0xd4, 0x51, 0x04, 0x44, 0xe6, 0x90, 0x51, 0xc8, + 0x23, 0x22, 0x63, 0x90, 0x23, 0xc6, 0x29, 0x79, 0x1e, 0x47, 0xd9, 0x04, 0xa7, 0x99, 0xc8, 0x45, + 0xcd, 0xb7, 0x7a, 0xac, 0x8e, 0x22, 0xc0, 0x56, 0x8f, 0xad, 0xbe, 0x71, 0x52, 0x6a, 0x84, 0x24, + 0x21, 0xc8, 0x48, 0x9b, 0x49, 0x11, 0x84, 0x51, 0x0e, 0x01, 0x49, 0x81, 0x32, 0x0e, 0x39, 0x13, + 0x5c, 0xf3, 0x1a, 0x7b, 0x54, 0x50, 0xa1, 0xae, 0xa4, 0xbc, 0x99, 0xea, 0xa1, 0x21, 0x2c, 0x5b, + 0xb0, 0x7e, 0x5b, 0xd0, 0x3a, 0xff, 0x0e, 0xed, 0xde, 0x94, 0xfc, 0x6b, 0xc8, 0x20, 0x91, 0xdd, + 0x48, 0xa6, 0x82, 0xcb, 0xa8, 0x76, 0x8e, 0xaa, 0xa9, 0xaa, 0xd4, 0xdd, 0x03, 0xf7, 0x78, 0xab, + 0xd5, 0xc4, 0x9a, 0xb7, 0x6c, 0x11, 0x1b, 0x1e, 0xd6, 0xc6, 0x76, 0x65, 0xfa, 0xd9, 0x74, 0xba, + 0xc6, 0xe4, 0x4f, 0x50, 0x5d, 0x51, 0x6f, 0x19, 0xe5, 0x8c, 0xd3, 0x4b, 0x3e, 0x14, 0x4b, 0xf4, + 0x13, 0xda, 0x29, 0x20, 0xee, 0x49, 0xfd, 0xa9, 0xc7, 0xf8, 0x50, 0x98, 0x90, 0xd3, 0x3f, 0x43, + 0xee, 0x21, 0x66, 0x03, 0xc8, 0x45, 0xb6, 0x06, 0x34, 0x91, 0xdb, 0x05, 0xc4, 0x6b, 0x55, 0xff, + 0xdd, 0x45, 0xfb, 0x3f, 0xb3, 0x57, 0xff, 0xd5, 0x41, 0x15, 0x13, 0xb8, 0xf9, 0xdf, 0x40, 0x05, + 0xa8, 0x75, 0x10, 0x5a, 0x4d, 0xa2, 0xbe, 0xa1, 0xfa, 0x3f, 0xb2, 0xb8, 0x72, 0x6c, 0x58, 0xcf, + 0x7c, 0xf5, 0x4c, 0x34, 0xb2, 0x5d, 0x74, 0xd7, 0xac, 0xed, 0xab, 0xe9, 0xdc, 0x73, 0x67, 0x73, + 0xcf, 0xfd, 0x9a, 0x7b, 0xee, 0xdb, 0xc2, 0x73, 0x66, 0x0b, 0xcf, 0xf9, 0x58, 0x78, 0xce, 0x63, + 0x8b, 0xb2, 0x7c, 0x34, 0x0e, 0x71, 0x5f, 0x24, 0xe4, 0x42, 0xc8, 0xe4, 0xc1, 0xee, 0xd8, 0x80, + 0xbc, 0xea, 0x5d, 0xfb, 0xb5, 0x68, 0x61, 0x55, 0x4d, 0xf5, 0xec, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0xb3, 0xff, 0x4e, 0x34, 0x95, 0x02, 0x00, 0x00, +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QuerySigningInfoResponse) 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 *QuerySigningInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySigningInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ValSigningInfo.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 *QuerySigningInfosResponse) 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 *QuerySigningInfosResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Info) > 0 { + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySigningInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ValSigningInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QuerySigningInfosResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Info) > 0 { + for _, e := range m.Info { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QuerySigningInfoResponse) 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: QuerySigningInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySigningInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValSigningInfo", 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.ValSigningInfo.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 *QuerySigningInfosResponse) 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: QuerySigningInfosResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySigningInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = append(m.Info, types.ValidatorSigningInfo{}) + if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/stargate/staking/query.pb.go b/x/wasm/stargate/staking/query.pb.go new file mode 100644 index 0000000000..9753b6dcd5 --- /dev/null +++ b/x/wasm/stargate/staking/query.pb.go @@ -0,0 +1,3226 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/stargate/staking/query.proto + +package staking + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + query "github.com/cosmos/cosmos-sdk/types/query" + github_com_cosmos_cosmos_sdk_x_staking_types "github.com/cosmos/cosmos-sdk/x/staking/types" + types "github.com/cosmos/cosmos-sdk/x/staking/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal + +var ( + _ = fmt.Errorf + _ = math.Inf +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryValidatorsResponse is response type for the Query/Validators RPC method +type QueryValidatorsResponse struct { + // validators contains all the queried validators. + Validators []types.Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryValidatorsResponse) Reset() { *m = QueryValidatorsResponse{} } +func (m *QueryValidatorsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorsResponse) ProtoMessage() {} +func (*QueryValidatorsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{0} +} + +func (m *QueryValidatorsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorsResponse.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 *QueryValidatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorsResponse.Merge(m, src) +} + +func (m *QueryValidatorsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorsResponse proto.InternalMessageInfo + +func (m *QueryValidatorsResponse) GetValidators() []types.Validator { + if m != nil { + return m.Validators + } + return nil +} + +func (m *QueryValidatorsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryValidatorResponse is response type for the Query/Validator RPC method +type QueryValidatorResponse struct { + // validator defines the the validator info. + Validator types.Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` +} + +func (m *QueryValidatorResponse) Reset() { *m = QueryValidatorResponse{} } +func (m *QueryValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorResponse) ProtoMessage() {} +func (*QueryValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{1} +} + +func (m *QueryValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorResponse.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 *QueryValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorResponse.Merge(m, src) +} + +func (m *QueryValidatorResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorResponse proto.InternalMessageInfo + +func (m *QueryValidatorResponse) GetValidator() types.Validator { + if m != nil { + return m.Validator + } + return types.Validator{} +} + +// QueryValidatorDelegationsResponse is response type for the +// Query/ValidatorDelegations RPC method +type QueryValidatorDelegationsResponse struct { + DelegationResponses github_com_cosmos_cosmos_sdk_x_staking_types.DelegationResponses `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3,castrepeated=github.com/cosmos/cosmos-sdk/x/staking/types.DelegationResponses" json:"delegation_responses"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryValidatorDelegationsResponse) Reset() { *m = QueryValidatorDelegationsResponse{} } +func (m *QueryValidatorDelegationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorDelegationsResponse) ProtoMessage() {} +func (*QueryValidatorDelegationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{2} +} + +func (m *QueryValidatorDelegationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorDelegationsResponse.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 *QueryValidatorDelegationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorDelegationsResponse.Merge(m, src) +} + +func (m *QueryValidatorDelegationsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorDelegationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorDelegationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorDelegationsResponse proto.InternalMessageInfo + +func (m *QueryValidatorDelegationsResponse) GetDelegationResponses() github_com_cosmos_cosmos_sdk_x_staking_types.DelegationResponses { + if m != nil { + return m.DelegationResponses + } + return nil +} + +func (m *QueryValidatorDelegationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryValidatorUnbondingDelegationsResponse is response type for the +// Query/ValidatorUnbondingDelegations RPC method. +type QueryValidatorUnbondingDelegationsResponse struct { + UnbondingResponses []types.UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryValidatorUnbondingDelegationsResponse) Reset() { + *m = QueryValidatorUnbondingDelegationsResponse{} +} + +func (m *QueryValidatorUnbondingDelegationsResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryValidatorUnbondingDelegationsResponse) ProtoMessage() {} +func (*QueryValidatorUnbondingDelegationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{3} +} + +func (m *QueryValidatorUnbondingDelegationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryValidatorUnbondingDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse.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 *QueryValidatorUnbondingDelegationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse.Merge(m, src) +} + +func (m *QueryValidatorUnbondingDelegationsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryValidatorUnbondingDelegationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse proto.InternalMessageInfo + +func (m *QueryValidatorUnbondingDelegationsResponse) GetUnbondingResponses() []types.UnbondingDelegation { + if m != nil { + return m.UnbondingResponses + } + return nil +} + +func (m *QueryValidatorUnbondingDelegationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDelegationResponse is response type for the Query/Delegation RPC method. +type QueryDelegationResponse struct { + // delegation_responses defines the delegation info of a delegation. + DelegationResponse *types.DelegationResponse `protobuf:"bytes,1,opt,name=delegation_response,json=delegationResponse,proto3" json:"delegation_response,omitempty"` +} + +func (m *QueryDelegationResponse) Reset() { *m = QueryDelegationResponse{} } +func (m *QueryDelegationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegationResponse) ProtoMessage() {} +func (*QueryDelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{4} +} + +func (m *QueryDelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegationResponse.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 *QueryDelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegationResponse.Merge(m, src) +} + +func (m *QueryDelegationResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegationResponse proto.InternalMessageInfo + +func (m *QueryDelegationResponse) GetDelegationResponse() *types.DelegationResponse { + if m != nil { + return m.DelegationResponse + } + return nil +} + +// QueryDelegationResponse is response type for the Query/UnbondingDelegation +// RPC method. +type QueryUnbondingDelegationResponse struct { + // unbond defines the unbonding information of a delegation. + Unbond types.UnbondingDelegation `protobuf:"bytes,1,opt,name=unbond,proto3" json:"unbond"` +} + +func (m *QueryUnbondingDelegationResponse) Reset() { *m = QueryUnbondingDelegationResponse{} } +func (m *QueryUnbondingDelegationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUnbondingDelegationResponse) ProtoMessage() {} +func (*QueryUnbondingDelegationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{5} +} + +func (m *QueryUnbondingDelegationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryUnbondingDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnbondingDelegationResponse.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 *QueryUnbondingDelegationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnbondingDelegationResponse.Merge(m, src) +} + +func (m *QueryUnbondingDelegationResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryUnbondingDelegationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnbondingDelegationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnbondingDelegationResponse proto.InternalMessageInfo + +func (m *QueryUnbondingDelegationResponse) GetUnbond() types.UnbondingDelegation { + if m != nil { + return m.Unbond + } + return types.UnbondingDelegation{} +} + +// QueryDelegatorDelegationsResponse is response type for the +// Query/DelegatorDelegations RPC method. +type QueryDelegatorDelegationsResponse struct { + // delegation_responses defines all the delegations' info of a delegator. + DelegationResponses []types.DelegationResponse `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3" json:"delegation_responses"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDelegatorDelegationsResponse) Reset() { *m = QueryDelegatorDelegationsResponse{} } +func (m *QueryDelegatorDelegationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorDelegationsResponse) ProtoMessage() {} +func (*QueryDelegatorDelegationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{6} +} + +func (m *QueryDelegatorDelegationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegatorDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorDelegationsResponse.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 *QueryDelegatorDelegationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorDelegationsResponse.Merge(m, src) +} + +func (m *QueryDelegatorDelegationsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegatorDelegationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorDelegationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorDelegationsResponse proto.InternalMessageInfo + +func (m *QueryDelegatorDelegationsResponse) GetDelegationResponses() []types.DelegationResponse { + if m != nil { + return m.DelegationResponses + } + return nil +} + +func (m *QueryDelegatorDelegationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryUnbondingDelegatorDelegationsResponse is response type for the +// Query/UnbondingDelegatorDelegations RPC method. +type QueryDelegatorUnbondingDelegationsResponse struct { + UnbondingResponses []types.UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) Reset() { + *m = QueryDelegatorUnbondingDelegationsResponse{} +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryDelegatorUnbondingDelegationsResponse) ProtoMessage() {} +func (*QueryDelegatorUnbondingDelegationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{7} +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse.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 *QueryDelegatorUnbondingDelegationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse.Merge(m, src) +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse proto.InternalMessageInfo + +func (m *QueryDelegatorUnbondingDelegationsResponse) GetUnbondingResponses() []types.UnbondingDelegation { + if m != nil { + return m.UnbondingResponses + } + return nil +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +// method. +type QueryRedelegationsResponse struct { + RedelegationResponses []types.RedelegationResponse `protobuf:"bytes,1,rep,name=redelegation_responses,json=redelegationResponses,proto3" json:"redelegation_responses"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryRedelegationsResponse) Reset() { *m = QueryRedelegationsResponse{} } +func (m *QueryRedelegationsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRedelegationsResponse) ProtoMessage() {} +func (*QueryRedelegationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{8} +} + +func (m *QueryRedelegationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryRedelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRedelegationsResponse.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 *QueryRedelegationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRedelegationsResponse.Merge(m, src) +} + +func (m *QueryRedelegationsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryRedelegationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRedelegationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRedelegationsResponse proto.InternalMessageInfo + +func (m *QueryRedelegationsResponse) GetRedelegationResponses() []types.RedelegationResponse { + if m != nil { + return m.RedelegationResponses + } + return nil +} + +func (m *QueryRedelegationsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDelegatorValidatorsResponse is response type for the +// Query/DelegatorValidators RPC method. +type QueryDelegatorValidatorsResponse struct { + // validators defines the the validators' info of a delegator. + Validators []types.Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegatorValidatorsResponse{} } +func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} +func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{9} +} + +func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegatorValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorValidatorsResponse.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 *QueryDelegatorValidatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorValidatorsResponse.Merge(m, src) +} + +func (m *QueryDelegatorValidatorsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegatorValidatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorValidatorsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorValidatorsResponse proto.InternalMessageInfo + +func (m *QueryDelegatorValidatorsResponse) GetValidators() []types.Validator { + if m != nil { + return m.Validators + } + return nil +} + +func (m *QueryDelegatorValidatorsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDelegatorValidatorResponse response type for the +// Query/DelegatorValidator RPC method. +type QueryDelegatorValidatorResponse struct { + // validator defines the the validator info. + Validator types.Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` +} + +func (m *QueryDelegatorValidatorResponse) Reset() { *m = QueryDelegatorValidatorResponse{} } +func (m *QueryDelegatorValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorValidatorResponse) ProtoMessage() {} +func (*QueryDelegatorValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{10} +} + +func (m *QueryDelegatorValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryDelegatorValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorValidatorResponse.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 *QueryDelegatorValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorValidatorResponse.Merge(m, src) +} + +func (m *QueryDelegatorValidatorResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryDelegatorValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorValidatorResponse proto.InternalMessageInfo + +func (m *QueryDelegatorValidatorResponse) GetValidator() types.Validator { + if m != nil { + return m.Validator + } + return types.Validator{} +} + +// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +// method. +type QueryHistoricalInfoResponse struct { + // hist defines the historical info at the given height. + Hist *types.HistoricalInfo `protobuf:"bytes,1,opt,name=hist,proto3" json:"hist,omitempty"` +} + +func (m *QueryHistoricalInfoResponse) Reset() { *m = QueryHistoricalInfoResponse{} } +func (m *QueryHistoricalInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryHistoricalInfoResponse) ProtoMessage() {} +func (*QueryHistoricalInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{11} +} + +func (m *QueryHistoricalInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryHistoricalInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHistoricalInfoResponse.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 *QueryHistoricalInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHistoricalInfoResponse.Merge(m, src) +} + +func (m *QueryHistoricalInfoResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryHistoricalInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHistoricalInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryHistoricalInfoResponse proto.InternalMessageInfo + +func (m *QueryHistoricalInfoResponse) GetHist() *types.HistoricalInfo { + if m != nil { + return m.Hist + } + return nil +} + +// QueryPoolResponse is response type for the Query/Pool RPC method. +type QueryPoolResponse struct { + // pool defines the pool info. + Pool types.Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"` +} + +func (m *QueryPoolResponse) Reset() { *m = QueryPoolResponse{} } +func (m *QueryPoolResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPoolResponse) ProtoMessage() {} +func (*QueryPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{12} +} + +func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPoolResponse.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 *QueryPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPoolResponse.Merge(m, src) +} + +func (m *QueryPoolResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPoolResponse proto.InternalMessageInfo + +func (m *QueryPoolResponse) GetPool() types.Pool { + if m != nil { + return m.Pool + } + return types.Pool{} +} + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_19131b0809aabffb, []int{13} +} + +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} + +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} + +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() types.Params { + if m != nil { + return m.Params + } + return types.Params{} +} + +func init() { + proto.RegisterType((*QueryValidatorsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorsResponse") + proto.RegisterType((*QueryValidatorResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorResponse") + proto.RegisterType((*QueryValidatorDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorDelegationsResponse") + proto.RegisterType((*QueryValidatorUnbondingDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorUnbondingDelegationsResponse") + proto.RegisterType((*QueryDelegationResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegationResponse") + proto.RegisterType((*QueryUnbondingDelegationResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryUnbondingDelegationResponse") + proto.RegisterType((*QueryDelegatorDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorDelegationsResponse") + proto.RegisterType((*QueryDelegatorUnbondingDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorUnbondingDelegationsResponse") + proto.RegisterType((*QueryRedelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryRedelegationsResponse") + proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorValidatorsResponse") + proto.RegisterType((*QueryDelegatorValidatorResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorValidatorResponse") + proto.RegisterType((*QueryHistoricalInfoResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryHistoricalInfoResponse") + proto.RegisterType((*QueryPoolResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryPoolResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/stargate/staking/query.proto", fileDescriptor_19131b0809aabffb) +} + +var fileDescriptor_19131b0809aabffb = []byte{ + // 634 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x96, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0xb3, 0xa5, 0x8a, 0xc4, 0xf4, 0x44, 0x52, 0x4a, 0x14, 0x90, 0x93, 0x58, 0x08, 0xaa, + 0x40, 0x6d, 0xa5, 0x48, 0x1c, 0x10, 0x07, 0x14, 0x40, 0xb4, 0xea, 0xa5, 0x18, 0x01, 0x02, 0x0e, + 0xd5, 0x3a, 0x5e, 0x1c, 0xab, 0xb1, 0xd7, 0x78, 0x9d, 0xd0, 0xbe, 0x05, 0x27, 0x5e, 0x01, 0x09, + 0xae, 0x3c, 0x44, 0x8f, 0xe1, 0x06, 0x17, 0x40, 0xc9, 0x8b, 0x20, 0xaf, 0x77, 0x37, 0x5f, 0x36, + 0x02, 0x94, 0x22, 0xc1, 0xc5, 0x75, 0x27, 0x33, 0xbf, 0xff, 0x7c, 0x25, 0xbb, 0xb0, 0xd5, 0xa1, + 0xcc, 0x7f, 0x8d, 0x99, 0x6f, 0xf2, 0xc7, 0xa0, 0x65, 0xb2, 0x18, 0x47, 0x2e, 0x8e, 0x49, 0xf2, + 0x72, 0xe8, 0x05, 0xae, 0xf9, 0xaa, 0x4f, 0xa2, 0x63, 0x23, 0x8c, 0x68, 0x4c, 0x4b, 0x0d, 0xe9, + 0x6e, 0xf0, 0xc7, 0xa0, 0x65, 0x48, 0x77, 0x43, 0xb8, 0x57, 0x9b, 0x89, 0x0b, 0x65, 0xa6, 0x8d, + 0x19, 0x49, 0x63, 0xcd, 0x41, 0xcb, 0x26, 0x31, 0x6e, 0x99, 0x21, 0x76, 0xbd, 0x00, 0xc7, 0x1e, + 0x0d, 0x52, 0x5c, 0x75, 0xdd, 0xa5, 0x2e, 0xe5, 0xaf, 0x66, 0xf2, 0x26, 0xac, 0x97, 0x05, 0x41, + 0x26, 0x20, 0xc3, 0xc5, 0xff, 0xa9, 0x97, 0xfe, 0x01, 0xc1, 0x85, 0x87, 0x09, 0xfe, 0x09, 0xee, + 0x79, 0x0e, 0x8e, 0x69, 0xc4, 0x2c, 0xc2, 0x42, 0x1a, 0x30, 0x52, 0x7a, 0x00, 0x30, 0x50, 0xd6, + 0x0a, 0xaa, 0x9f, 0xd9, 0x5c, 0xdb, 0x6e, 0x18, 0x29, 0x56, 0x26, 0x6a, 0x08, 0xac, 0xa1, 0xe2, + 0xdb, 0xab, 0x27, 0x5f, 0x6b, 0x05, 0x6b, 0x2a, 0x34, 0x01, 0x4d, 0x92, 0xae, 0xac, 0xd4, 0xd1, + 0xe6, 0xda, 0xf6, 0x55, 0x09, 0x4a, 0x2a, 0x34, 0xd2, 0xee, 0x48, 0xd6, 0x3e, 0x76, 0x89, 0xcc, + 0xc2, 0x9a, 0x0a, 0xd5, 0x0f, 0x60, 0x63, 0x36, 0x59, 0x95, 0xeb, 0x7d, 0x38, 0xab, 0x04, 0x2b, + 0x88, 0x2b, 0xfc, 0x72, 0xaa, 0x93, 0x48, 0xfd, 0xed, 0x0a, 0x34, 0x66, 0x15, 0xee, 0x91, 0x1e, + 0x71, 0xb9, 0xfa, 0xa4, 0x31, 0xef, 0x10, 0xac, 0x3b, 0xca, 0x7e, 0x10, 0x09, 0xbb, 0xec, 0x51, + 0x33, 0x4f, 0x78, 0xc2, 0x92, 0xa8, 0xf6, 0x4e, 0x92, 0xc1, 0xfb, 0x6f, 0xb5, 0x3b, 0xae, 0x17, + 0x77, 0xfb, 0xb6, 0xd1, 0xa1, 0xbe, 0x29, 0x06, 0x97, 0xfe, 0xd9, 0x62, 0xce, 0xa1, 0x79, 0xa4, + 0xa6, 0x18, 0x1f, 0x87, 0x84, 0x65, 0x80, 0x98, 0x55, 0x76, 0x16, 0x8d, 0xcb, 0xeb, 0xfc, 0x17, + 0x04, 0xcd, 0xd9, 0xc6, 0x3c, 0x0e, 0x6c, 0x1a, 0x38, 0x5e, 0xe0, 0x66, 0x75, 0xc8, 0x86, 0x72, + 0x5f, 0x7e, 0xbe, 0xd0, 0x9f, 0x6b, 0x79, 0xfd, 0xc9, 0x40, 0x8a, 0x11, 0x95, 0x14, 0xed, 0x14, + 0x6a, 0x1b, 0x88, 0xaf, 0xc0, 0x62, 0x57, 0x4b, 0x2f, 0xa0, 0x9c, 0x31, 0x68, 0xb1, 0x60, 0xbf, + 0x31, 0x67, 0xab, 0xb4, 0x38, 0x1d, 0xdd, 0x87, 0x3a, 0xd7, 0xcd, 0x28, 0x5b, 0x25, 0xb0, 0x0b, + 0xc5, 0xb4, 0x74, 0xa1, 0xf9, 0x07, 0xbd, 0x13, 0x00, 0xfd, 0x13, 0x12, 0xbb, 0x2d, 0x3c, 0xb2, + 0x77, 0xbb, 0xb3, 0xb4, 0xd5, 0x4e, 0xd5, 0xff, 0xd2, 0x5a, 0xaa, 0x9a, 0xfe, 0x9f, 0xb5, 0x1c, + 0x22, 0xa8, 0xf2, 0xda, 0x2c, 0xe2, 0x64, 0xd4, 0xe2, 0xc1, 0x46, 0x44, 0x7e, 0x32, 0xaa, 0xeb, + 0x79, 0xe5, 0x4c, 0xe3, 0xe6, 0x86, 0x75, 0x3e, 0x22, 0xa7, 0x3a, 0xae, 0x8f, 0x48, 0xac, 0xbc, + 0x1a, 0xd7, 0x3f, 0x71, 0xec, 0x74, 0xa1, 0x96, 0x93, 0xf5, 0xb2, 0xcf, 0x9f, 0x67, 0x70, 0x91, + 0x2b, 0xed, 0x78, 0x2c, 0xa6, 0x91, 0xd7, 0xc1, 0xbd, 0xdd, 0xe0, 0x25, 0x55, 0x2a, 0xb7, 0x60, + 0xb5, 0xeb, 0xb1, 0x58, 0x08, 0x5c, 0xc9, 0x13, 0x98, 0x8b, 0xe6, 0x31, 0xfa, 0x1e, 0x9c, 0xe3, + 0xe8, 0x7d, 0x4a, 0x7b, 0x0a, 0x78, 0x13, 0x56, 0x43, 0x4a, 0x7b, 0x02, 0x78, 0x29, 0x0f, 0x98, + 0xc4, 0x88, 0x64, 0xb9, 0xbf, 0xfe, 0x08, 0xca, 0x29, 0x0c, 0x47, 0xd8, 0x9f, 0x8c, 0xee, 0x36, + 0x14, 0x43, 0x6e, 0x11, 0x40, 0x2d, 0x17, 0xc8, 0xbd, 0xe4, 0x0f, 0x54, 0x1a, 0xd3, 0xde, 0x3b, + 0x19, 0x69, 0x68, 0x38, 0xd2, 0xd0, 0xf7, 0x91, 0x86, 0xde, 0x8c, 0xb5, 0xc2, 0x70, 0xac, 0x15, + 0x3e, 0x8f, 0xb5, 0xc2, 0xf3, 0xd6, 0xd4, 0xe9, 0x78, 0x97, 0x32, 0xff, 0xa9, 0xbc, 0x6a, 0x39, + 0xe6, 0x51, 0x7a, 0xe5, 0x9a, 0xbf, 0x6f, 0xd9, 0x45, 0x7e, 0xbf, 0xb9, 0xf1, 0x23, 0x00, 0x00, + 0xff, 0xff, 0x85, 0xbb, 0x31, 0x57, 0x9b, 0x09, 0x00, 0x00, +} + +func (m *QueryValidatorsResponse) 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 *QueryValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorResponse) 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 *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Validator.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 *QueryValidatorDelegationsResponse) 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 *QueryValidatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.DelegationResponses) > 0 { + for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryValidatorUnbondingDelegationsResponse) 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 *QueryValidatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorUnbondingDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.UnbondingResponses) > 0 { + for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegationResponse) 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 *QueryDelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DelegationResponse != nil { + { + size, err := m.DelegationResponse.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 *QueryUnbondingDelegationResponse) 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 *QueryUnbondingDelegationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnbondingDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Unbond.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 *QueryDelegatorDelegationsResponse) 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 *QueryDelegatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.DelegationResponses) > 0 { + for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) 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 *QueryDelegatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.UnbondingResponses) > 0 { + for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryRedelegationsResponse) 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 *QueryRedelegationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRedelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.RedelegationResponses) > 0 { + for iNdEx := len(m.RedelegationResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RedelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorValidatorsResponse) 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 *QueryDelegatorValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorValidatorResponse) 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 *QueryDelegatorValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Validator.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 *QueryHistoricalInfoResponse) 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 *QueryHistoricalInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHistoricalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Hist != nil { + { + size, err := m.Hist.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 *QueryPoolResponse) 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 *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Pool.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 *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *QueryValidatorsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Validator.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryValidatorDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DelegationResponses) > 0 { + for _, e := range m.DelegationResponses { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryValidatorUnbondingDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UnbondingResponses) > 0 { + for _, e := range m.UnbondingResponses { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DelegationResponse != nil { + l = m.DelegationResponse.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUnbondingDelegationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Unbond.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDelegatorDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DelegationResponses) > 0 { + for _, e := range m.DelegationResponses { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorUnbondingDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UnbondingResponses) > 0 { + for _, e := range m.UnbondingResponses { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRedelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RedelegationResponses) > 0 { + for _, e := range m.RedelegationResponses { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorValidatorsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Validator.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryHistoricalInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Hist != nil { + l = m.Hist.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Pool.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func (m *QueryValidatorsResponse) 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: QueryValidatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, types.Validator{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryValidatorResponse) 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: QueryValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator.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 *QueryValidatorDelegationsResponse) 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: QueryValidatorDelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegationResponses = append(m.DelegationResponses, types.DelegationResponse{}) + if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryValidatorUnbondingDelegationsResponse) 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: QueryValidatorUnbondingDelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbondingResponses = append(m.UnbondingResponses, types.UnbondingDelegation{}) + if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDelegationResponse) 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: QueryDelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DelegationResponse == nil { + m.DelegationResponse = &types.DelegationResponse{} + } + if err := m.DelegationResponse.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 *QueryUnbondingDelegationResponse) 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: QueryUnbondingDelegationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnbondingDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unbond", 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.Unbond.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 *QueryDelegatorDelegationsResponse) 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: QueryDelegatorDelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegationResponses = append(m.DelegationResponses, types.DelegationResponse{}) + if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDelegatorUnbondingDelegationsResponse) 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: QueryDelegatorUnbondingDelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbondingResponses = append(m.UnbondingResponses, types.UnbondingDelegation{}) + if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryRedelegationsResponse) 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: QueryRedelegationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRedelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RedelegationResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RedelegationResponses = append(m.RedelegationResponses, types.RedelegationResponse{}) + if err := m.RedelegationResponses[len(m.RedelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDelegatorValidatorsResponse) 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: QueryDelegatorValidatorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, types.Validator{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.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 *QueryDelegatorValidatorResponse) 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: QueryDelegatorValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator.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 *QueryHistoricalInfoResponse) 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: QueryHistoricalInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHistoricalInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &types.HistoricalInfo{} + } + if err := m.Hist.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 *QueryPoolResponse) 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: QueryPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", 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.Pool.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) From 006f69825f2d0203ab50ad5cedfa8cea5cd661b8 Mon Sep 17 00:00:00 2001 From: mattverse Date: Fri, 22 Jul 2022 18:45:24 +0900 Subject: [PATCH 02/11] Remove initialized whitelists --- .../wasm/v1/stargate/auth/query.proto | 35 - .../wasm/v1/stargate/bank/query.proto | 86 - .../wasm/v1/stargate/distribution/query.proto | 95 - .../wasm/v1/stargate/feegrant/query.proto | 25 - .../cosmwasm/wasm/v1/stargate/gov/query.proto | 72 - .../wasm/v1/stargate/mint/query.proto | 33 - .../wasm/v1/stargate/slashing/query.proto | 30 - .../wasm/v1/stargate/staking/query.proto | 131 - x/wasm/keeper/stargate_bindings.go | 79 - x/wasm/stargate/auth/query.pb.go | 791 ---- x/wasm/stargate/bank/query.pb.go | 1914 ---------- x/wasm/stargate/distribution/query.pb.go | 1963 ---------- x/wasm/stargate/feegrant/query.pb.go | 603 --- x/wasm/stargate/gov/query.pb.go | 1935 ---------- x/wasm/stargate/mint/query.pb.go | 695 ---- x/wasm/stargate/slashing/query.pb.go | 779 ---- x/wasm/stargate/staking/query.pb.go | 3226 ----------------- 17 files changed, 12492 deletions(-) delete mode 100644 proto/cosmwasm/wasm/v1/stargate/auth/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/bank/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/distribution/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/gov/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/mint/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/slashing/query.proto delete mode 100644 proto/cosmwasm/wasm/v1/stargate/staking/query.proto delete mode 100644 x/wasm/stargate/auth/query.pb.go delete mode 100644 x/wasm/stargate/bank/query.pb.go delete mode 100644 x/wasm/stargate/distribution/query.pb.go delete mode 100644 x/wasm/stargate/feegrant/query.pb.go delete mode 100644 x/wasm/stargate/gov/query.pb.go delete mode 100644 x/wasm/stargate/mint/query.pb.go delete mode 100644 x/wasm/stargate/slashing/query.pb.go delete mode 100644 x/wasm/stargate/staking/query.pb.go diff --git a/proto/cosmwasm/wasm/v1/stargate/auth/query.proto b/proto/cosmwasm/wasm/v1/stargate/auth/query.proto deleted file mode 100644 index 709b94dbe1..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/auth/query.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.auth; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/auth"; - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsResponse { - // accounts are the existing accounts - repeated google.protobuf.Any accounts = 1 - [ (cosmos_proto.accepts_interface) = "AccountI" ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 - [ (cosmos_proto.accepts_interface) = "AccountI" ]; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - cosmos.auth.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/bank/query.proto b/proto/cosmwasm/wasm/v1/stargate/bank/query.proto deleted file mode 100644 index 392453dd15..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/bank/query.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.bank; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/bank"; - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -message QueryBalanceResponse { - // balance is the balance of the coin. - cosmos.base.v1beta1.Coin balance = 1; -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for -// querying an account's spendable balances. -message QuerySpendableBalancesResponse { - // balances is the spendable balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -message QueryTotalSupplyResponse { - // supply is the supply of the coins - repeated cosmos.base.v1beta1.Coin supply = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -message QuerySupplyOfResponse { - // amount is the supply of the coin. - cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -message QueryParamsResponse { - cosmos.bank.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata -// RPC method. -message QueryDenomsMetadataResponse { - // metadata provides the client information for all the registered tokens. - repeated cosmos.bank.v1beta1.Metadata metadatas = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata -// RPC method. -message QueryDenomMetadataResponse { - // metadata describes and provides all the client information for the - // requested token. - cosmos.bank.v1beta1.Metadata metadata = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/distribution/query.proto b/proto/cosmwasm/wasm/v1/stargate/distribution/query.proto deleted file mode 100644 index 50cbeba355..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/distribution/query.proto +++ /dev/null @@ -1,95 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.distribution; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/distribution"; - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - cosmos.distribution.v1beta1.Params params = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsResponse { - cosmos.distribution.v1beta1.ValidatorOutstandingRewards rewards = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionResponse { - // commission defines the commision the validator received. - cosmos.distribution.v1beta1.ValidatorAccumulatedCommission commission = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -message QueryValidatorSlashesResponse { - // slashes defines the slashes the validator received. - repeated cosmos.distribution.v1beta1.ValidatorSlashEvent slashes = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsResponse { - // rewards defines the rewards accrued by a delegation. - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsResponse { - // rewards defines all the rewards accrued by a delegator. - repeated cosmos.distribution.v1beta1.DelegationDelegatorReward rewards = 1 - [ (gogoproto.nullable) = false ]; - // total defines the sum of all the rewards. - repeated cosmos.base.v1beta1.DecCoin total = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validators defines the validators a delegator is delegating for. - repeated string validators = 1; -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // withdraw_address defines the delegator address to query for. - string withdraw_address = 1; -} - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -message QueryCommunityPoolResponse { - // pool defines community pool's coins. - repeated cosmos.base.v1beta1.DecCoin pool = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto b/proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto deleted file mode 100644 index ab7757fabf..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto +++ /dev/null @@ -1,25 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.feegrant; - -import "cosmos/feegrant/v1beta1/feegrant.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/feegrant"; - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC -// method. -message QueryAllowanceResponse { - // allowance is a allowance granted for grantee by granter. - cosmos.feegrant.v1beta1.Grant allowance = 1; -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC -// method. -message QueryAllowancesResponse { - // allowances are allowance's granted for grantee by granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/gov/query.proto b/proto/cosmwasm/wasm/v1/stargate/gov/query.proto deleted file mode 100644 index 4cf6bd7dee..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/gov/query.proto +++ /dev/null @@ -1,72 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.gov; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/gov/v1beta1/gov.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/gov"; - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - cosmos.gov.v1beta1.Proposal proposal = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - repeated cosmos.gov.v1beta1.Proposal proposals = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defined the queried vote. - cosmos.gov.v1beta1.Vote vote = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defined the queried votes. - repeated cosmos.gov.v1beta1.Vote votes = 1 [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // voting_params defines the parameters related to voting. - cosmos.gov.v1beta1.VotingParams voting_params = 1 - [ (gogoproto.nullable) = false ]; - // deposit_params defines the parameters related to deposit. - cosmos.gov.v1beta1.DepositParams deposit_params = 2 - [ (gogoproto.nullable) = false ]; - // tally_params defines the parameters related to tally. - cosmos.gov.v1beta1.TallyParams tally_params = 3 - [ (gogoproto.nullable) = false ]; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - cosmos.gov.v1beta1.Deposit deposit = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - repeated cosmos.gov.v1beta1.Deposit deposits = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - cosmos.gov.v1beta1.TallyResult tally = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/mint/query.proto b/proto/cosmwasm/wasm/v1/stargate/mint/query.proto deleted file mode 100644 index 2ac3779e7d..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/mint/query.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.mint; - -import "gogoproto/gogo.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/mint"; - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - cosmos.mint.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -message QueryInflationResponse { - // inflation is the current minting inflation value. - bytes inflation = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsResponse { - // annual_provisions is the current minting annual provisions value. - bytes annual_provisions = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/slashing/query.proto b/proto/cosmwasm/wasm/v1/stargate/slashing/query.proto deleted file mode 100644 index 58fa9daea3..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/slashing/query.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.slashing; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/slashing"; - -// QueryParamsResponse is the response type for the Query/Params RPC method -message QueryParamsResponse { - cosmos.slashing.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -message QuerySigningInfoResponse { - // val_signing_info is the signing info of requested val cons address - cosmos.slashing.v1beta1.ValidatorSigningInfo val_signing_info = 1 - [ (gogoproto.nullable) = false ]; -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -message QuerySigningInfosResponse { - // info is the signing info of all validators - repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 - [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto/cosmwasm/wasm/v1/stargate/staking/query.proto b/proto/cosmwasm/wasm/v1/stargate/staking/query.proto deleted file mode 100644 index 5b694b8bac..0000000000 --- a/proto/cosmwasm/wasm/v1/stargate/staking/query.proto +++ /dev/null @@ -1,131 +0,0 @@ -syntax = "proto3"; -package cosmwasm.wasm.v1.stargate.staking; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/staking"; - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -message QueryValidatorsResponse { - // validators contains all the queried validators. - repeated cosmos.staking.v1beta1.Validator validators = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -message QueryValidatorResponse { - // validator defines the the validator info. - cosmos.staking.v1beta1.Validator validator = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsResponse { - repeated cosmos.staking.v1beta1.DelegationResponse delegation_responses = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = - "github.com/cosmos/cosmos-sdk/x/staking/types.DelegationResponses" - ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -message QueryValidatorUnbondingDelegationsResponse { - repeated cosmos.staking.v1beta1.UnbondingDelegation unbonding_responses = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -message QueryDelegationResponse { - // delegation_responses defines the delegation info of a delegation. - cosmos.staking.v1beta1.DelegationResponse delegation_response = 1; -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -message QueryUnbondingDelegationResponse { - // unbond defines the unbonding information of a delegation. - cosmos.staking.v1beta1.UnbondingDelegation unbond = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsResponse { - // delegation_responses defines all the delegations' info of a delegator. - repeated cosmos.staking.v1beta1.DelegationResponse delegation_responses = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -message QueryDelegatorUnbondingDelegationsResponse { - repeated cosmos.staking.v1beta1.UnbondingDelegation unbonding_responses = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -message QueryRedelegationsResponse { - repeated cosmos.staking.v1beta1.RedelegationResponse redelegation_responses = - 1 [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. - repeated cosmos.staking.v1beta1.Validator validators = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorResponse { - // validator defines the the validator info. - cosmos.staking.v1beta1.Validator validator = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoResponse { - // hist defines the historical info at the given height. - cosmos.staking.v1beta1.HistoricalInfo hist = 1; -} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -message QueryPoolResponse { - // pool defines the pool info. - cosmos.staking.v1beta1.Pool pool = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - cosmos.staking.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/x/wasm/keeper/stargate_bindings.go b/x/wasm/keeper/stargate_bindings.go index 36d1d5d5cf..3c0416ed4a 100644 --- a/x/wasm/keeper/stargate_bindings.go +++ b/x/wasm/keeper/stargate_bindings.go @@ -4,16 +4,6 @@ package keeper import ( "sync" - - "github.com/CosmWasm/wasmd/x/wasm/stargate/auth" - "github.com/CosmWasm/wasmd/x/wasm/stargate/bank" - distr "github.com/CosmWasm/wasmd/x/wasm/stargate/distribution" - "github.com/CosmWasm/wasmd/x/wasm/stargate/feegrant" - "github.com/CosmWasm/wasmd/x/wasm/stargate/gov" - "github.com/CosmWasm/wasmd/x/wasm/stargate/mint" - "github.com/CosmWasm/wasmd/x/wasm/stargate/slashing" - "github.com/CosmWasm/wasmd/x/wasm/stargate/staking" - "github.com/cosmos/cosmos-sdk/x/authz" ) // StargateLayerBindings keeps whitelist and its deterministic @@ -24,74 +14,5 @@ import ( var StargateLayerBindings sync.Map func init() { - // auth - StargateLayerBindings.Store("/cosmos.auth.v1beta1.Query/Account", &auth.QueryAccountResponse{}) - StargateLayerBindings.Store("/cosmos.auth.v1beta1.Query/Accounts", &auth.QueryAccountsResponse{}) - StargateLayerBindings.Store("/cosmos.auth.v1beta1.Query/Params", &auth.QueryParamsResponse{}) - - // authz - StargateLayerBindings.Store("/cosmos.authz.v1beta1.Query/Grants", &authz.QueryGrantsResponse{}) - StargateLayerBindings.Store("/cosmos.authz.v1beta1.Query/GranterGrants", &authz.QueryGranterGrantsResponse{}) - StargateLayerBindings.Store("/cosmos.authz.v1beta1.Query/GranteeGrants", &authz.QueryGranteeGrantsResponse{}) - - // bank - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/Balance", &bank.QueryBalanceResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/AllBalances", &bank.QueryAllBalancesResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/SpendableBalances", &bank.QuerySpendableBalancesResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/TotalSupply", &bank.QueryTotalSupplyResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/SupplyOf", &bank.QuerySupplyOfResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/Params", &bank.QueryParamsResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/DenomMetadata", &bank.QueryDenomMetadataResponse{}) - StargateLayerBindings.Store("/cosmos.bank.v1beta1.Query/DenomsMetadata", &bank.QueryDenomsMetadataResponse{}) - - // distribution - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/Params", &distr.QueryParamsResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", &distr.QueryValidatorOutstandingRewardsResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/ValidatorCommission", &distr.QueryValidatorCommissionResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/ValidatorSlashes", &distr.QueryValidatorSlashesResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegationRewards", &distr.QueryDelegationRewardsResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", &distr.QueryDelegationTotalRewardsResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegatorValidators", &distr.QueryDelegatorValidatorsResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", &distr.QueryDelegatorWithdrawAddressResponse{}) - StargateLayerBindings.Store("/cosmos.distribution.v1beta1.Query/CommunityPool", &distr.QueryCommunityPoolResponse{}) - - // feegrant - StargateLayerBindings.Store("/cosmos.feegrant.v1beta1.Query/Allowance", &feegrant.QueryAllowanceResponse{}) - StargateLayerBindings.Store("/cosmos.feegrant.v1beta1.Query/Allowances", &feegrant.QueryAllowancesResponse{}) - - // gov - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Proposal", &gov.QueryProposalResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Proposals", &gov.QueryProposalsResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Vote", &gov.QueryVoteResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Votes", &gov.QueryVotesResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Params", &gov.QueryParamsResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Deposit", &gov.QueryDepositResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/Deposits", &gov.QueryDepositsResponse{}) - StargateLayerBindings.Store("/cosmos.gov.v1beta1.Query/TallyResult", &gov.QueryTallyResultResponse{}) - - // mint - StargateLayerBindings.Store("/cosmos.mint.v1beta1.Query/AnnualProvisions", &mint.QueryAnnualProvisionsResponse{}) - StargateLayerBindings.Store("/cosmos.mint.v1beta1.Query/Inflation", &mint.QueryInflationResponse{}) - StargateLayerBindings.Store("/cosmos.mint.v1beta1.Query/Params", &mint.QueryParamsResponse{}) - - // slashing - StargateLayerBindings.Store("/cosmos.slashing.v1beta1.Query/Params", &slashing.QueryParamsResponse{}) - StargateLayerBindings.Store("/cosmos.slashing.v1beta1.Query/SigningInfo", &slashing.QuerySigningInfoResponse{}) - StargateLayerBindings.Store("/cosmos.slashing.v1beta1.Query/SigningInfos", &slashing.QuerySigningInfosResponse{}) - // staking - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Validator", &staking.QueryValidatorResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Validators", &staking.QueryValidatorsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/ValidatorDelegations", &staking.QueryValidatorDelegationsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", &staking.QueryValidatorUnbondingDelegationsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Delegation", &staking.QueryDelegationResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/UnbondingDelegation", &staking.QueryUnbondingDelegationResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorDelegations", &staking.QueryDelegatorDelegationsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", &staking.QueryDelegatorUnbondingDelegationsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Redelegations", &staking.QueryRedelegationsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorValidator", &staking.QueryDelegatorValidatorResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/DelegatorValidators", &staking.QueryDelegatorValidatorsResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/HistoricalInfo", &staking.QueryHistoricalInfoResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Pool", &staking.QueryPoolResponse{}) - StargateLayerBindings.Store("/cosmos.staking.v1beta1.Query/Params", &staking.QueryParamsResponse{}) } diff --git a/x/wasm/stargate/auth/query.pb.go b/x/wasm/stargate/auth/query.pb.go deleted file mode 100644 index 1fb8af5c58..0000000000 --- a/x/wasm/stargate/auth/query.pb.go +++ /dev/null @@ -1,791 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/auth/query.proto - -package auth - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - types "github.com/cosmos/cosmos-sdk/codec/types" - query "github.com/cosmos/cosmos-sdk/types/query" - types1 "github.com/cosmos/cosmos-sdk/x/auth/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -type QueryAccountsResponse struct { - // accounts are the existing accounts - Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } -func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountsResponse) ProtoMessage() {} -func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_46d60c9da81fdbbf, []int{0} -} - -func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountsResponse.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 *QueryAccountsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountsResponse.Merge(m, src) -} - -func (m *QueryAccountsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryAccountsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo - -func (m *QueryAccountsResponse) GetAccounts() []*types.Any { - if m != nil { - return m.Accounts - } - return nil -} - -func (m *QueryAccountsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { - // account defines the account of the corresponding address. - Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } -func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountResponse) ProtoMessage() {} -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_46d60c9da81fdbbf, []int{1} -} - -func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountResponse.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 *QueryAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountResponse.Merge(m, src) -} - -func (m *QueryAccountResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo - -func (m *QueryAccountResponse) GetAccount() *types.Any { - if m != nil { - return m.Account - } - return nil -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params defines the parameters of the module. - Params types1.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_46d60c9da81fdbbf, []int{2} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() types1.Params { - if m != nil { - return m.Params - } - return types1.Params{} -} - -func init() { - proto.RegisterType((*QueryAccountsResponse)(nil), "cosmwasm.wasm.v1.stargate.auth.QueryAccountsResponse") - proto.RegisterType((*QueryAccountResponse)(nil), "cosmwasm.wasm.v1.stargate.auth.QueryAccountResponse") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.auth.QueryParamsResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/auth/query.proto", fileDescriptor_46d60c9da81fdbbf) -} - -var fileDescriptor_46d60c9da81fdbbf = []byte{ - // 375 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4a, 0x03, 0x31, - 0x10, 0xc6, 0x37, 0x2a, 0xb5, 0xa4, 0x9e, 0x6a, 0x85, 0x5a, 0x21, 0x96, 0x5e, 0x2c, 0x82, 0x09, - 0x5b, 0x4f, 0x82, 0x08, 0xad, 0x07, 0xf5, 0x56, 0x17, 0x41, 0xf0, 0x22, 0xd9, 0x35, 0xa6, 0x05, - 0x77, 0xb3, 0x6e, 0xb2, 0xd5, 0xbe, 0x85, 0x8f, 0xe0, 0x43, 0xf8, 0x10, 0xc5, 0x53, 0x8f, 0x9e, - 0x44, 0xda, 0x17, 0x91, 0xcd, 0x9f, 0xb6, 0xde, 0xbc, 0x84, 0x64, 0x32, 0xdf, 0x37, 0xbf, 0x19, - 0x06, 0x1e, 0x46, 0x42, 0xc6, 0x2f, 0x54, 0xc6, 0x44, 0x1f, 0x23, 0x9f, 0x48, 0x45, 0x33, 0x4e, - 0x15, 0x23, 0x34, 0x57, 0x03, 0xf2, 0x9c, 0xb3, 0x6c, 0x8c, 0xd3, 0x4c, 0x28, 0x51, 0x45, 0x2e, - 0x17, 0xeb, 0x63, 0xe4, 0x63, 0x97, 0x8b, 0x8b, 0xdc, 0x86, 0xf6, 0x12, 0x92, 0x84, 0x54, 0x32, - 0x23, 0x24, 0x23, 0x3f, 0x64, 0x8a, 0xfa, 0x24, 0xa5, 0x7c, 0x98, 0x50, 0x35, 0x14, 0x89, 0xf1, - 0x6a, 0xd4, 0xb8, 0xe0, 0x42, 0x5f, 0x49, 0x71, 0xb3, 0xd1, 0x5d, 0x2e, 0x04, 0x7f, 0x62, 0x44, - 0xbf, 0xc2, 0xfc, 0x91, 0xd0, 0xc4, 0x16, 0x6f, 0x20, 0x6b, 0xae, 0xa9, 0x9c, 0x6d, 0xf1, 0x70, - 0x52, 0xf3, 0x7f, 0x6f, 0x3c, 0xcd, 0xc3, 0x7c, 0xb5, 0xde, 0x01, 0xdc, 0xb9, 0x2e, 0x70, 0xba, - 0x51, 0x24, 0xf2, 0x44, 0xc9, 0x80, 0xc9, 0x54, 0x24, 0x92, 0x55, 0xcf, 0x60, 0x99, 0xda, 0x58, - 0x1d, 0x34, 0xd7, 0xdb, 0x95, 0x4e, 0x0d, 0x1b, 0x04, 0xec, 0x10, 0x70, 0x37, 0x19, 0xf7, 0xb6, - 0x3e, 0x3f, 0x8e, 0xca, 0x56, 0x7d, 0x15, 0x2c, 0x34, 0xd5, 0x0b, 0x08, 0x97, 0x9d, 0xd5, 0xd7, - 0x9a, 0xa0, 0x5d, 0xe9, 0x1c, 0x60, 0x5b, 0xbc, 0x18, 0x03, 0x36, 0xf3, 0xb3, 0xbc, 0xb8, 0x4f, - 0x39, 0x73, 0xc5, 0x83, 0x15, 0x69, 0xeb, 0x06, 0xd6, 0x56, 0x09, 0x17, 0x80, 0xa7, 0x70, 0xd3, - 0x16, 0xab, 0x03, 0xed, 0xfe, 0x1f, 0x3e, 0x27, 0x69, 0xf5, 0xe1, 0xb6, 0x76, 0xed, 0xd3, 0x8c, - 0xc6, 0xcb, 0xae, 0x4f, 0x60, 0x29, 0xd5, 0x11, 0xeb, 0xb9, 0xe7, 0x88, 0xf5, 0x38, 0x97, 0xac, - 0x45, 0x4a, 0x6f, 0x63, 0xf2, 0xbd, 0xef, 0x05, 0x56, 0xd0, 0xbb, 0x9c, 0xcc, 0x10, 0x98, 0xce, - 0x10, 0xf8, 0x99, 0x21, 0xf0, 0x36, 0x47, 0xde, 0x74, 0x8e, 0xbc, 0xaf, 0x39, 0xf2, 0xee, 0x30, - 0x1f, 0xaa, 0x41, 0x1e, 0xe2, 0x48, 0xc4, 0xe4, 0x5c, 0xc8, 0xf8, 0xd6, 0xed, 0xd4, 0x03, 0x79, - 0x35, 0xbb, 0xf5, 0x67, 0xb1, 0xc2, 0x92, 0x6e, 0xe0, 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x0a, - 0x56, 0xde, 0x05, 0x81, 0x02, 0x00, 0x00, -} - -func (m *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Accounts) > 0 { - for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryAccountResponse) 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 *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.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 *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryAccountsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Accounts) > 0 { - for _, e := range m.Accounts { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Accounts = append(m.Accounts, &types.Any{}) - if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryAccountResponse) 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: QueryAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &types.Any{} - } - if err := m.Account.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/bank/query.pb.go b/x/wasm/stargate/bank/query.pb.go deleted file mode 100644 index b02d0a9719..0000000000 --- a/x/wasm/stargate/bank/query.pb.go +++ /dev/null @@ -1,1914 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/bank/query.proto - -package bank - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" - types1 "github.com/cosmos/cosmos-sdk/x/bank/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -type QueryBalanceResponse struct { - // balance is the balance of the coin. - Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } -func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceResponse) ProtoMessage() {} -func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{0} -} - -func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryBalanceResponse.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 *QueryBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceResponse.Merge(m, src) -} - -func (m *QueryBalanceResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo - -func (m *QueryBalanceResponse) GetBalance() *types.Coin { - if m != nil { - return m.Balance - } - return nil -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -type QueryAllBalancesResponse struct { - // balances is the balances of all the coins. - Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} } -func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllBalancesResponse) ProtoMessage() {} -func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{1} -} - -func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllBalancesResponse.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 *QueryAllBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src) -} - -func (m *QueryAllBalancesResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo - -func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Balances - } - return nil -} - -func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for -// querying an account's spendable balances. -type QuerySpendableBalancesResponse struct { - // balances is the spendable balances of all the coins. - Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QuerySpendableBalancesResponse) Reset() { *m = QuerySpendableBalancesResponse{} } -func (m *QuerySpendableBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*QuerySpendableBalancesResponse) ProtoMessage() {} -func (*QuerySpendableBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{2} -} - -func (m *QuerySpendableBalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QuerySpendableBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuerySpendableBalancesResponse.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 *QuerySpendableBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySpendableBalancesResponse.Merge(m, src) -} - -func (m *QuerySpendableBalancesResponse) XXX_Size() int { - return m.Size() -} - -func (m *QuerySpendableBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySpendableBalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySpendableBalancesResponse proto.InternalMessageInfo - -func (m *QuerySpendableBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Balances - } - return nil -} - -func (m *QuerySpendableBalancesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -type QueryTotalSupplyResponse struct { - // supply is the supply of the coins - Supply github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=supply,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"supply"` - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryTotalSupplyResponse) Reset() { *m = QueryTotalSupplyResponse{} } -func (m *QueryTotalSupplyResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTotalSupplyResponse) ProtoMessage() {} -func (*QueryTotalSupplyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{3} -} - -func (m *QueryTotalSupplyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryTotalSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTotalSupplyResponse.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 *QueryTotalSupplyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTotalSupplyResponse.Merge(m, src) -} - -func (m *QueryTotalSupplyResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryTotalSupplyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTotalSupplyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTotalSupplyResponse proto.InternalMessageInfo - -func (m *QueryTotalSupplyResponse) GetSupply() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Supply - } - return nil -} - -func (m *QueryTotalSupplyResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -type QuerySupplyOfResponse struct { - // amount is the supply of the coin. - Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` -} - -func (m *QuerySupplyOfResponse) Reset() { *m = QuerySupplyOfResponse{} } -func (m *QuerySupplyOfResponse) String() string { return proto.CompactTextString(m) } -func (*QuerySupplyOfResponse) ProtoMessage() {} -func (*QuerySupplyOfResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{4} -} - -func (m *QuerySupplyOfResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QuerySupplyOfResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuerySupplyOfResponse.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 *QuerySupplyOfResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySupplyOfResponse.Merge(m, src) -} - -func (m *QuerySupplyOfResponse) XXX_Size() int { - return m.Size() -} - -func (m *QuerySupplyOfResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySupplyOfResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySupplyOfResponse proto.InternalMessageInfo - -func (m *QuerySupplyOfResponse) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -type QueryParamsResponse struct { - Params types1.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{5} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() types1.Params { - if m != nil { - return m.Params - } - return types1.Params{} -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata -// RPC method. -type QueryDenomsMetadataResponse struct { - // metadata provides the client information for all the registered tokens. - Metadatas []types1.Metadata `protobuf:"bytes,1,rep,name=metadatas,proto3" json:"metadatas"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryDenomsMetadataResponse) Reset() { *m = QueryDenomsMetadataResponse{} } -func (m *QueryDenomsMetadataResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDenomsMetadataResponse) ProtoMessage() {} -func (*QueryDenomsMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{6} -} - -func (m *QueryDenomsMetadataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDenomsMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDenomsMetadataResponse.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 *QueryDenomsMetadataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDenomsMetadataResponse.Merge(m, src) -} - -func (m *QueryDenomsMetadataResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDenomsMetadataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDenomsMetadataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDenomsMetadataResponse proto.InternalMessageInfo - -func (m *QueryDenomsMetadataResponse) GetMetadatas() []types1.Metadata { - if m != nil { - return m.Metadatas - } - return nil -} - -func (m *QueryDenomsMetadataResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata -// RPC method. -type QueryDenomMetadataResponse struct { - // metadata describes and provides all the client information for the - // requested token. - Metadata types1.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` -} - -func (m *QueryDenomMetadataResponse) Reset() { *m = QueryDenomMetadataResponse{} } -func (m *QueryDenomMetadataResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDenomMetadataResponse) ProtoMessage() {} -func (*QueryDenomMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8253d806399b6a41, []int{7} -} - -func (m *QueryDenomMetadataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDenomMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDenomMetadataResponse.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 *QueryDenomMetadataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDenomMetadataResponse.Merge(m, src) -} - -func (m *QueryDenomMetadataResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDenomMetadataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDenomMetadataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDenomMetadataResponse proto.InternalMessageInfo - -func (m *QueryDenomMetadataResponse) GetMetadata() types1.Metadata { - if m != nil { - return m.Metadata - } - return types1.Metadata{} -} - -func init() { - proto.RegisterType((*QueryBalanceResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryBalanceResponse") - proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryAllBalancesResponse") - proto.RegisterType((*QuerySpendableBalancesResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QuerySpendableBalancesResponse") - proto.RegisterType((*QueryTotalSupplyResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryTotalSupplyResponse") - proto.RegisterType((*QuerySupplyOfResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QuerySupplyOfResponse") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryParamsResponse") - proto.RegisterType((*QueryDenomsMetadataResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryDenomsMetadataResponse") - proto.RegisterType((*QueryDenomMetadataResponse)(nil), "cosmwasm.wasm.v1.stargate.bank.QueryDenomMetadataResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/bank/query.proto", fileDescriptor_8253d806399b6a41) -} - -var fileDescriptor_8253d806399b6a41 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0xcf, 0x8a, 0x13, 0x41, - 0x10, 0xc6, 0x33, 0x2a, 0x71, 0x2d, 0x6f, 0x71, 0x85, 0x98, 0xc5, 0xde, 0x65, 0x2e, 0x2e, 0x82, - 0xdd, 0xc6, 0x3d, 0x88, 0x27, 0xd9, 0xac, 0xa0, 0x20, 0x62, 0x9c, 0x15, 0x04, 0xc1, 0x43, 0xcd, - 0xa4, 0x1d, 0x87, 0xcc, 0x74, 0x8f, 0xe9, 0x4e, 0x34, 0x6f, 0xe1, 0x6b, 0xe8, 0x93, 0xe4, 0xe0, - 0x61, 0xf1, 0xe4, 0x49, 0x25, 0x79, 0x11, 0x99, 0xfe, 0x33, 0x93, 0x65, 0x45, 0x3d, 0xc4, 0x8b, - 0x97, 0x49, 0xa7, 0xba, 0xbe, 0x5f, 0xd5, 0xd7, 0xdd, 0x14, 0xdc, 0x4c, 0xa4, 0x2a, 0xde, 0xa1, - 0x2a, 0x98, 0xf9, 0xcc, 0xfa, 0x4c, 0x69, 0x9c, 0xa4, 0xa8, 0x39, 0x8b, 0x51, 0x8c, 0xd9, 0xdb, - 0x29, 0x9f, 0xcc, 0x69, 0x39, 0x91, 0x5a, 0x76, 0x88, 0xcf, 0xa5, 0xe6, 0x33, 0xeb, 0x53, 0x9f, - 0x4b, 0xab, 0xdc, 0x9e, 0x61, 0x49, 0xc5, 0x62, 0x54, 0xdc, 0x0a, 0xd9, 0xac, 0x1f, 0x73, 0x8d, - 0x7d, 0x56, 0x62, 0x9a, 0x09, 0xd4, 0x99, 0x14, 0x96, 0xd5, 0xdb, 0x4e, 0x65, 0x2a, 0xcd, 0x92, - 0x55, 0x2b, 0x17, 0x25, 0xeb, 0x04, 0xaf, 0x4d, 0x64, 0x26, 0xce, 0xec, 0x8b, 0x71, 0xbd, 0x5f, - 0xfd, 0xb1, 0xfb, 0xe1, 0x63, 0xd8, 0x7e, 0x56, 0xd5, 0x1d, 0x60, 0x8e, 0x22, 0xe1, 0x11, 0x57, - 0xa5, 0x14, 0x8a, 0x77, 0x0e, 0xe0, 0x62, 0x6c, 0x43, 0xdd, 0x60, 0x2f, 0xd8, 0xbf, 0x7c, 0xe7, - 0x1a, 0xb5, 0x24, 0x5a, 0x55, 0xa2, 0x8e, 0x44, 0x8f, 0x64, 0x26, 0x22, 0x9f, 0x19, 0x7e, 0x0e, - 0xa0, 0x6b, 0x68, 0x87, 0x79, 0xee, 0x80, 0xaa, 0x26, 0xa6, 0xb0, 0xe5, 0xf2, 0x54, 0x37, 0xd8, - 0x3b, 0xff, 0x5b, 0xe4, 0xe0, 0xf6, 0xe2, 0xdb, 0x6e, 0xeb, 0xd3, 0xf7, 0xdd, 0xfd, 0x34, 0xd3, - 0x6f, 0xa6, 0x31, 0x4d, 0x64, 0xc1, 0x9c, 0x13, 0xfb, 0x73, 0x4b, 0x8d, 0xc6, 0x4c, 0xcf, 0x4b, - 0xae, 0x8c, 0x40, 0x45, 0x35, 0xbc, 0xf3, 0x10, 0xa0, 0x39, 0xbc, 0xee, 0x39, 0xd3, 0xfd, 0x8d, - 0x53, 0xa5, 0xec, 0x15, 0xf9, 0x82, 0x43, 0x4c, 0x6b, 0xdf, 0xd1, 0x9a, 0x34, 0xfc, 0x12, 0x00, - 0x31, 0x76, 0x8e, 0x4b, 0x2e, 0x46, 0x18, 0xe7, 0xfc, 0x3f, 0x30, 0xb5, 0xf0, 0x77, 0xf4, 0x5c, - 0x6a, 0xcc, 0x8f, 0xa7, 0x65, 0x99, 0xcf, 0x6b, 0x3b, 0x09, 0xb4, 0x95, 0x89, 0xfc, 0x0b, 0x33, - 0x0e, 0xbd, 0x39, 0x2b, 0x43, 0xb8, 0x6a, 0xaf, 0xc7, 0x70, 0x9f, 0xbe, 0xae, 0x6d, 0xdc, 0x85, - 0x36, 0x16, 0x72, 0x2a, 0xf4, 0x1f, 0xdf, 0xee, 0xe0, 0x42, 0x65, 0x23, 0x72, 0xe9, 0xe1, 0x10, - 0xae, 0x18, 0xe2, 0x10, 0x27, 0x58, 0x34, 0xb7, 0x7c, 0x0f, 0xda, 0xa5, 0x89, 0x38, 0xde, 0x4e, - 0xc3, 0x13, 0xe3, 0xb5, 0x3e, 0xab, 0x14, 0x4f, 0xb4, 0x82, 0xf0, 0x63, 0x00, 0x3b, 0x06, 0xf9, - 0x80, 0x0b, 0x59, 0xa8, 0x27, 0x5c, 0xe3, 0x08, 0x35, 0xd6, 0xe8, 0x43, 0xb8, 0x54, 0xb8, 0x98, - 0x7f, 0x41, 0xd7, 0x7f, 0x49, 0xf7, 0x4a, 0xc7, 0x6f, 0x54, 0x9b, 0x3b, 0xcf, 0x57, 0xd0, 0x6b, - 0x5a, 0x3d, 0xd3, 0xe9, 0x7d, 0xd8, 0xf2, 0x35, 0xdd, 0x31, 0xfc, 0x55, 0xa3, 0xb5, 0x68, 0xf0, - 0x68, 0xb1, 0x24, 0xc1, 0xc9, 0x92, 0x04, 0x3f, 0x96, 0x24, 0xf8, 0xb0, 0x22, 0xad, 0x93, 0x15, - 0x69, 0x7d, 0x5d, 0x91, 0xd6, 0x4b, 0xba, 0xf6, 0x86, 0x8e, 0xa4, 0x2a, 0x5e, 0xf8, 0xe9, 0x3a, - 0x62, 0xef, 0xed, 0x94, 0x3d, 0x35, 0x62, 0xe3, 0xb6, 0x99, 0x5d, 0x07, 0x3f, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x47, 0x1b, 0x95, 0xe1, 0x8b, 0x05, 0x00, 0x00, -} - -func (m *QueryBalanceResponse) 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 *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Balance != nil { - { - size, err := m.Balance.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 *QueryAllBalancesResponse) 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 *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Balances) > 0 { - for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QuerySpendableBalancesResponse) 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 *QuerySpendableBalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuerySpendableBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Balances) > 0 { - for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryTotalSupplyResponse) 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 *QueryTotalSupplyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTotalSupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Supply) > 0 { - for iNdEx := len(m.Supply) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Supply[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QuerySupplyOfResponse) 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 *QuerySupplyOfResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuerySupplyOfResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.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 *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.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 *QueryDenomsMetadataResponse) 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 *QueryDenomsMetadataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDenomsMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Metadatas) > 0 { - for iNdEx := len(m.Metadatas) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metadatas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDenomMetadataResponse) 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 *QueryDenomMetadataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDenomMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryBalanceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Balance != nil { - l = m.Balance.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllBalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Balances) > 0 { - for _, e := range m.Balances { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QuerySpendableBalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Balances) > 0 { - for _, e := range m.Balances { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTotalSupplyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Supply) > 0 { - for _, e := range m.Supply { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QuerySupplyOfResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryDenomsMetadataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Metadatas) > 0 { - for _, e := range m.Metadatas { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDenomMetadataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Metadata.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryBalanceResponse) 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: QueryBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Balance == nil { - m.Balance = &types.Coin{} - } - if err := m.Balance.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 *QueryAllBalancesResponse) 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: QueryAllBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balances = append(m.Balances, types.Coin{}) - if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QuerySpendableBalancesResponse) 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: QuerySpendableBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySpendableBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Balances = append(m.Balances, types.Coin{}) - if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryTotalSupplyResponse) 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: QueryTotalSupplyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTotalSupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Supply = append(m.Supply, types.Coin{}) - if err := m.Supply[len(m.Supply)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QuerySupplyOfResponse) 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: QuerySupplyOfResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySupplyOfResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryDenomsMetadataResponse) 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: QueryDenomsMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomsMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadatas = append(m.Metadatas, types1.Metadata{}) - if err := m.Metadatas[len(m.Metadatas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryDenomMetadataResponse) 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: QueryDenomMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/distribution/query.pb.go b/x/wasm/stargate/distribution/query.pb.go deleted file mode 100644 index dc19378140..0000000000 --- a/x/wasm/stargate/distribution/query.pb.go +++ /dev/null @@ -1,1963 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/distribution/query.proto - -package distribution - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/cosmos-sdk/x/distribution/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params defines the parameters of the module. - Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{0} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() types.Params { - if m != nil { - return m.Params - } - return types.Params{} -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -type QueryValidatorOutstandingRewardsResponse struct { - Rewards types.ValidatorOutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"` -} - -func (m *QueryValidatorOutstandingRewardsResponse) Reset() { - *m = QueryValidatorOutstandingRewardsResponse{} -} -func (m *QueryValidatorOutstandingRewardsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {} -func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{1} -} - -func (m *QueryValidatorOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorOutstandingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.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 *QueryValidatorOutstandingRewardsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.Merge(m, src) -} - -func (m *QueryValidatorOutstandingRewardsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorOutstandingRewardsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorOutstandingRewardsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorOutstandingRewardsResponse proto.InternalMessageInfo - -func (m *QueryValidatorOutstandingRewardsResponse) GetRewards() types.ValidatorOutstandingRewards { - if m != nil { - return m.Rewards - } - return types.ValidatorOutstandingRewards{} -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -type QueryValidatorCommissionResponse struct { - // commission defines the commission the validator received. - Commission types.ValidatorAccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission"` -} - -func (m *QueryValidatorCommissionResponse) Reset() { *m = QueryValidatorCommissionResponse{} } -func (m *QueryValidatorCommissionResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorCommissionResponse) ProtoMessage() {} -func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{2} -} - -func (m *QueryValidatorCommissionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorCommissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorCommissionResponse.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 *QueryValidatorCommissionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorCommissionResponse.Merge(m, src) -} - -func (m *QueryValidatorCommissionResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorCommissionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorCommissionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorCommissionResponse proto.InternalMessageInfo - -func (m *QueryValidatorCommissionResponse) GetCommission() types.ValidatorAccumulatedCommission { - if m != nil { - return m.Commission - } - return types.ValidatorAccumulatedCommission{} -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -type QueryValidatorSlashesResponse struct { - // slashes defines the slashes the validator received. - Slashes []types.ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryValidatorSlashesResponse) Reset() { *m = QueryValidatorSlashesResponse{} } -func (m *QueryValidatorSlashesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorSlashesResponse) ProtoMessage() {} -func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{3} -} - -func (m *QueryValidatorSlashesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorSlashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorSlashesResponse.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 *QueryValidatorSlashesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorSlashesResponse.Merge(m, src) -} - -func (m *QueryValidatorSlashesResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorSlashesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorSlashesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorSlashesResponse proto.InternalMessageInfo - -func (m *QueryValidatorSlashesResponse) GetSlashes() []types.ValidatorSlashEvent { - if m != nil { - return m.Slashes - } - return nil -} - -func (m *QueryValidatorSlashesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -type QueryDelegationRewardsResponse struct { - // rewards defines the rewards accrued by a delegation. - Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` -} - -func (m *QueryDelegationRewardsResponse) Reset() { *m = QueryDelegationRewardsResponse{} } -func (m *QueryDelegationRewardsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegationRewardsResponse) ProtoMessage() {} -func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{4} -} - -func (m *QueryDelegationRewardsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegationRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegationRewardsResponse.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 *QueryDelegationRewardsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegationRewardsResponse.Merge(m, src) -} - -func (m *QueryDelegationRewardsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegationRewardsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegationRewardsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegationRewardsResponse proto.InternalMessageInfo - -func (m *QueryDelegationRewardsResponse) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { - if m != nil { - return m.Rewards - } - return nil -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -type QueryDelegationTotalRewardsResponse struct { - // rewards defines all the rewards accrued by a delegator. - Rewards []types.DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards"` - // total defines the sum of all the rewards. - Total github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=total,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"total"` -} - -func (m *QueryDelegationTotalRewardsResponse) Reset() { *m = QueryDelegationTotalRewardsResponse{} } -func (m *QueryDelegationTotalRewardsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {} -func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{5} -} - -func (m *QueryDelegationTotalRewardsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegationTotalRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegationTotalRewardsResponse.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 *QueryDelegationTotalRewardsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegationTotalRewardsResponse.Merge(m, src) -} - -func (m *QueryDelegationTotalRewardsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegationTotalRewardsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegationTotalRewardsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegationTotalRewardsResponse proto.InternalMessageInfo - -func (m *QueryDelegationTotalRewardsResponse) GetRewards() []types.DelegationDelegatorReward { - if m != nil { - return m.Rewards - } - return nil -} - -func (m *QueryDelegationTotalRewardsResponse) GetTotal() github_com_cosmos_cosmos_sdk_types.DecCoins { - if m != nil { - return m.Total - } - return nil -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -type QueryDelegatorValidatorsResponse struct { - // validators defines the validators a delegator is delegating for. - Validators []string `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegatorValidatorsResponse{} } -func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} -func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{6} -} - -func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegatorValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegatorValidatorsResponse.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 *QueryDelegatorValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorValidatorsResponse.Merge(m, src) -} - -func (m *QueryDelegatorValidatorsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegatorValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorValidatorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegatorValidatorsResponse proto.InternalMessageInfo - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -type QueryDelegatorWithdrawAddressResponse struct { - // withdraw_address defines the delegator address to query for. - WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` -} - -func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDelegatorWithdrawAddressResponse{} } -func (m *QueryDelegatorWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} -func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{7} -} - -func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegatorWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.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 *QueryDelegatorWithdrawAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.Merge(m, src) -} - -func (m *QueryDelegatorWithdrawAddressResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegatorWithdrawAddressResponse proto.InternalMessageInfo - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -type QueryCommunityPoolResponse struct { - // pool defines community pool's coins. - Pool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=pool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"pool"` -} - -func (m *QueryCommunityPoolResponse) Reset() { *m = QueryCommunityPoolResponse{} } -func (m *QueryCommunityPoolResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCommunityPoolResponse) ProtoMessage() {} -func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9522630a60c4f8f, []int{8} -} - -func (m *QueryCommunityPoolResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryCommunityPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCommunityPoolResponse.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 *QueryCommunityPoolResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCommunityPoolResponse.Merge(m, src) -} - -func (m *QueryCommunityPoolResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryCommunityPoolResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCommunityPoolResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCommunityPoolResponse proto.InternalMessageInfo - -func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_types.DecCoins { - if m != nil { - return m.Pool - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryParamsResponse") - proto.RegisterType((*QueryValidatorOutstandingRewardsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryValidatorOutstandingRewardsResponse") - proto.RegisterType((*QueryValidatorCommissionResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryValidatorCommissionResponse") - proto.RegisterType((*QueryValidatorSlashesResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryValidatorSlashesResponse") - proto.RegisterType((*QueryDelegationRewardsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegationRewardsResponse") - proto.RegisterType((*QueryDelegationTotalRewardsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegationTotalRewardsResponse") - proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegatorValidatorsResponse") - proto.RegisterType((*QueryDelegatorWithdrawAddressResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryDelegatorWithdrawAddressResponse") - proto.RegisterType((*QueryCommunityPoolResponse)(nil), "cosmwasm.wasm.v1.stargate.distribution.QueryCommunityPoolResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/distribution/query.proto", fileDescriptor_d9522630a60c4f8f) -} - -var fileDescriptor_d9522630a60c4f8f = []byte{ - // 630 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x6b, 0xd4, 0x40, - 0x18, 0xc7, 0x33, 0xb5, 0xb6, 0x76, 0x7a, 0x50, 0x56, 0x0f, 0x4b, 0xd1, 0x6c, 0x49, 0x51, 0xab, - 0x62, 0xe2, 0xb6, 0x50, 0x44, 0x4f, 0xdd, 0xad, 0x78, 0x11, 0x5c, 0xa3, 0xb4, 0x45, 0x04, 0x99, - 0x4d, 0x86, 0xec, 0xd0, 0x24, 0x13, 0x33, 0x93, 0x5d, 0xf7, 0xac, 0x82, 0x17, 0xc1, 0x8f, 0xd0, - 0xb3, 0x1f, 0xc1, 0x4f, 0xd0, 0x63, 0x8f, 0x9e, 0x54, 0x76, 0x41, 0xfc, 0x18, 0x92, 0x79, 0xc9, - 0xcb, 0x22, 0x4b, 0x2f, 0xbd, 0x24, 0xc3, 0x33, 0xf3, 0xff, 0x3d, 0xff, 0x27, 0xcf, 0x93, 0x81, - 0x5b, 0x1e, 0x65, 0xd1, 0x08, 0xb1, 0xc8, 0x11, 0x8f, 0x61, 0xdb, 0x61, 0x1c, 0xa5, 0x01, 0xe2, - 0xd8, 0xf1, 0x09, 0xe3, 0x29, 0xe9, 0x67, 0x9c, 0xd0, 0xd8, 0x79, 0x97, 0xe1, 0x74, 0x6c, 0x27, - 0x29, 0xe5, 0xb4, 0x71, 0x4b, 0x6b, 0x6c, 0xf1, 0x18, 0xb6, 0x6d, 0xad, 0xb1, 0xab, 0x9a, 0xb5, - 0xbb, 0xf9, 0x39, 0xca, 0x9c, 0x3e, 0x62, 0x58, 0x02, 0x9c, 0x61, 0xbb, 0x8f, 0x39, 0x6a, 0x3b, - 0x09, 0x0a, 0x48, 0x8c, 0xf2, 0x53, 0x92, 0xb9, 0x76, 0x2d, 0xa0, 0x01, 0x15, 0x4b, 0x27, 0x5f, - 0xa9, 0xa8, 0x59, 0x25, 0x68, 0xad, 0x47, 0x89, 0x56, 0xd9, 0x6a, 0xbf, 0x66, 0x55, 0x9f, 0xab, - 0x06, 0xe5, 0x79, 0xeb, 0x10, 0x5e, 0x7d, 0x91, 0xfb, 0xe8, 0xa1, 0x14, 0x45, 0xcc, 0xc5, 0x2c, - 0xa1, 0x31, 0xc3, 0x8d, 0x5d, 0xb8, 0x94, 0x88, 0x48, 0x13, 0xac, 0x83, 0xcd, 0xd5, 0xad, 0x0d, - 0xc5, 0xad, 0x95, 0x63, 0x2b, 0xae, 0x2d, 0xc5, 0x9d, 0xc5, 0x93, 0x9f, 0x2d, 0xc3, 0x55, 0x42, - 0xeb, 0x23, 0x80, 0x9b, 0x02, 0xbd, 0x8f, 0x42, 0xe2, 0x23, 0x4e, 0xd3, 0xe7, 0x19, 0x67, 0x1c, - 0xc5, 0x3e, 0x89, 0x03, 0x17, 0x8f, 0x50, 0xea, 0x97, 0xf9, 0x0e, 0xe1, 0x72, 0x2a, 0x43, 0x2a, - 0xe1, 0xc3, 0xb9, 0x09, 0xe7, 0x20, 0x95, 0x0b, 0x8d, 0xb3, 0x3e, 0x01, 0xb8, 0x5e, 0xb7, 0xd1, - 0xa5, 0x51, 0x44, 0x18, 0x23, 0x34, 0x2e, 0xd2, 0x23, 0x08, 0xbd, 0x22, 0xaa, 0x1c, 0x3c, 0x3e, - 0x9b, 0x83, 0x5d, 0xcf, 0xcb, 0xa2, 0x2c, 0x44, 0x1c, 0xfb, 0x25, 0x58, 0x99, 0xa8, 0x40, 0xad, - 0xef, 0x00, 0xde, 0xa8, 0xfb, 0x78, 0x19, 0x22, 0x36, 0xc0, 0xe5, 0x37, 0xe8, 0xc1, 0x65, 0x26, - 0x43, 0x4d, 0xb0, 0x7e, 0x61, 0x73, 0x75, 0xeb, 0xc1, 0xd9, 0x1c, 0x08, 0xce, 0x93, 0x21, 0x8e, - 0xb9, 0xae, 0x5d, 0x61, 0x1a, 0x4f, 0x21, 0x2c, 0xc7, 0xaa, 0xb9, 0x20, 0xca, 0xba, 0xad, 0xa1, - 0xf9, 0x04, 0xd9, 0x72, 0x88, 0xcb, 0x3e, 0x06, 0x58, 0xdb, 0x71, 0x2b, 0x52, 0xeb, 0x0b, 0x80, - 0xa6, 0x30, 0xbf, 0x87, 0x43, 0x1c, 0x88, 0xd8, 0x6c, 0x07, 0x8f, 0xaa, 0x1d, 0xcc, 0xdd, 0x5f, - 0xaf, 0x25, 0xd2, 0x29, 0xf6, 0xb0, 0xd7, 0xa5, 0x24, 0xee, 0x6c, 0xe7, 0x4e, 0xbf, 0xfd, 0x6a, - 0xdd, 0x0b, 0x08, 0x1f, 0x64, 0x7d, 0xdb, 0xa3, 0x91, 0xa3, 0x46, 0x57, 0xbe, 0xee, 0x33, 0xff, - 0xc8, 0xe1, 0xe3, 0x04, 0x33, 0xad, 0x61, 0x65, 0x53, 0xff, 0x00, 0xb8, 0x31, 0xe3, 0xe7, 0x15, - 0xe5, 0x28, 0x9c, 0x35, 0xb5, 0x3f, 0x6b, 0x6a, 0x67, 0xee, 0x27, 0x2d, 0x69, 0x6a, 0x45, 0x53, - 0x49, 0x9c, 0x19, 0xaa, 0x46, 0x00, 0x2f, 0xf2, 0x3c, 0x5f, 0x73, 0xe1, 0xbc, 0x4a, 0x95, 0x7c, - 0xeb, 0x99, 0x1a, 0xde, 0xc2, 0x4f, 0xd1, 0xf5, 0xb2, 0x48, 0x13, 0xc2, 0x61, 0x11, 0x15, 0x75, - 0xae, 0xb8, 0x95, 0xc8, 0xa3, 0x4b, 0x9f, 0x8f, 0x5b, 0xc6, 0xdf, 0xe3, 0x96, 0x61, 0xbd, 0x81, - 0x37, 0xeb, 0xb4, 0x03, 0xc2, 0x07, 0x7e, 0x8a, 0x46, 0xbb, 0xbe, 0x9f, 0x62, 0x56, 0x22, 0xef, - 0xc0, 0x2b, 0x23, 0xb5, 0xf5, 0x16, 0xc9, 0x3d, 0xf1, 0x57, 0xac, 0xb8, 0x97, 0x47, 0x75, 0x49, - 0x85, 0xfe, 0x01, 0xc0, 0x35, 0x81, 0xcf, 0xff, 0x83, 0x2c, 0x26, 0x7c, 0xdc, 0xa3, 0x34, 0x2c, - 0x98, 0x18, 0x2e, 0x26, 0x94, 0x86, 0xe7, 0x37, 0x1d, 0x02, 0xdf, 0xe9, 0x9d, 0x4c, 0x4c, 0x70, - 0x3a, 0x31, 0xc1, 0xef, 0x89, 0x09, 0xbe, 0x4e, 0x4d, 0xe3, 0x74, 0x6a, 0x1a, 0x3f, 0xa6, 0xa6, - 0xf1, 0x7a, 0xa7, 0x02, 0xeb, 0x52, 0x16, 0x1d, 0xe8, 0x3b, 0xde, 0x77, 0xde, 0xcb, 0xbb, 0xfe, - 0xbf, 0x17, 0x7d, 0x7f, 0x49, 0xdc, 0x94, 0xdb, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xba, - 0x88, 0xc1, 0x19, 0x06, 0x00, 0x00, -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.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 *QueryValidatorOutstandingRewardsResponse) 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 *QueryValidatorOutstandingRewardsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorOutstandingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Rewards.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 *QueryValidatorCommissionResponse) 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 *QueryValidatorCommissionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorCommissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Commission.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 *QueryValidatorSlashesResponse) 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 *QueryValidatorSlashesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorSlashesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Slashes) > 0 { - for iNdEx := len(m.Slashes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Slashes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegationRewardsResponse) 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 *QueryDelegationRewardsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegationRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Rewards) > 0 { - for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegationTotalRewardsResponse) 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 *QueryDelegationTotalRewardsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegationTotalRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Total) > 0 { - for iNdEx := len(m.Total) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Total[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Rewards) > 0 { - for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegatorValidatorsResponse) 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 *QueryDelegatorValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Validators[iNdEx]) - copy(dAtA[i:], m.Validators[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Validators[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegatorWithdrawAddressResponse) 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 *QueryDelegatorWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.WithdrawAddress) > 0 { - i -= len(m.WithdrawAddress) - copy(dAtA[i:], m.WithdrawAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.WithdrawAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCommunityPoolResponse) 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 *QueryCommunityPoolResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCommunityPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Pool) > 0 { - for iNdEx := len(m.Pool) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pool[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryValidatorOutstandingRewardsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Rewards.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryValidatorCommissionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Commission.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryValidatorSlashesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Slashes) > 0 { - for _, e := range m.Slashes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDelegationRewardsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rewards) > 0 { - for _, e := range m.Rewards { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryDelegationTotalRewardsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rewards) > 0 { - for _, e := range m.Rewards { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if len(m.Total) > 0 { - for _, e := range m.Total { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryDelegatorValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Validators) > 0 { - for _, s := range m.Validators { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryDelegatorWithdrawAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.WithdrawAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCommunityPoolResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Pool) > 0 { - for _, e := range m.Pool { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryValidatorOutstandingRewardsResponse) 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: QueryValidatorOutstandingRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorOutstandingRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewards", 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.Rewards.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 *QueryValidatorCommissionResponse) 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: QueryValidatorCommissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorCommissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commission", 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.Commission.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 *QueryValidatorSlashesResponse) 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: QueryValidatorSlashesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorSlashesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Slashes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Slashes = append(m.Slashes, types.ValidatorSlashEvent{}) - if err := m.Slashes[len(m.Slashes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryDelegationRewardsResponse) 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: QueryDelegationRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegationRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rewards = append(m.Rewards, types1.DecCoin{}) - if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func (m *QueryDelegationTotalRewardsResponse) 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: QueryDelegationTotalRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegationTotalRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rewards = append(m.Rewards, types.DelegationDelegatorReward{}) - if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Total = append(m.Total, types1.DecCoin{}) - if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func (m *QueryDelegatorValidatorsResponse) 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: QueryDelegatorValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", 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.Validators = append(m.Validators, 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 *QueryDelegatorWithdrawAddressResponse) 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: QueryDelegatorWithdrawAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", 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.WithdrawAddress = 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 *QueryCommunityPoolResponse) 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: QueryCommunityPoolResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCommunityPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pool = append(m.Pool, types1.DecCoin{}) - if err := m.Pool[len(m.Pool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/feegrant/query.pb.go b/x/wasm/stargate/feegrant/query.pb.go deleted file mode 100644 index b6376735a5..0000000000 --- a/x/wasm/stargate/feegrant/query.pb.go +++ /dev/null @@ -1,603 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/feegrant/query.proto - -package feegrant - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - query "github.com/cosmos/cosmos-sdk/types/query" - feegrant "github.com/cosmos/cosmos-sdk/x/feegrant" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC -// method. -type QueryAllowanceResponse struct { - // allowance is a allowance granted for grantee by granter. - Allowance *feegrant.Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` -} - -func (m *QueryAllowanceResponse) Reset() { *m = QueryAllowanceResponse{} } -func (m *QueryAllowanceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllowanceResponse) ProtoMessage() {} -func (*QueryAllowanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_409749d27c4086d8, []int{0} -} - -func (m *QueryAllowanceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllowanceResponse.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 *QueryAllowanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllowanceResponse.Merge(m, src) -} - -func (m *QueryAllowanceResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryAllowanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllowanceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllowanceResponse proto.InternalMessageInfo - -func (m *QueryAllowanceResponse) GetAllowance() *feegrant.Grant { - if m != nil { - return m.Allowance - } - return nil -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC -// method. -type QueryAllowancesResponse struct { - // allowances are allowance's granted for grantee by granter. - Allowances []*feegrant.Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` - // pagination defines an pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllowancesResponse) Reset() { *m = QueryAllowancesResponse{} } -func (m *QueryAllowancesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllowancesResponse) ProtoMessage() {} -func (*QueryAllowancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_409749d27c4086d8, []int{1} -} - -func (m *QueryAllowancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllowancesResponse.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 *QueryAllowancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllowancesResponse.Merge(m, src) -} - -func (m *QueryAllowancesResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryAllowancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllowancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllowancesResponse proto.InternalMessageInfo - -func (m *QueryAllowancesResponse) GetAllowances() []*feegrant.Grant { - if m != nil { - return m.Allowances - } - return nil -} - -func (m *QueryAllowancesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -func init() { - proto.RegisterType((*QueryAllowanceResponse)(nil), "cosmwasm.wasm.v1.stargate.feegrant.QueryAllowanceResponse") - proto.RegisterType((*QueryAllowancesResponse)(nil), "cosmwasm.wasm.v1.stargate.feegrant.QueryAllowancesResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/feegrant/query.proto", fileDescriptor_409749d27c4086d8) -} - -var fileDescriptor_409749d27c4086d8 = []byte{ - // 296 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x4e, 0xc3, 0x30, - 0x14, 0x87, 0x6b, 0x90, 0x90, 0x30, 0x5b, 0x06, 0x88, 0x3a, 0x58, 0x55, 0x06, 0x40, 0x0c, 0xb6, - 0x52, 0x56, 0x84, 0x04, 0x0c, 0x5d, 0x18, 0x20, 0x03, 0x48, 0x6c, 0x2f, 0xc1, 0x84, 0x48, 0x4d, - 0x1c, 0xf2, 0xdc, 0x14, 0x6e, 0xc1, 0x19, 0x38, 0x0d, 0x63, 0x47, 0x46, 0x94, 0x5c, 0x04, 0x25, - 0xae, 0x9d, 0x22, 0x16, 0x16, 0x4b, 0x79, 0xfa, 0x7e, 0x5f, 0xde, 0x1f, 0xca, 0x13, 0x85, 0xf9, - 0x12, 0x30, 0x17, 0xfd, 0x53, 0x87, 0x02, 0x35, 0x54, 0x29, 0x68, 0x29, 0x9e, 0xa4, 0x4c, 0x2b, - 0x28, 0xb4, 0x78, 0x59, 0xc8, 0xea, 0x8d, 0x97, 0x95, 0xd2, 0xca, 0x0b, 0x2c, 0xcf, 0xfb, 0xa7, - 0x0e, 0xb9, 0xe5, 0xb9, 0xe5, 0xc7, 0x87, 0x1d, 0xa3, 0x70, 0x10, 0xd4, 0x61, 0x2c, 0x35, 0x84, - 0xae, 0x60, 0x5c, 0xe3, 0x93, 0x35, 0x17, 0x03, 0x4a, 0xf3, 0x13, 0x47, 0x96, 0x90, 0x66, 0x05, - 0xe8, 0x4c, 0x15, 0x86, 0x0d, 0xee, 0xe8, 0xfe, 0x6d, 0x47, 0x5c, 0xcc, 0xe7, 0x6a, 0x09, 0x45, - 0x22, 0x23, 0x89, 0xa5, 0x2a, 0x50, 0x7a, 0x67, 0x74, 0x17, 0x6c, 0xd1, 0x27, 0x13, 0x72, 0xbc, - 0x37, 0x65, 0xdc, 0x98, 0x5d, 0x4b, 0x7c, 0xed, 0xe5, 0xb3, 0xee, 0x2b, 0x1a, 0x02, 0xc1, 0x07, - 0xa1, 0x07, 0xbf, 0xc5, 0xe8, 0xcc, 0xe7, 0x94, 0x3a, 0x10, 0x7d, 0x32, 0xd9, 0xfe, 0x87, 0x7a, - 0x23, 0xe1, 0xcd, 0x28, 0x1d, 0xe6, 0xf0, 0xb7, 0xfa, 0xd6, 0x8e, 0x6c, 0xbe, 0x1b, 0x9a, 0x9b, - 0xcd, 0x5a, 0xc3, 0x0d, 0xa4, 0x6e, 0xac, 0x68, 0x23, 0x7a, 0x79, 0xfd, 0xd9, 0x30, 0xb2, 0x6a, - 0x18, 0xf9, 0x6e, 0x18, 0x79, 0x6f, 0xd9, 0x68, 0xd5, 0xb2, 0xd1, 0x57, 0xcb, 0x46, 0x0f, 0xd3, - 0x34, 0xd3, 0xcf, 0x8b, 0x98, 0x27, 0x2a, 0x17, 0x57, 0x0a, 0xf3, 0x7b, 0x7b, 0xc9, 0x47, 0xf1, - 0x6a, 0x2e, 0xfa, 0xe7, 0x9c, 0xf1, 0x4e, 0xbf, 0xd1, 0xd3, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xae, 0xa8, 0xb7, 0x7f, 0xfb, 0x01, 0x00, 0x00, -} - -func (m *QueryAllowanceResponse) 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 *QueryAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Allowance != nil { - { - size, err := m.Allowance.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 *QueryAllowancesResponse) 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 *QueryAllowancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Allowances) > 0 { - for iNdEx := len(m.Allowances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Allowances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryAllowanceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Allowance != nil { - l = m.Allowance.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllowancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Allowances) > 0 { - for _, e := range m.Allowances { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryAllowanceResponse) 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: QueryAllowanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Allowance == nil { - m.Allowance = &feegrant.Grant{} - } - if err := m.Allowance.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 *QueryAllowancesResponse) 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: QueryAllowancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllowancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allowances", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Allowances = append(m.Allowances, &feegrant.Grant{}) - if err := m.Allowances[len(m.Allowances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/gov/query.pb.go b/x/wasm/stargate/gov/query.pb.go deleted file mode 100644 index b0eedaec53..0000000000 --- a/x/wasm/stargate/gov/query.pb.go +++ /dev/null @@ -1,1935 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/gov/query.proto - -package gov - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/cosmos-sdk/x/gov/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -type QueryProposalResponse struct { - Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` -} - -func (m *QueryProposalResponse) Reset() { *m = QueryProposalResponse{} } -func (m *QueryProposalResponse) String() string { return proto.CompactTextString(m) } -func (*QueryProposalResponse) ProtoMessage() {} -func (*QueryProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{0} -} - -func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryProposalResponse.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 *QueryProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryProposalResponse.Merge(m, src) -} - -func (m *QueryProposalResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryProposalResponse proto.InternalMessageInfo - -func (m *QueryProposalResponse) GetProposal() types.Proposal { - if m != nil { - return m.Proposal - } - return types.Proposal{} -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -type QueryProposalsResponse struct { - Proposals []types.Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryProposalsResponse) Reset() { *m = QueryProposalsResponse{} } -func (m *QueryProposalsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryProposalsResponse) ProtoMessage() {} -func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{1} -} - -func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryProposalsResponse.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 *QueryProposalsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryProposalsResponse.Merge(m, src) -} - -func (m *QueryProposalsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryProposalsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryProposalsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryProposalsResponse proto.InternalMessageInfo - -func (m *QueryProposalsResponse) GetProposals() []types.Proposal { - if m != nil { - return m.Proposals - } - return nil -} - -func (m *QueryProposalsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -type QueryVoteResponse struct { - // vote defined the queried vote. - Vote types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"` -} - -func (m *QueryVoteResponse) Reset() { *m = QueryVoteResponse{} } -func (m *QueryVoteResponse) String() string { return proto.CompactTextString(m) } -func (*QueryVoteResponse) ProtoMessage() {} -func (*QueryVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{2} -} - -func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryVoteResponse.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 *QueryVoteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryVoteResponse.Merge(m, src) -} - -func (m *QueryVoteResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryVoteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryVoteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryVoteResponse proto.InternalMessageInfo - -func (m *QueryVoteResponse) GetVote() types.Vote { - if m != nil { - return m.Vote - } - return types.Vote{} -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -type QueryVotesResponse struct { - // votes defined the queried votes. - Votes []types.Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryVotesResponse) Reset() { *m = QueryVotesResponse{} } -func (m *QueryVotesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryVotesResponse) ProtoMessage() {} -func (*QueryVotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{3} -} - -func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryVotesResponse.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 *QueryVotesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryVotesResponse.Merge(m, src) -} - -func (m *QueryVotesResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryVotesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryVotesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryVotesResponse proto.InternalMessageInfo - -func (m *QueryVotesResponse) GetVotes() []types.Vote { - if m != nil { - return m.Votes - } - return nil -} - -func (m *QueryVotesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // voting_params defines the parameters related to voting. - VotingParams types.VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params"` - // deposit_params defines the parameters related to deposit. - DepositParams types.DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params"` - // tally_params defines the parameters related to tally. - TallyParams types.TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{4} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetVotingParams() types.VotingParams { - if m != nil { - return m.VotingParams - } - return types.VotingParams{} -} - -func (m *QueryParamsResponse) GetDepositParams() types.DepositParams { - if m != nil { - return m.DepositParams - } - return types.DepositParams{} -} - -func (m *QueryParamsResponse) GetTallyParams() types.TallyParams { - if m != nil { - return m.TallyParams - } - return types.TallyParams{} -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -type QueryDepositResponse struct { - // deposit defines the requested deposit. - Deposit types.Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` -} - -func (m *QueryDepositResponse) Reset() { *m = QueryDepositResponse{} } -func (m *QueryDepositResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDepositResponse) ProtoMessage() {} -func (*QueryDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{5} -} - -func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDepositResponse.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 *QueryDepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDepositResponse.Merge(m, src) -} - -func (m *QueryDepositResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDepositResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDepositResponse proto.InternalMessageInfo - -func (m *QueryDepositResponse) GetDeposit() types.Deposit { - if m != nil { - return m.Deposit - } - return types.Deposit{} -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -type QueryDepositsResponse struct { - Deposits []types.Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryDepositsResponse) Reset() { *m = QueryDepositsResponse{} } -func (m *QueryDepositsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDepositsResponse) ProtoMessage() {} -func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{6} -} - -func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDepositsResponse.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 *QueryDepositsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDepositsResponse.Merge(m, src) -} - -func (m *QueryDepositsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDepositsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDepositsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDepositsResponse proto.InternalMessageInfo - -func (m *QueryDepositsResponse) GetDeposits() []types.Deposit { - if m != nil { - return m.Deposits - } - return nil -} - -func (m *QueryDepositsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -type QueryTallyResultResponse struct { - // tally defines the requested tally. - Tally types.TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally"` -} - -func (m *QueryTallyResultResponse) Reset() { *m = QueryTallyResultResponse{} } -func (m *QueryTallyResultResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTallyResultResponse) ProtoMessage() {} -func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a6ba112aa0885a9, []int{7} -} - -func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTallyResultResponse.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 *QueryTallyResultResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTallyResultResponse.Merge(m, src) -} - -func (m *QueryTallyResultResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryTallyResultResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTallyResultResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTallyResultResponse proto.InternalMessageInfo - -func (m *QueryTallyResultResponse) GetTally() types.TallyResult { - if m != nil { - return m.Tally - } - return types.TallyResult{} -} - -func init() { - proto.RegisterType((*QueryProposalResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryProposalResponse") - proto.RegisterType((*QueryProposalsResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryProposalsResponse") - proto.RegisterType((*QueryVoteResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryVoteResponse") - proto.RegisterType((*QueryVotesResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryVotesResponse") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryParamsResponse") - proto.RegisterType((*QueryDepositResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryDepositResponse") - proto.RegisterType((*QueryDepositsResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryDepositsResponse") - proto.RegisterType((*QueryTallyResultResponse)(nil), "cosmwasm.wasm.v1.stargate.gov.QueryTallyResultResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/gov/query.proto", fileDescriptor_8a6ba112aa0885a9) -} - -var fileDescriptor_8a6ba112aa0885a9 = []byte{ - // 523 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6b, 0xd4, 0x40, - 0x18, 0xc6, 0x77, 0x6c, 0xab, 0xf5, 0x6d, 0x2b, 0x18, 0xab, 0x84, 0x5a, 0xd3, 0x9a, 0x8b, 0x7f, - 0xc0, 0x0c, 0x5b, 0xbd, 0x89, 0x22, 0x55, 0x58, 0x41, 0x10, 0x5d, 0xc5, 0x05, 0x2f, 0x32, 0xdb, - 0x1d, 0xc6, 0xc0, 0x26, 0x6f, 0xcc, 0xcc, 0x46, 0xfb, 0x2d, 0x04, 0x3f, 0x80, 0x07, 0xbf, 0x4c, - 0x8f, 0x3d, 0x7a, 0x12, 0xd9, 0xfd, 0x1a, 0x1e, 0x64, 0xfe, 0x25, 0x59, 0xd8, 0x6a, 0x0f, 0xbd, - 0x84, 0x30, 0xf3, 0x3c, 0xbf, 0x79, 0x9e, 0x37, 0xbb, 0x03, 0x77, 0x0e, 0x50, 0x66, 0x9f, 0x99, - 0xcc, 0xa8, 0x79, 0x54, 0x5d, 0x2a, 0x15, 0x2b, 0x05, 0x53, 0x9c, 0x0a, 0xac, 0xe8, 0xa7, 0x09, - 0x2f, 0x0f, 0x93, 0xa2, 0x44, 0x85, 0xc1, 0x0d, 0x2f, 0x4d, 0xcc, 0xa3, 0xea, 0x26, 0x5e, 0x9a, - 0x08, 0xac, 0xb6, 0xee, 0xea, 0x6d, 0x94, 0x74, 0xc8, 0x24, 0xb7, 0x3e, 0x5a, 0x75, 0x87, 0x5c, - 0xb1, 0x2e, 0x2d, 0x98, 0x48, 0x73, 0xa6, 0x52, 0xcc, 0x2d, 0x6a, 0x6b, 0x53, 0xa0, 0x40, 0xf3, - 0x4a, 0xf5, 0x9b, 0x5b, 0xdd, 0x76, 0x04, 0x7d, 0xb0, 0xb7, 0x0a, 0xac, 0xec, 0x6e, 0x3c, 0x80, - 0xab, 0xaf, 0x35, 0xf5, 0x55, 0x89, 0x05, 0x4a, 0x36, 0xee, 0x73, 0x59, 0x60, 0x2e, 0x79, 0xf0, - 0x18, 0x56, 0x0b, 0xb7, 0x16, 0x92, 0x5d, 0x72, 0x7b, 0x6d, 0x6f, 0x3b, 0xb1, 0x24, 0x9d, 0x2b, - 0x71, 0xa4, 0xc4, 0xfb, 0xf6, 0x97, 0x8f, 0x7e, 0xed, 0x74, 0xfa, 0xb5, 0x27, 0xfe, 0x41, 0xe0, - 0xda, 0x1c, 0x59, 0xd6, 0xe8, 0x27, 0x70, 0xd1, 0xcb, 0x64, 0x48, 0x76, 0x97, 0x4e, 0xc9, 0x6e, - 0x4c, 0x41, 0x0f, 0xa0, 0x69, 0x1f, 0x9e, 0x33, 0xf1, 0x6e, 0x79, 0x84, 0x1e, 0x55, 0x62, 0x47, - 0x5c, 0x93, 0x98, 0xe0, 0xfe, 0xf8, 0x7e, 0xcb, 0x1a, 0xf7, 0xe0, 0xb2, 0x09, 0xf9, 0x0e, 0x55, - 0x2d, 0x08, 0xf6, 0x60, 0xb9, 0x42, 0xc5, 0x5d, 0xed, 0x70, 0x51, 0x34, 0xad, 0x77, 0xb1, 0x8c, - 0x36, 0xfe, 0x46, 0x20, 0xa8, 0x49, 0x4d, 0xd5, 0x07, 0xb0, 0xa2, 0xb7, 0x7d, 0xcd, 0xff, 0xb1, - 0xac, 0xf8, 0xec, 0xea, 0xfd, 0x21, 0x70, 0xc5, 0x7e, 0x04, 0x56, 0xb2, 0xac, 0x89, 0xf5, 0x02, - 0x36, 0x2a, 0x54, 0x69, 0x2e, 0x3e, 0x14, 0x66, 0xc3, 0x55, 0xdd, 0x3d, 0x21, 0x5e, 0x9a, 0x0b, - 0x0b, 0x70, 0x31, 0xd7, 0xab, 0xd6, 0x5a, 0xf0, 0x12, 0x2e, 0x8d, 0x78, 0x81, 0x32, 0x55, 0x9e, - 0x66, 0x13, 0xdf, 0x5c, 0x44, 0x7b, 0x66, 0x95, 0x73, 0xb8, 0x8d, 0x51, 0x7b, 0x31, 0x78, 0x0e, - 0xeb, 0x8a, 0x8d, 0xc7, 0x87, 0x9e, 0xb6, 0x64, 0x68, 0x3b, 0x8b, 0x68, 0x6f, 0xb5, 0x6e, 0x8e, - 0xb5, 0xa6, 0x9a, 0xa5, 0xf8, 0x0d, 0x6c, 0x9a, 0xf6, 0xee, 0xd0, 0xba, 0xfe, 0x43, 0xb8, 0xe0, - 0x8e, 0x74, 0xc5, 0xaf, 0xff, 0x23, 0xaa, 0x03, 0x7b, 0x47, 0xfc, 0x9d, 0xb8, 0xbf, 0x8c, 0xdb, - 0x6f, 0xa6, 0xfa, 0x08, 0x56, 0x9d, 0xc8, 0x7f, 0xef, 0x53, 0x70, 0x6b, 0xcb, 0xd9, 0x7d, 0xf5, - 0x01, 0x84, 0x26, 0xa0, 0x99, 0x4e, 0x9f, 0xcb, 0xc9, 0xb8, 0x5d, 0x7d, 0xc5, 0x4c, 0xc8, 0x15, - 0x3f, 0x79, 0xaa, 0xd6, 0xe7, 0x7f, 0x97, 0xc6, 0xb3, 0xdf, 0x3b, 0x9a, 0x46, 0xe4, 0x78, 0x1a, - 0x91, 0xdf, 0xd3, 0x88, 0x7c, 0x9d, 0x45, 0x9d, 0xe3, 0x59, 0xd4, 0xf9, 0x39, 0x8b, 0x3a, 0xef, - 0xef, 0x89, 0x54, 0x7d, 0x9c, 0x0c, 0x93, 0x03, 0xcc, 0xe8, 0x53, 0x94, 0xd9, 0xc0, 0xdf, 0x7d, - 0x23, 0xfa, 0xc5, 0xde, 0x81, 0xed, 0x0b, 0x70, 0x78, 0xde, 0x5c, 0x3e, 0xf7, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x4d, 0xd6, 0x94, 0xb0, 0x28, 0x05, 0x00, 0x00, -} - -func (m *QueryProposalResponse) 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 *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Proposal.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 *QueryProposalsResponse) 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 *QueryProposalsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Proposals) > 0 { - for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryVoteResponse) 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 *QueryVoteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Vote.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 *QueryVotesResponse) 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 *QueryVotesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Votes) > 0 { - for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.VotingParams.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 *QueryDepositResponse) 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 *QueryDepositResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Deposit.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 *QueryDepositsResponse) 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 *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Deposits) > 0 { - for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryTallyResultResponse) 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 *QueryTallyResultResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTallyResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Tally.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryProposalResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Proposal.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryProposalsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Proposals) > 0 { - for _, e := range m.Proposals { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryVoteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Vote.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryVotesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Votes) > 0 { - for _, e := range m.Votes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.VotingParams.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.DepositParams.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.TallyParams.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryDepositResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Deposit.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryDepositsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Deposits) > 0 { - for _, e := range m.Deposits { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTallyResultResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Tally.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryProposalResponse) 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: QueryProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", 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.Proposal.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 *QueryProposalsResponse) 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: QueryProposalsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProposalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Proposals = append(m.Proposals, types.Proposal{}) - if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryVoteResponse) 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: QueryVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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.Vote.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 *QueryVotesResponse) 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: QueryVotesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Votes = append(m.Votes, types.Vote{}) - if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", 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.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", 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.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", 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.TallyParams.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 *QueryDepositResponse) 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: QueryDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", 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.Deposit.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 *QueryDepositsResponse) 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: QueryDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deposits = append(m.Deposits, types.Deposit{}) - if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryTallyResultResponse) 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: QueryTallyResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTallyResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tally", 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.Tally.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/mint/query.pb.go b/x/wasm/stargate/mint/query.pb.go deleted file mode 100644 index a8259f8de1..0000000000 --- a/x/wasm/stargate/mint/query.pb.go +++ /dev/null @@ -1,695 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/mint/query.proto - -package mint - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/x/mint/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params defines the parameters of the module. - Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8ebde63af3133dc, []int{0} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() types.Params { - if m != nil { - return m.Params - } - return types.Params{} -} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -type QueryInflationResponse struct { - // inflation is the current minting inflation value. - Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"` -} - -func (m *QueryInflationResponse) Reset() { *m = QueryInflationResponse{} } -func (m *QueryInflationResponse) String() string { return proto.CompactTextString(m) } -func (*QueryInflationResponse) ProtoMessage() {} -func (*QueryInflationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8ebde63af3133dc, []int{1} -} - -func (m *QueryInflationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryInflationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryInflationResponse.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 *QueryInflationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryInflationResponse.Merge(m, src) -} - -func (m *QueryInflationResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryInflationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryInflationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryInflationResponse proto.InternalMessageInfo - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -type QueryAnnualProvisionsResponse struct { - // annual_provisions is the current minting annual provisions value. - AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"annual_provisions"` -} - -func (m *QueryAnnualProvisionsResponse) Reset() { *m = QueryAnnualProvisionsResponse{} } -func (m *QueryAnnualProvisionsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAnnualProvisionsResponse) ProtoMessage() {} -func (*QueryAnnualProvisionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8ebde63af3133dc, []int{2} -} - -func (m *QueryAnnualProvisionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryAnnualProvisionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAnnualProvisionsResponse.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 *QueryAnnualProvisionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAnnualProvisionsResponse.Merge(m, src) -} - -func (m *QueryAnnualProvisionsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryAnnualProvisionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAnnualProvisionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAnnualProvisionsResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.mint.QueryParamsResponse") - proto.RegisterType((*QueryInflationResponse)(nil), "cosmwasm.wasm.v1.stargate.mint.QueryInflationResponse") - proto.RegisterType((*QueryAnnualProvisionsResponse)(nil), "cosmwasm.wasm.v1.stargate.mint.QueryAnnualProvisionsResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/mint/query.proto", fileDescriptor_b8ebde63af3133dc) -} - -var fileDescriptor_b8ebde63af3133dc = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xb1, 0x4b, 0x03, 0x31, - 0x14, 0xc6, 0xef, 0x40, 0x0a, 0x46, 0x07, 0xad, 0x22, 0x52, 0x31, 0x95, 0x0e, 0x22, 0x82, 0x09, - 0xa7, 0x93, 0xa3, 0xd5, 0x41, 0xc1, 0xa1, 0x76, 0x11, 0x74, 0x90, 0xb4, 0x4d, 0xcf, 0x60, 0x93, - 0x77, 0x5e, 0xd2, 0xd3, 0x82, 0x7f, 0x84, 0x7f, 0x56, 0xc7, 0x8e, 0xe2, 0x50, 0xa4, 0xfd, 0x47, - 0xe4, 0x5e, 0x7a, 0xad, 0x3a, 0xba, 0xe4, 0xee, 0xde, 0xfb, 0xbe, 0xdf, 0x77, 0xe1, 0x23, 0x87, - 0x6d, 0xb0, 0xfa, 0x45, 0x58, 0xcd, 0xf1, 0xc8, 0x22, 0x6e, 0x9d, 0x48, 0x63, 0xe1, 0x24, 0xd7, - 0xca, 0x38, 0xfe, 0xdc, 0x97, 0xe9, 0x80, 0x25, 0x29, 0x38, 0x28, 0xd3, 0x42, 0xcb, 0xf0, 0xc8, - 0x22, 0x56, 0x68, 0x59, 0xae, 0xad, 0x6c, 0xc6, 0x10, 0x03, 0x4a, 0x79, 0xfe, 0xe6, 0x5d, 0x15, - 0x74, 0x81, 0xf5, 0xb8, 0x2c, 0x6a, 0x49, 0x27, 0x22, 0xfc, 0xf0, 0xfb, 0x5a, 0x83, 0x6c, 0xdc, - 0xe4, 0x21, 0x0d, 0x91, 0x0a, 0x6d, 0x9b, 0xd2, 0x26, 0x60, 0xac, 0x2c, 0x9f, 0x92, 0x52, 0x82, - 0x93, 0xed, 0x70, 0x2f, 0x3c, 0x58, 0x39, 0xde, 0x61, 0x9e, 0x83, 0x51, 0x6c, 0xc6, 0x61, 0xde, - 0x54, 0x5f, 0x1a, 0x8e, 0xab, 0x41, 0x73, 0x66, 0xa8, 0x75, 0xc9, 0x16, 0x12, 0xaf, 0x4c, 0xb7, - 0x27, 0x9c, 0x02, 0x33, 0x87, 0x5e, 0x93, 0x65, 0x55, 0x0c, 0x91, 0xbb, 0x5a, 0x67, 0xb9, 0xf5, - 0x73, 0x5c, 0xdd, 0x8f, 0x95, 0x7b, 0xec, 0xb7, 0x58, 0x1b, 0x34, 0x9f, 0xfd, 0xb1, 0x7f, 0x1c, - 0xd9, 0xce, 0x13, 0x77, 0x83, 0x44, 0x5a, 0x76, 0x21, 0xdb, 0xcd, 0x05, 0xa0, 0xf6, 0x46, 0x76, - 0x31, 0xe7, 0xcc, 0x98, 0xbe, 0xe8, 0x35, 0x52, 0xc8, 0x94, 0x55, 0x60, 0x16, 0x77, 0xb8, 0x27, - 0xeb, 0x02, 0x77, 0x0f, 0xc9, 0x7c, 0xf9, 0xcf, 0xd8, 0x35, 0xf1, 0x27, 0xa4, 0x7e, 0x39, 0x9c, - 0xd0, 0x70, 0x34, 0xa1, 0xe1, 0xd7, 0x84, 0x86, 0xef, 0x53, 0x1a, 0x8c, 0xa6, 0x34, 0xf8, 0x98, - 0xd2, 0xe0, 0x8e, 0xfd, 0x60, 0x9e, 0x83, 0xd5, 0xb7, 0x45, 0xbd, 0x1d, 0xfe, 0xea, 0x6b, 0xfe, - 0xd5, 0x71, 0xab, 0x84, 0x45, 0x9c, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x55, 0x7d, 0x13, - 0x0c, 0x02, 0x00, 0x00, -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.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 *QueryInflationResponse) 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 *QueryInflationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryInflationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Inflation.Size() - i -= size - if _, err := m.Inflation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAnnualProvisionsResponse) 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 *QueryAnnualProvisionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAnnualProvisionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.AnnualProvisions.Size() - i -= size - if _, err := m.AnnualProvisions.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryInflationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Inflation.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAnnualProvisionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.AnnualProvisions.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryInflationResponse) 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: QueryInflationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryInflationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inflation", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Inflation.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 *QueryAnnualProvisionsResponse) 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: QueryAnnualProvisionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAnnualProvisionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnnualProvisions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AnnualProvisions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/slashing/query.pb.go b/x/wasm/stargate/slashing/query.pb.go deleted file mode 100644 index e72b138cc7..0000000000 --- a/x/wasm/stargate/slashing/query.pb.go +++ /dev/null @@ -1,779 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/slashing/query.proto - -package slashing - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/cosmos-sdk/x/slashing/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsResponse is the response type for the Query/Params RPC method -type QueryParamsResponse struct { - Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5380f563330f7cc0, []int{0} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() types.Params { - if m != nil { - return m.Params - } - return types.Params{} -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -type QuerySigningInfoResponse struct { - // val_signing_info is the signing info of requested val cons address - ValSigningInfo types.ValidatorSigningInfo `protobuf:"bytes,1,opt,name=val_signing_info,json=valSigningInfo,proto3" json:"val_signing_info"` -} - -func (m *QuerySigningInfoResponse) Reset() { *m = QuerySigningInfoResponse{} } -func (m *QuerySigningInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QuerySigningInfoResponse) ProtoMessage() {} -func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5380f563330f7cc0, []int{1} -} - -func (m *QuerySigningInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QuerySigningInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuerySigningInfoResponse.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 *QuerySigningInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySigningInfoResponse.Merge(m, src) -} - -func (m *QuerySigningInfoResponse) XXX_Size() int { - return m.Size() -} - -func (m *QuerySigningInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySigningInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySigningInfoResponse proto.InternalMessageInfo - -func (m *QuerySigningInfoResponse) GetValSigningInfo() types.ValidatorSigningInfo { - if m != nil { - return m.ValSigningInfo - } - return types.ValidatorSigningInfo{} -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -type QuerySigningInfosResponse struct { - // info is the signing info of all validators - Info []types.ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QuerySigningInfosResponse) Reset() { *m = QuerySigningInfosResponse{} } -func (m *QuerySigningInfosResponse) String() string { return proto.CompactTextString(m) } -func (*QuerySigningInfosResponse) ProtoMessage() {} -func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5380f563330f7cc0, []int{2} -} - -func (m *QuerySigningInfosResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QuerySigningInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QuerySigningInfosResponse.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 *QuerySigningInfosResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySigningInfosResponse.Merge(m, src) -} - -func (m *QuerySigningInfosResponse) XXX_Size() int { - return m.Size() -} - -func (m *QuerySigningInfosResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySigningInfosResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySigningInfosResponse proto.InternalMessageInfo - -func (m *QuerySigningInfosResponse) GetInfo() []types.ValidatorSigningInfo { - if m != nil { - return m.Info - } - return nil -} - -func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.slashing.QueryParamsResponse") - proto.RegisterType((*QuerySigningInfoResponse)(nil), "cosmwasm.wasm.v1.stargate.slashing.QuerySigningInfoResponse") - proto.RegisterType((*QuerySigningInfosResponse)(nil), "cosmwasm.wasm.v1.stargate.slashing.QuerySigningInfosResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/slashing/query.proto", fileDescriptor_5380f563330f7cc0) -} - -var fileDescriptor_5380f563330f7cc0 = []byte{ - // 360 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x4a, 0xc3, 0x40, - 0x10, 0xc6, 0x13, 0x2d, 0x3d, 0xac, 0x20, 0x52, 0x3d, 0xd4, 0x1e, 0x52, 0xc9, 0x41, 0x45, 0x70, - 0x97, 0xd4, 0xb3, 0x97, 0x7a, 0x28, 0x82, 0x07, 0xad, 0xa2, 0x20, 0x48, 0x99, 0xb4, 0xe9, 0x76, - 0x21, 0xd9, 0x8d, 0xd9, 0x34, 0xda, 0xb7, 0xf0, 0x45, 0x7c, 0x8f, 0x1e, 0x7b, 0xf4, 0x24, 0xd2, - 0xbe, 0x88, 0x64, 0xff, 0xb4, 0x45, 0xf1, 0xe2, 0x65, 0x59, 0x26, 0xdf, 0xf7, 0xfb, 0x26, 0x3b, - 0x83, 0x70, 0x5f, 0xc8, 0xe4, 0x05, 0x64, 0x42, 0xd4, 0x51, 0x04, 0x44, 0xe6, 0x90, 0x51, 0xc8, - 0x23, 0x22, 0x63, 0x90, 0x23, 0xc6, 0x29, 0x79, 0x1e, 0x47, 0xd9, 0x04, 0xa7, 0x99, 0xc8, 0x45, - 0xcd, 0xb7, 0x7a, 0xac, 0x8e, 0x22, 0xc0, 0x56, 0x8f, 0xad, 0xbe, 0x71, 0x52, 0x6a, 0x84, 0x24, - 0x21, 0xc8, 0x48, 0x9b, 0x49, 0x11, 0x84, 0x51, 0x0e, 0x01, 0x49, 0x81, 0x32, 0x0e, 0x39, 0x13, - 0x5c, 0xf3, 0x1a, 0x7b, 0x54, 0x50, 0xa1, 0xae, 0xa4, 0xbc, 0x99, 0xea, 0xa1, 0x21, 0x2c, 0x5b, - 0xb0, 0x7e, 0x5b, 0xd0, 0x3a, 0xff, 0x0e, 0xed, 0xde, 0x94, 0xfc, 0x6b, 0xc8, 0x20, 0x91, 0xdd, - 0x48, 0xa6, 0x82, 0xcb, 0xa8, 0x76, 0x8e, 0xaa, 0xa9, 0xaa, 0xd4, 0xdd, 0x03, 0xf7, 0x78, 0xab, - 0xd5, 0xc4, 0x9a, 0xb7, 0x6c, 0x11, 0x1b, 0x1e, 0xd6, 0xc6, 0x76, 0x65, 0xfa, 0xd9, 0x74, 0xba, - 0xc6, 0xe4, 0x4f, 0x50, 0x5d, 0x51, 0x6f, 0x19, 0xe5, 0x8c, 0xd3, 0x4b, 0x3e, 0x14, 0x4b, 0xf4, - 0x13, 0xda, 0x29, 0x20, 0xee, 0x49, 0xfd, 0xa9, 0xc7, 0xf8, 0x50, 0x98, 0x90, 0xd3, 0x3f, 0x43, - 0xee, 0x21, 0x66, 0x03, 0xc8, 0x45, 0xb6, 0x06, 0x34, 0x91, 0xdb, 0x05, 0xc4, 0x6b, 0x55, 0xff, - 0xdd, 0x45, 0xfb, 0x3f, 0xb3, 0x57, 0xff, 0xd5, 0x41, 0x15, 0x13, 0xb8, 0xf9, 0xdf, 0x40, 0x05, - 0xa8, 0x75, 0x10, 0x5a, 0x4d, 0xa2, 0xbe, 0xa1, 0xfa, 0x3f, 0xb2, 0xb8, 0x72, 0x6c, 0x58, 0xcf, - 0x7c, 0xf5, 0x4c, 0x34, 0xb2, 0x5d, 0x74, 0xd7, 0xac, 0xed, 0xab, 0xe9, 0xdc, 0x73, 0x67, 0x73, - 0xcf, 0xfd, 0x9a, 0x7b, 0xee, 0xdb, 0xc2, 0x73, 0x66, 0x0b, 0xcf, 0xf9, 0x58, 0x78, 0xce, 0x63, - 0x8b, 0xb2, 0x7c, 0x34, 0x0e, 0x71, 0x5f, 0x24, 0xe4, 0x42, 0xc8, 0xe4, 0xc1, 0xee, 0xd8, 0x80, - 0xbc, 0xea, 0x5d, 0xfb, 0xb5, 0x68, 0x61, 0x55, 0x4d, 0xf5, 0xec, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0xb3, 0xff, 0x4e, 0x34, 0x95, 0x02, 0x00, 0x00, -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.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 *QuerySigningInfoResponse) 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 *QuerySigningInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuerySigningInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ValSigningInfo.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 *QuerySigningInfosResponse) 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 *QuerySigningInfosResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Info) > 0 { - for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QuerySigningInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ValSigningInfo.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QuerySigningInfosResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Info) > 0 { - for _, e := range m.Info { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QuerySigningInfoResponse) 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: QuerySigningInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySigningInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValSigningInfo", 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.ValSigningInfo.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 *QuerySigningInfosResponse) 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: QuerySigningInfosResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySigningInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = append(m.Info, types.ValidatorSigningInfo{}) - if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/wasm/stargate/staking/query.pb.go b/x/wasm/stargate/staking/query.pb.go deleted file mode 100644 index 9753b6dcd5..0000000000 --- a/x/wasm/stargate/staking/query.pb.go +++ /dev/null @@ -1,3226 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmwasm/wasm/v1/stargate/staking/query.proto - -package staking - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - query "github.com/cosmos/cosmos-sdk/types/query" - github_com_cosmos_cosmos_sdk_x_staking_types "github.com/cosmos/cosmos-sdk/x/staking/types" - types "github.com/cosmos/cosmos-sdk/x/staking/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -type QueryValidatorsResponse struct { - // validators contains all the queried validators. - Validators []types.Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryValidatorsResponse) Reset() { *m = QueryValidatorsResponse{} } -func (m *QueryValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorsResponse) ProtoMessage() {} -func (*QueryValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{0} -} - -func (m *QueryValidatorsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorsResponse.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 *QueryValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorsResponse.Merge(m, src) -} - -func (m *QueryValidatorsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorsResponse proto.InternalMessageInfo - -func (m *QueryValidatorsResponse) GetValidators() []types.Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *QueryValidatorsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -type QueryValidatorResponse struct { - // validator defines the the validator info. - Validator types.Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` -} - -func (m *QueryValidatorResponse) Reset() { *m = QueryValidatorResponse{} } -func (m *QueryValidatorResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorResponse) ProtoMessage() {} -func (*QueryValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{1} -} - -func (m *QueryValidatorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorResponse.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 *QueryValidatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorResponse.Merge(m, src) -} - -func (m *QueryValidatorResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorResponse proto.InternalMessageInfo - -func (m *QueryValidatorResponse) GetValidator() types.Validator { - if m != nil { - return m.Validator - } - return types.Validator{} -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -type QueryValidatorDelegationsResponse struct { - DelegationResponses github_com_cosmos_cosmos_sdk_x_staking_types.DelegationResponses `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3,castrepeated=github.com/cosmos/cosmos-sdk/x/staking/types.DelegationResponses" json:"delegation_responses"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryValidatorDelegationsResponse) Reset() { *m = QueryValidatorDelegationsResponse{} } -func (m *QueryValidatorDelegationsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryValidatorDelegationsResponse) ProtoMessage() {} -func (*QueryValidatorDelegationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{2} -} - -func (m *QueryValidatorDelegationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorDelegationsResponse.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 *QueryValidatorDelegationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorDelegationsResponse.Merge(m, src) -} - -func (m *QueryValidatorDelegationsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorDelegationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorDelegationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorDelegationsResponse proto.InternalMessageInfo - -func (m *QueryValidatorDelegationsResponse) GetDelegationResponses() github_com_cosmos_cosmos_sdk_x_staking_types.DelegationResponses { - if m != nil { - return m.DelegationResponses - } - return nil -} - -func (m *QueryValidatorDelegationsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -type QueryValidatorUnbondingDelegationsResponse struct { - UnbondingResponses []types.UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryValidatorUnbondingDelegationsResponse) Reset() { - *m = QueryValidatorUnbondingDelegationsResponse{} -} - -func (m *QueryValidatorUnbondingDelegationsResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryValidatorUnbondingDelegationsResponse) ProtoMessage() {} -func (*QueryValidatorUnbondingDelegationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{3} -} - -func (m *QueryValidatorUnbondingDelegationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryValidatorUnbondingDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse.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 *QueryValidatorUnbondingDelegationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse.Merge(m, src) -} - -func (m *QueryValidatorUnbondingDelegationsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryValidatorUnbondingDelegationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryValidatorUnbondingDelegationsResponse proto.InternalMessageInfo - -func (m *QueryValidatorUnbondingDelegationsResponse) GetUnbondingResponses() []types.UnbondingDelegation { - if m != nil { - return m.UnbondingResponses - } - return nil -} - -func (m *QueryValidatorUnbondingDelegationsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -type QueryDelegationResponse struct { - // delegation_responses defines the delegation info of a delegation. - DelegationResponse *types.DelegationResponse `protobuf:"bytes,1,opt,name=delegation_response,json=delegationResponse,proto3" json:"delegation_response,omitempty"` -} - -func (m *QueryDelegationResponse) Reset() { *m = QueryDelegationResponse{} } -func (m *QueryDelegationResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegationResponse) ProtoMessage() {} -func (*QueryDelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{4} -} - -func (m *QueryDelegationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegationResponse.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 *QueryDelegationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegationResponse.Merge(m, src) -} - -func (m *QueryDelegationResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegationResponse proto.InternalMessageInfo - -func (m *QueryDelegationResponse) GetDelegationResponse() *types.DelegationResponse { - if m != nil { - return m.DelegationResponse - } - return nil -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -type QueryUnbondingDelegationResponse struct { - // unbond defines the unbonding information of a delegation. - Unbond types.UnbondingDelegation `protobuf:"bytes,1,opt,name=unbond,proto3" json:"unbond"` -} - -func (m *QueryUnbondingDelegationResponse) Reset() { *m = QueryUnbondingDelegationResponse{} } -func (m *QueryUnbondingDelegationResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUnbondingDelegationResponse) ProtoMessage() {} -func (*QueryUnbondingDelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{5} -} - -func (m *QueryUnbondingDelegationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryUnbondingDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryUnbondingDelegationResponse.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 *QueryUnbondingDelegationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUnbondingDelegationResponse.Merge(m, src) -} - -func (m *QueryUnbondingDelegationResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryUnbondingDelegationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUnbondingDelegationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryUnbondingDelegationResponse proto.InternalMessageInfo - -func (m *QueryUnbondingDelegationResponse) GetUnbond() types.UnbondingDelegation { - if m != nil { - return m.Unbond - } - return types.UnbondingDelegation{} -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -type QueryDelegatorDelegationsResponse struct { - // delegation_responses defines all the delegations' info of a delegator. - DelegationResponses []types.DelegationResponse `protobuf:"bytes,1,rep,name=delegation_responses,json=delegationResponses,proto3" json:"delegation_responses"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryDelegatorDelegationsResponse) Reset() { *m = QueryDelegatorDelegationsResponse{} } -func (m *QueryDelegatorDelegationsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorDelegationsResponse) ProtoMessage() {} -func (*QueryDelegatorDelegationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{6} -} - -func (m *QueryDelegatorDelegationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegatorDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegatorDelegationsResponse.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 *QueryDelegatorDelegationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorDelegationsResponse.Merge(m, src) -} - -func (m *QueryDelegatorDelegationsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegatorDelegationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorDelegationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegatorDelegationsResponse proto.InternalMessageInfo - -func (m *QueryDelegatorDelegationsResponse) GetDelegationResponses() []types.DelegationResponse { - if m != nil { - return m.DelegationResponses - } - return nil -} - -func (m *QueryDelegatorDelegationsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -type QueryDelegatorUnbondingDelegationsResponse struct { - UnbondingResponses []types.UnbondingDelegation `protobuf:"bytes,1,rep,name=unbonding_responses,json=unbondingResponses,proto3" json:"unbonding_responses"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) Reset() { - *m = QueryDelegatorUnbondingDelegationsResponse{} -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryDelegatorUnbondingDelegationsResponse) ProtoMessage() {} -func (*QueryDelegatorUnbondingDelegationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{7} -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse.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 *QueryDelegatorUnbondingDelegationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse.Merge(m, src) -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegatorUnbondingDelegationsResponse proto.InternalMessageInfo - -func (m *QueryDelegatorUnbondingDelegationsResponse) GetUnbondingResponses() []types.UnbondingDelegation { - if m != nil { - return m.UnbondingResponses - } - return nil -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -type QueryRedelegationsResponse struct { - RedelegationResponses []types.RedelegationResponse `protobuf:"bytes,1,rep,name=redelegation_responses,json=redelegationResponses,proto3" json:"redelegation_responses"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryRedelegationsResponse) Reset() { *m = QueryRedelegationsResponse{} } -func (m *QueryRedelegationsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRedelegationsResponse) ProtoMessage() {} -func (*QueryRedelegationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{8} -} - -func (m *QueryRedelegationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryRedelegationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRedelegationsResponse.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 *QueryRedelegationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRedelegationsResponse.Merge(m, src) -} - -func (m *QueryRedelegationsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryRedelegationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRedelegationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRedelegationsResponse proto.InternalMessageInfo - -func (m *QueryRedelegationsResponse) GetRedelegationResponses() []types.RedelegationResponse { - if m != nil { - return m.RedelegationResponses - } - return nil -} - -func (m *QueryRedelegationsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -type QueryDelegatorValidatorsResponse struct { - // validators defines the the validators' info of a delegator. - Validators []types.Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegatorValidatorsResponse{} } -func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorValidatorsResponse) ProtoMessage() {} -func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{9} -} - -func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegatorValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegatorValidatorsResponse.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 *QueryDelegatorValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorValidatorsResponse.Merge(m, src) -} - -func (m *QueryDelegatorValidatorsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegatorValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorValidatorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegatorValidatorsResponse proto.InternalMessageInfo - -func (m *QueryDelegatorValidatorsResponse) GetValidators() []types.Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *QueryDelegatorValidatorsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -type QueryDelegatorValidatorResponse struct { - // validator defines the the validator info. - Validator types.Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"` -} - -func (m *QueryDelegatorValidatorResponse) Reset() { *m = QueryDelegatorValidatorResponse{} } -func (m *QueryDelegatorValidatorResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorValidatorResponse) ProtoMessage() {} -func (*QueryDelegatorValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{10} -} - -func (m *QueryDelegatorValidatorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryDelegatorValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDelegatorValidatorResponse.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 *QueryDelegatorValidatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorValidatorResponse.Merge(m, src) -} - -func (m *QueryDelegatorValidatorResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryDelegatorValidatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorValidatorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDelegatorValidatorResponse proto.InternalMessageInfo - -func (m *QueryDelegatorValidatorResponse) GetValidator() types.Validator { - if m != nil { - return m.Validator - } - return types.Validator{} -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -type QueryHistoricalInfoResponse struct { - // hist defines the historical info at the given height. - Hist *types.HistoricalInfo `protobuf:"bytes,1,opt,name=hist,proto3" json:"hist,omitempty"` -} - -func (m *QueryHistoricalInfoResponse) Reset() { *m = QueryHistoricalInfoResponse{} } -func (m *QueryHistoricalInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryHistoricalInfoResponse) ProtoMessage() {} -func (*QueryHistoricalInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{11} -} - -func (m *QueryHistoricalInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryHistoricalInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryHistoricalInfoResponse.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 *QueryHistoricalInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryHistoricalInfoResponse.Merge(m, src) -} - -func (m *QueryHistoricalInfoResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryHistoricalInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryHistoricalInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryHistoricalInfoResponse proto.InternalMessageInfo - -func (m *QueryHistoricalInfoResponse) GetHist() *types.HistoricalInfo { - if m != nil { - return m.Hist - } - return nil -} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -type QueryPoolResponse struct { - // pool defines the pool info. - Pool types.Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"` -} - -func (m *QueryPoolResponse) Reset() { *m = QueryPoolResponse{} } -func (m *QueryPoolResponse) String() string { return proto.CompactTextString(m) } -func (*QueryPoolResponse) ProtoMessage() {} -func (*QueryPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{12} -} - -func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryPoolResponse.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 *QueryPoolResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPoolResponse.Merge(m, src) -} - -func (m *QueryPoolResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryPoolResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPoolResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryPoolResponse proto.InternalMessageInfo - -func (m *QueryPoolResponse) GetPool() types.Pool { - if m != nil { - return m.Pool - } - return types.Pool{} -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_19131b0809aabffb, []int{13} -} - -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} - -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} - -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() types.Params { - if m != nil { - return m.Params - } - return types.Params{} -} - -func init() { - proto.RegisterType((*QueryValidatorsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorsResponse") - proto.RegisterType((*QueryValidatorResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorResponse") - proto.RegisterType((*QueryValidatorDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorDelegationsResponse") - proto.RegisterType((*QueryValidatorUnbondingDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryValidatorUnbondingDelegationsResponse") - proto.RegisterType((*QueryDelegationResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegationResponse") - proto.RegisterType((*QueryUnbondingDelegationResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryUnbondingDelegationResponse") - proto.RegisterType((*QueryDelegatorDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorDelegationsResponse") - proto.RegisterType((*QueryDelegatorUnbondingDelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorUnbondingDelegationsResponse") - proto.RegisterType((*QueryRedelegationsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryRedelegationsResponse") - proto.RegisterType((*QueryDelegatorValidatorsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorValidatorsResponse") - proto.RegisterType((*QueryDelegatorValidatorResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryDelegatorValidatorResponse") - proto.RegisterType((*QueryHistoricalInfoResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryHistoricalInfoResponse") - proto.RegisterType((*QueryPoolResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryPoolResponse") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmwasm.wasm.v1.stargate.staking.QueryParamsResponse") -} - -func init() { - proto.RegisterFile("cosmwasm/wasm/v1/stargate/staking/query.proto", fileDescriptor_19131b0809aabffb) -} - -var fileDescriptor_19131b0809aabffb = []byte{ - // 634 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x96, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xb3, 0xa5, 0x8a, 0xc4, 0xf4, 0x44, 0x52, 0x4a, 0x14, 0x90, 0x93, 0x58, 0x08, 0xaa, - 0x40, 0x6d, 0xa5, 0x48, 0x1c, 0x10, 0x07, 0x14, 0x40, 0xb4, 0xea, 0xa5, 0x18, 0x01, 0x02, 0x0e, - 0xd5, 0x3a, 0x5e, 0x1c, 0xab, 0xb1, 0xd7, 0x78, 0x9d, 0xd0, 0xbe, 0x05, 0x27, 0x5e, 0x01, 0x09, - 0xae, 0x3c, 0x44, 0x8f, 0xe1, 0x06, 0x17, 0x40, 0xc9, 0x8b, 0x20, 0xaf, 0x77, 0x37, 0x5f, 0x36, - 0x02, 0x94, 0x22, 0xc1, 0xc5, 0x75, 0x27, 0x33, 0xbf, 0xff, 0x7c, 0x25, 0xbb, 0xb0, 0xd5, 0xa1, - 0xcc, 0x7f, 0x8d, 0x99, 0x6f, 0xf2, 0xc7, 0xa0, 0x65, 0xb2, 0x18, 0x47, 0x2e, 0x8e, 0x49, 0xf2, - 0x72, 0xe8, 0x05, 0xae, 0xf9, 0xaa, 0x4f, 0xa2, 0x63, 0x23, 0x8c, 0x68, 0x4c, 0x4b, 0x0d, 0xe9, - 0x6e, 0xf0, 0xc7, 0xa0, 0x65, 0x48, 0x77, 0x43, 0xb8, 0x57, 0x9b, 0x89, 0x0b, 0x65, 0xa6, 0x8d, - 0x19, 0x49, 0x63, 0xcd, 0x41, 0xcb, 0x26, 0x31, 0x6e, 0x99, 0x21, 0x76, 0xbd, 0x00, 0xc7, 0x1e, - 0x0d, 0x52, 0x5c, 0x75, 0xdd, 0xa5, 0x2e, 0xe5, 0xaf, 0x66, 0xf2, 0x26, 0xac, 0x97, 0x05, 0x41, - 0x26, 0x20, 0xc3, 0xc5, 0xff, 0xa9, 0x97, 0xfe, 0x01, 0xc1, 0x85, 0x87, 0x09, 0xfe, 0x09, 0xee, - 0x79, 0x0e, 0x8e, 0x69, 0xc4, 0x2c, 0xc2, 0x42, 0x1a, 0x30, 0x52, 0x7a, 0x00, 0x30, 0x50, 0xd6, - 0x0a, 0xaa, 0x9f, 0xd9, 0x5c, 0xdb, 0x6e, 0x18, 0x29, 0x56, 0x26, 0x6a, 0x08, 0xac, 0xa1, 0xe2, - 0xdb, 0xab, 0x27, 0x5f, 0x6b, 0x05, 0x6b, 0x2a, 0x34, 0x01, 0x4d, 0x92, 0xae, 0xac, 0xd4, 0xd1, - 0xe6, 0xda, 0xf6, 0x55, 0x09, 0x4a, 0x2a, 0x34, 0xd2, 0xee, 0x48, 0xd6, 0x3e, 0x76, 0x89, 0xcc, - 0xc2, 0x9a, 0x0a, 0xd5, 0x0f, 0x60, 0x63, 0x36, 0x59, 0x95, 0xeb, 0x7d, 0x38, 0xab, 0x04, 0x2b, - 0x88, 0x2b, 0xfc, 0x72, 0xaa, 0x93, 0x48, 0xfd, 0xed, 0x0a, 0x34, 0x66, 0x15, 0xee, 0x91, 0x1e, - 0x71, 0xb9, 0xfa, 0xa4, 0x31, 0xef, 0x10, 0xac, 0x3b, 0xca, 0x7e, 0x10, 0x09, 0xbb, 0xec, 0x51, - 0x33, 0x4f, 0x78, 0xc2, 0x92, 0xa8, 0xf6, 0x4e, 0x92, 0xc1, 0xfb, 0x6f, 0xb5, 0x3b, 0xae, 0x17, - 0x77, 0xfb, 0xb6, 0xd1, 0xa1, 0xbe, 0x29, 0x06, 0x97, 0xfe, 0xd9, 0x62, 0xce, 0xa1, 0x79, 0xa4, - 0xa6, 0x18, 0x1f, 0x87, 0x84, 0x65, 0x80, 0x98, 0x55, 0x76, 0x16, 0x8d, 0xcb, 0xeb, 0xfc, 0x17, - 0x04, 0xcd, 0xd9, 0xc6, 0x3c, 0x0e, 0x6c, 0x1a, 0x38, 0x5e, 0xe0, 0x66, 0x75, 0xc8, 0x86, 0x72, - 0x5f, 0x7e, 0xbe, 0xd0, 0x9f, 0x6b, 0x79, 0xfd, 0xc9, 0x40, 0x8a, 0x11, 0x95, 0x14, 0xed, 0x14, - 0x6a, 0x1b, 0x88, 0xaf, 0xc0, 0x62, 0x57, 0x4b, 0x2f, 0xa0, 0x9c, 0x31, 0x68, 0xb1, 0x60, 0xbf, - 0x31, 0x67, 0xab, 0xb4, 0x38, 0x1d, 0xdd, 0x87, 0x3a, 0xd7, 0xcd, 0x28, 0x5b, 0x25, 0xb0, 0x0b, - 0xc5, 0xb4, 0x74, 0xa1, 0xf9, 0x07, 0xbd, 0x13, 0x00, 0xfd, 0x13, 0x12, 0xbb, 0x2d, 0x3c, 0xb2, - 0x77, 0xbb, 0xb3, 0xb4, 0xd5, 0x4e, 0xd5, 0xff, 0xd2, 0x5a, 0xaa, 0x9a, 0xfe, 0x9f, 0xb5, 0x1c, - 0x22, 0xa8, 0xf2, 0xda, 0x2c, 0xe2, 0x64, 0xd4, 0xe2, 0xc1, 0x46, 0x44, 0x7e, 0x32, 0xaa, 0xeb, - 0x79, 0xe5, 0x4c, 0xe3, 0xe6, 0x86, 0x75, 0x3e, 0x22, 0xa7, 0x3a, 0xae, 0x8f, 0x48, 0xac, 0xbc, - 0x1a, 0xd7, 0x3f, 0x71, 0xec, 0x74, 0xa1, 0x96, 0x93, 0xf5, 0xb2, 0xcf, 0x9f, 0x67, 0x70, 0x91, - 0x2b, 0xed, 0x78, 0x2c, 0xa6, 0x91, 0xd7, 0xc1, 0xbd, 0xdd, 0xe0, 0x25, 0x55, 0x2a, 0xb7, 0x60, - 0xb5, 0xeb, 0xb1, 0x58, 0x08, 0x5c, 0xc9, 0x13, 0x98, 0x8b, 0xe6, 0x31, 0xfa, 0x1e, 0x9c, 0xe3, - 0xe8, 0x7d, 0x4a, 0x7b, 0x0a, 0x78, 0x13, 0x56, 0x43, 0x4a, 0x7b, 0x02, 0x78, 0x29, 0x0f, 0x98, - 0xc4, 0x88, 0x64, 0xb9, 0xbf, 0xfe, 0x08, 0xca, 0x29, 0x0c, 0x47, 0xd8, 0x9f, 0x8c, 0xee, 0x36, - 0x14, 0x43, 0x6e, 0x11, 0x40, 0x2d, 0x17, 0xc8, 0xbd, 0xe4, 0x0f, 0x54, 0x1a, 0xd3, 0xde, 0x3b, - 0x19, 0x69, 0x68, 0x38, 0xd2, 0xd0, 0xf7, 0x91, 0x86, 0xde, 0x8c, 0xb5, 0xc2, 0x70, 0xac, 0x15, - 0x3e, 0x8f, 0xb5, 0xc2, 0xf3, 0xd6, 0xd4, 0xe9, 0x78, 0x97, 0x32, 0xff, 0xa9, 0xbc, 0x6a, 0x39, - 0xe6, 0x51, 0x7a, 0xe5, 0x9a, 0xbf, 0x6f, 0xd9, 0x45, 0x7e, 0xbf, 0xb9, 0xf1, 0x23, 0x00, 0x00, - 0xff, 0xff, 0x85, 0xbb, 0x31, 0x57, 0x9b, 0x09, 0x00, 0x00, -} - -func (m *QueryValidatorsResponse) 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 *QueryValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryValidatorResponse) 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 *QueryValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Validator.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 *QueryValidatorDelegationsResponse) 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 *QueryValidatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DelegationResponses) > 0 { - for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryValidatorUnbondingDelegationsResponse) 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 *QueryValidatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryValidatorUnbondingDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.UnbondingResponses) > 0 { - for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegationResponse) 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 *QueryDelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DelegationResponse != nil { - { - size, err := m.DelegationResponse.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 *QueryUnbondingDelegationResponse) 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 *QueryUnbondingDelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryUnbondingDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Unbond.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 *QueryDelegatorDelegationsResponse) 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 *QueryDelegatorDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DelegationResponses) > 0 { - for iNdEx := len(m.DelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) 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 *QueryDelegatorUnbondingDelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.UnbondingResponses) > 0 { - for iNdEx := len(m.UnbondingResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbondingResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryRedelegationsResponse) 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 *QueryRedelegationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRedelegationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.RedelegationResponses) > 0 { - for iNdEx := len(m.RedelegationResponses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RedelegationResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegatorValidatorsResponse) 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 *QueryDelegatorValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDelegatorValidatorResponse) 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 *QueryDelegatorValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDelegatorValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Validator.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 *QueryHistoricalInfoResponse) 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 *QueryHistoricalInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryHistoricalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Hist != nil { - { - size, err := m.Hist.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 *QueryPoolResponse) 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 *QueryPoolResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Pool.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 *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -func (m *QueryValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryValidatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Validator.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryValidatorDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DelegationResponses) > 0 { - for _, e := range m.DelegationResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryValidatorUnbondingDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.UnbondingResponses) > 0 { - for _, e := range m.UnbondingResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDelegationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegationResponse != nil { - l = m.DelegationResponse.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryUnbondingDelegationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Unbond.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryDelegatorDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DelegationResponses) > 0 { - for _, e := range m.DelegationResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDelegatorUnbondingDelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.UnbondingResponses) > 0 { - for _, e := range m.UnbondingResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRedelegationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.RedelegationResponses) > 0 { - for _, e := range m.RedelegationResponses { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDelegatorValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDelegatorValidatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Validator.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryHistoricalInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Hist != nil { - l = m.Hist.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryPoolResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Pool.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} - -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func (m *QueryValidatorsResponse) 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: QueryValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, types.Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryValidatorResponse) 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: QueryValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator.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 *QueryValidatorDelegationsResponse) 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: QueryValidatorDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegationResponses = append(m.DelegationResponses, types.DelegationResponse{}) - if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryValidatorUnbondingDelegationsResponse) 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: QueryValidatorUnbondingDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryValidatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnbondingResponses = append(m.UnbondingResponses, types.UnbondingDelegation{}) - if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryDelegationResponse) 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: QueryDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DelegationResponse == nil { - m.DelegationResponse = &types.DelegationResponse{} - } - if err := m.DelegationResponse.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 *QueryUnbondingDelegationResponse) 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: QueryUnbondingDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnbondingDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unbond", 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.Unbond.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 *QueryDelegatorDelegationsResponse) 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: QueryDelegatorDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegationResponses = append(m.DelegationResponses, types.DelegationResponse{}) - if err := m.DelegationResponses[len(m.DelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryDelegatorUnbondingDelegationsResponse) 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: QueryDelegatorUnbondingDelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorUnbondingDelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnbondingResponses = append(m.UnbondingResponses, types.UnbondingDelegation{}) - if err := m.UnbondingResponses[len(m.UnbondingResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryRedelegationsResponse) 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: QueryRedelegationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRedelegationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedelegationResponses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedelegationResponses = append(m.RedelegationResponses, types.RedelegationResponse{}) - if err := m.RedelegationResponses[len(m.RedelegationResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryDelegatorValidatorsResponse) 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: QueryDelegatorValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, types.Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *QueryDelegatorValidatorResponse) 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: QueryDelegatorValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator.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 *QueryHistoricalInfoResponse) 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: QueryHistoricalInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryHistoricalInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hist == nil { - m.Hist = &types.HistoricalInfo{} - } - if err := m.Hist.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 *QueryPoolResponse) 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: QueryPoolResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", 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.Pool.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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) From b86125d68bfaca1d91ee3b377f782d70521c9de7 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 4 Aug 2022 20:40:22 +0900 Subject: [PATCH 03/11] Roman's review --- x/wasm/keeper/query_plugins.go | 2 +- x/wasm/keeper/stargate_bindings.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index c4b935ffe7..df9f031f90 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -283,7 +283,7 @@ func IBCQuerier(wasm contractMetaDataSource, channelKeeper types.ChannelKeeper) func StargateQuerier(queryRouter GRPCQueryRouter) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - binding, whitelisted := StargateLayerBindings.Load(request.Path) + binding, whitelisted := StargateWhitelist.Load(request.Path) if !whitelisted { return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)} } diff --git a/x/wasm/keeper/stargate_bindings.go b/x/wasm/keeper/stargate_bindings.go index 3c0416ed4a..9470994cdc 100644 --- a/x/wasm/keeper/stargate_bindings.go +++ b/x/wasm/keeper/stargate_bindings.go @@ -10,8 +10,8 @@ import ( // response binding for stargate queries. // // The query can be multi-thread, so we have to use -// thread safe sync.Map instead map[string]bool. -var StargateLayerBindings sync.Map +// thread safe sync.Map. +var StargateWhitelist sync.Map func init() { From b80874e8a4e965a995f677764e1ee9cd5c4d4d5e Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 4 Aug 2022 20:45:23 +0900 Subject: [PATCH 04/11] Minor improvement --- x/wasm/keeper/query_plugins.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index df9f031f90..232798351e 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -302,7 +302,7 @@ func StargateQuerier(queryRouter GRPCQueryRouter) func(ctx sdk.Context, request } // normalize response to ensure backward compatibility - bz, err := NormalizeReponses(binding, res.Value) + bz, err := NormalizeReponse(binding, res.Value) if err != nil { return nil, err } @@ -554,7 +554,9 @@ func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin { } } -func NormalizeReponses(binding interface{}, bz []byte) ([]byte, error) { +// NormalizeReponse returns normalized responses given proto interface. +// This is specifically important for type Any. +func NormalizeReponse(binding interface{}, bz []byte) ([]byte, error) { // all values are proto message message, ok := binding.(proto.Message) if !ok { From f33cd4c330c609ba3d2e28b8d55fb86b4d1fef83 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 4 Aug 2022 21:37:36 +0900 Subject: [PATCH 05/11] Add tests --- x/wasm/keeper/query_plugins_test.go | 114 ++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index f9282ac152..a5ff1e8f29 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -1,15 +1,20 @@ package keeper import ( + "encoding/hex" "encoding/json" "testing" "github.com/cosmos/cosmos-sdk/store" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/golang/protobuf/proto" dbm "github.com/tendermint/tm-db" wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -536,3 +541,112 @@ func (m bankKeeperMock) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk } return m.GetAllBalancesFn(ctx, addr) } + +/** + * Origin Response + * balances: pagination: + * "0a090a036261721202333012050a03666f6f" + * + * New Version Response + * The binary built from the proto response with additional field address + * balances: pagination: address:"cosmos1j6j5tsquq2jlw2af7l3xekyaq7zg4l8jsufu78" + * "0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738" +// Updated proto +message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // address is the address to query all balances for. + string address = 3; +} +// Origin proto +message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} +*/ + +func TestDeterministic_AllBalances(t *testing.T) { + originVersionBz, err := hex.DecodeString("0a090a036261721202333012050a03666f6f") + require.NoError(t, err) + + newVersionBz, err := hex.DecodeString("0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738") + require.NoError(t, err) + + StargateWhitelist.Store("/cosmos.bank.v1beta1.Query/AllBalances", &banktypes.QueryAllBalancesResponse{}) + binding, ok := StargateWhitelist.Load("/cosmos.bank.v1beta1.Query/AllBalances") + require.True(t, ok) + + // new version response should be changed into origin version response + normalizedBz, err := NormalizeReponse(binding, newVersionBz) + require.NoError(t, err) + + require.Equal(t, originVersionBz, normalizedBz) + require.NotEqual(t, newVersionBz, normalizedBz) + + // raw build also make same result + expectedResponse := banktypes.QueryAllBalancesResponse{ + Balances: sdk.NewCoins(sdk.NewCoin("bar", sdk.NewInt(30))), + Pagination: &query.PageResponse{ + NextKey: []byte("foo"), + }, + } + expectedResponseBz, err := proto.Marshal(&expectedResponse) + require.NoError(t, err) + require.Equal(t, expectedResponseBz, normalizedBz) + + // should be cleared + data := binding.(*banktypes.QueryAllBalancesResponse) + require.Empty(t, data.Balances) + require.Empty(t, data.Pagination) +} + +/** + * + * Origin Response + * 0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f7331346c3268686a6e676c3939367772703935673867646a6871653038326375367a7732706c686b + * + * Updated Response + * 0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f7331646a783375676866736d6b6135386676673076616a6e6533766c72776b7a6a346e6377747271122d636f736d6f7331646a783375676866736d6b6135386676673076616a6e6533766c72776b7a6a346e6377747271 +// Origin proto +message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; +} +// Updated proto +message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; + // address is the address to query for. + string address = 2; +} +*/ + +func TestDeterministic_Account(t *testing.T) { + originVersionBz, err := hex.DecodeString("0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679") + require.NoError(t, err) + + newVersionBz, err := hex.DecodeString("0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679122d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679") + require.NoError(t, err) + + StargateWhitelist.Store("/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}) + + binding, ok := StargateWhitelist.Load("/cosmos.auth.v1beta1.Query/Account") + require.True(t, ok) + + // new version response should be changed into origin version response + normalizedBz, err := NormalizeReponse(binding, newVersionBz) + require.NoError(t, err) + + require.Equal(t, originVersionBz, normalizedBz) + require.NotEqual(t, newVersionBz, normalizedBz) + + // should be cleared + data := binding.(*authtypes.QueryAccountResponse) + require.Empty(t, data.Account) +} From 0aaf23c9701bcdf7c3d46d490198c1917837cae7 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 1 Sep 2022 18:07:45 +0900 Subject: [PATCH 06/11] Add testings and codec --- x/wasm/keeper/keeper.go | 2 +- x/wasm/keeper/query_plugins.go | 26 ++- x/wasm/keeper/query_plugins_test.go | 290 ++++++++++++++++++---------- x/wasm/keeper/stargate_bindings.go | 2 + 4 files changed, 203 insertions(+), 117 deletions(-) diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index 93dad3f5b4..e5e65023f0 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -150,7 +150,7 @@ func NewKeeper( maxQueryStackSize: types.DefaultMaxQueryStackSize, acceptedAccountTypes: defaultAcceptedAccountTypes, } - keeper.wasmVMQueryHandler = DefaultQueryPlugins(bankKeeper, stakingKeeper, distKeeper, channelKeeper, queryRouter, keeper) + keeper.wasmVMQueryHandler = DefaultQueryPlugins(bankKeeper, stakingKeeper, distKeeper, channelKeeper, queryRouter, keeper, cdc) for _, o := range opts { o.apply(keeper) } diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index 232798351e..6ed7057c9c 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" @@ -104,13 +105,14 @@ func DefaultQueryPlugins( channelKeeper types.ChannelKeeper, queryRouter GRPCQueryRouter, wasm wasmQueryKeeper, + codec codec.Codec, ) QueryPlugins { return QueryPlugins{ Bank: BankQuerier(bank), Custom: NoCustomQuerier, IBC: IBCQuerier(wasm, channelKeeper), Staking: StakingQuerier(staking, distKeeper), - Stargate: StargateQuerier(queryRouter), + Stargate: StargateQuerier(queryRouter, codec), Wasm: WasmQuerier(wasm), } } @@ -281,9 +283,9 @@ func IBCQuerier(wasm contractMetaDataSource, channelKeeper types.ChannelKeeper) } } -func StargateQuerier(queryRouter GRPCQueryRouter) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { +func StargateQuerier(queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - binding, whitelisted := StargateWhitelist.Load(request.Path) + protoResponse, whitelisted := StargateWhitelist.Load(request.Path) if !whitelisted { return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)} } @@ -301,8 +303,7 @@ func StargateQuerier(queryRouter GRPCQueryRouter) func(ctx sdk.Context, request return nil, err } - // normalize response to ensure backward compatibility - bz, err := NormalizeReponse(binding, res.Value) + bz, err := ConvertProtoToJsonMarshal(protoResponse, res.Value, codec) if err != nil { return nil, err } @@ -554,11 +555,12 @@ func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin { } } -// NormalizeReponse returns normalized responses given proto interface. -// This is specifically important for type Any. -func NormalizeReponse(binding interface{}, bz []byte) ([]byte, error) { +// ConvertProtoToJsonMarshal unmarshals the given bytes into a proto message and then marshals it to json. +// This is done so that clients calling stargate queries do not need to define their own proto unmarshalers, +// being able to use response directly by json marshalling, which is supported in cosmwasm. +func ConvertProtoToJsonMarshal(protoResponse interface{}, bz []byte, codec codec.Codec) ([]byte, error) { // all values are proto message - message, ok := binding.(proto.Message) + message, ok := protoResponse.(proto.Message) if !ok { return nil, wasmvmtypes.Unknown{} } @@ -569,15 +571,11 @@ func NormalizeReponse(binding interface{}, bz []byte) ([]byte, error) { return nil, wasmvmtypes.Unknown{} } - // build new deterministic response - bz, err = proto.Marshal(message) + bz, err = codec.MarshalJSON(message) if err != nil { return nil, wasmvmtypes.Unknown{} } - // clear proto message - message.Reset() - return bz, nil } diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index a5ff1e8f29..3f0690f710 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -1,10 +1,15 @@ -package keeper +package keeper_test import ( "encoding/hex" "encoding/json" + "fmt" "testing" + "github.com/CosmWasm/wasmd/app" + "google.golang.org/protobuf/runtime/protoiface" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -19,6 +24,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" "github.com/CosmWasm/wasmd/x/wasm/types" ) @@ -312,8 +318,8 @@ func TestIBCQuerier(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - h := IBCQuerier(spec.wasmKeeper, spec.channelKeeper) - gotResult, gotErr := h(sdk.Context{}, RandomAccountAddress(t), spec.srcQuery) + h := keeper.IBCQuerier(spec.wasmKeeper, spec.channelKeeper) + gotResult, gotErr := h(sdk.Context{}, keeper.RandomAccountAddress(t), spec.srcQuery) require.True(t, spec.expErr.Is(gotErr), "exp %v but got %#+v", spec.expErr, gotErr) if spec.expErr != nil { return @@ -329,10 +335,10 @@ func TestBankQuerierBalance(t *testing.T) { }} ctx := sdk.Context{} - q := BankQuerier(mock) + q := keeper.BankQuerier(mock) gotBz, gotErr := q(ctx, &wasmvmtypes.BankQuery{ Balance: &wasmvmtypes.BalanceQuery{ - Address: RandomBech32AccountAddress(t), + Address: keeper.RandomBech32AccountAddress(t), Denom: "ALX", }, }) @@ -349,9 +355,9 @@ func TestBankQuerierBalance(t *testing.T) { } func TestContractInfoWasmQuerier(t *testing.T) { - myValidContractAddr := RandomBech32AccountAddress(t) - myCreatorAddr := RandomBech32AccountAddress(t) - myAdminAddr := RandomBech32AccountAddress(t) + myValidContractAddr := keeper.RandomBech32AccountAddress(t) + myCreatorAddr := keeper.RandomBech32AccountAddress(t) + myAdminAddr := keeper.RandomBech32AccountAddress(t) var ctx sdk.Context specs := map[string]struct { @@ -438,7 +444,7 @@ func TestContractInfoWasmQuerier(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - q := WasmQuerier(spec.mock) + q := keeper.WasmQuerier(spec.mock) gotBz, gotErr := q(ctx, spec.req) if spec.expErr { require.Error(t, gotErr) @@ -469,11 +475,11 @@ func TestQueryErrors(t *testing.T) { } for name, spec := range specs { t.Run(name, func(t *testing.T) { - mock := WasmVMQueryHandlerFn(func(ctx sdk.Context, caller sdk.AccAddress, request wasmvmtypes.QueryRequest) ([]byte, error) { + mock := keeper.WasmVMQueryHandlerFn(func(ctx sdk.Context, caller sdk.AccAddress, request wasmvmtypes.QueryRequest) ([]byte, error) { return nil, spec.src }) ctx := sdk.Context{}.WithGasMeter(sdk.NewInfiniteGasMeter()).WithMultiStore(store.NewCommitMultiStore(dbm.NewMemDB())) - q := NewQueryHandler(ctx, mock, sdk.AccAddress{}, NewDefaultWasmGasRegister()) + q := keeper.NewQueryHandler(ctx, mock, sdk.AccAddress{}, keeper.NewDefaultWasmGasRegister()) _, gotErr := q.Query(wasmvmtypes.QueryRequest{}, 1) assert.Equal(t, spec.expErr, gotErr) }) @@ -542,111 +548,191 @@ func (m bankKeeperMock) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk return m.GetAllBalancesFn(ctx, addr) } -/** - * Origin Response - * balances: pagination: - * "0a090a036261721202333012050a03666f6f" - * - * New Version Response - * The binary built from the proto response with additional field address - * balances: pagination: address:"cosmos1j6j5tsquq2jlw2af7l3xekyaq7zg4l8jsufu78" - * "0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738" -// Updated proto -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // address is the address to query all balances for. - string address = 3; -} -// Origin proto -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} -*/ +func TestConvertProtoToJsonMarshal(t *testing.T) { + testCases := []struct { + name string + queryPath string + protoResponseStruct proto.Message + originalResponse string + expectedProtoResponse proto.Message + expectedError bool + }{ + { + name: "successful conversion from proto response to json marshalled response", + queryPath: "/cosmos.bank.v1beta1.Query/AllBalances", + originalResponse: "0a090a036261721202333012050a03666f6f", + protoResponseStruct: &banktypes.QueryAllBalancesResponse{}, + expectedProtoResponse: &banktypes.QueryAllBalancesResponse{ + Balances: sdk.NewCoins(sdk.NewCoin("bar", sdk.NewInt(30))), + Pagination: &query.PageResponse{ + NextKey: []byte("foo"), + }, + }, + }, + { + name: "invalid proto response struct", + queryPath: "/cosmos.bank.v1beta1.Query/AllBalances", + originalResponse: "0a090a036261721202333012050a03666f6f", + protoResponseStruct: protoiface.MessageV1(nil), + expectedError: true, + }, + } -func TestDeterministic_AllBalances(t *testing.T) { - originVersionBz, err := hex.DecodeString("0a090a036261721202333012050a03666f6f") - require.NoError(t, err) + for _, tc := range testCases { + t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { + // set up app for testing + wasmApp := app.SetupWithEmptyStore(t) - newVersionBz, err := hex.DecodeString("0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738") - require.NoError(t, err) + originalVersionBz, err := hex.DecodeString(tc.originalResponse) + require.NoError(t, err) - StargateWhitelist.Store("/cosmos.bank.v1beta1.Query/AllBalances", &banktypes.QueryAllBalancesResponse{}) - binding, ok := StargateWhitelist.Load("/cosmos.bank.v1beta1.Query/AllBalances") - require.True(t, ok) + jsonMarshalledResponse, err := keeper.ConvertProtoToJsonMarshal(tc.protoResponseStruct, originalVersionBz, wasmApp.AppCodec()) + if tc.expectedError { + require.Error(t, err) + return + } + require.NoError(t, err) - // new version response should be changed into origin version response - normalizedBz, err := NormalizeReponse(binding, newVersionBz) - require.NoError(t, err) + // check response by json marshalling proto response into json response manually + jsonMarshalExpectedResponse, err := wasmApp.AppCodec().MarshalJSON(tc.expectedProtoResponse) + require.NoError(t, err) + require.Equal(t, jsonMarshalledResponse, jsonMarshalExpectedResponse) + }) + } +} - require.Equal(t, originVersionBz, normalizedBz) - require.NotEqual(t, newVersionBz, normalizedBz) +// TestDeterministicJsonMarshal tests that we get deterministic JSON marshalled response upon +// proto struct update in the state machine. +func TestDeterministicJsonMarshal(t *testing.T) { + + testCases := []struct { + name string + originalResponse string + updatedResponse string + queryPath string + responseProtoStruct interface{} + expectedProto func() proto.Message + }{ - // raw build also make same result - expectedResponse := banktypes.QueryAllBalancesResponse{ - Balances: sdk.NewCoins(sdk.NewCoin("bar", sdk.NewInt(30))), - Pagination: &query.PageResponse{ - NextKey: []byte("foo"), + /** + * Origin Response + * balances: pagination: + * "0a090a036261721202333012050a03666f6f" + * + * New Version Response + * The binary built from the proto response with additional field address + * balances: pagination: address:"cosmos1j6j5tsquq2jlw2af7l3xekyaq7zg4l8jsufu78" + * "0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738" + // Origin proto + message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; + } + // Updated proto + message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // address is the address to query all balances for. + string address = 3; + } + */ + { + "Query All Balances", + "0a090a036261721202333012050a03666f6f", + "0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738", + "/cosmos.bank.v1beta1.Query/AllBalances", + &banktypes.QueryAllBalancesResponse{}, + func() proto.Message { + return &banktypes.QueryAllBalancesResponse{ + Balances: sdk.NewCoins(sdk.NewCoin("bar", sdk.NewInt(30))), + Pagination: &query.PageResponse{ + NextKey: []byte("foo"), + }, + } + }, + }, + /** + * + * Origin Response + * 0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f7331346c3268686a6e676c3939367772703935673867646a6871653038326375367a7732706c686b + * + * Updated Response + * 0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f7331646a783375676866736d6b6135386676673076616a6e6533766c72776b7a6a346e6377747271122d636f736d6f7331646a783375676866736d6b6135386676673076616a6e6533766c72776b7a6a346e6377747271 + // Origin proto + message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; + } + // Updated proto + message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; + // address is the address to query for. + string address = 2; + } + */ + { + "Query Account", + "0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679", + "0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679122d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679", + "/cosmos.auth.v1beta1.Query/Account", + &authtypes.QueryAccountResponse{}, + func() proto.Message { + account := authtypes.BaseAccount{ + Address: "cosmos1f8uxultn8sqzhznrsz3q77xwaquhgrsg6jyvfy", + } + accountResponse, err := codectypes.NewAnyWithValue(&account) + require.NoError(t, err) + return &authtypes.QueryAccountResponse{ + Account: accountResponse, + } + }, }, } - expectedResponseBz, err := proto.Marshal(&expectedResponse) - require.NoError(t, err) - require.Equal(t, expectedResponseBz, normalizedBz) - - // should be cleared - data := binding.(*banktypes.QueryAllBalancesResponse) - require.Empty(t, data.Balances) - require.Empty(t, data.Pagination) -} -/** - * - * Origin Response - * 0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f7331346c3268686a6e676c3939367772703935673867646a6871653038326375367a7732706c686b - * - * Updated Response - * 0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f7331646a783375676866736d6b6135386676673076616a6e6533766c72776b7a6a346e6377747271122d636f736d6f7331646a783375676866736d6b6135386676673076616a6e6533766c72776b7a6a346e6377747271 -// Origin proto -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; -} -// Updated proto -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; - // address is the address to query for. - string address = 2; -} -*/ + for _, tc := range testCases { + t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { + // set up app for testing + wasmApp := app.SetupWithEmptyStore(t) + // wasmApp := app.SetupWithEmptyStore(t) -func TestDeterministic_Account(t *testing.T) { - originVersionBz, err := hex.DecodeString("0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679") - require.NoError(t, err) + // set up whitelist manually for testing + protoResponse, ok := tc.responseProtoStruct.(proto.Message) + require.True(t, ok) + keeper.StargateWhitelist.Store(tc.queryPath, protoResponse) - newVersionBz, err := hex.DecodeString("0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679122d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679") - require.NoError(t, err) + // decode original response + originVersionBz, err := hex.DecodeString(tc.originalResponse) + require.NoError(t, err) - StargateWhitelist.Store("/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}) + // use proto response struct by loading from whitelist + loadedResponseStruct, ok := keeper.StargateWhitelist.Load(tc.queryPath) + require.True(t, ok) + protoResponse, ok = loadedResponseStruct.(proto.Message) - binding, ok := StargateWhitelist.Load("/cosmos.auth.v1beta1.Query/Account") - require.True(t, ok) + jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJsonMarshal(protoResponse, originVersionBz, wasmApp.AppCodec()) + require.NoError(t, err) - // new version response should be changed into origin version response - normalizedBz, err := NormalizeReponse(binding, newVersionBz) - require.NoError(t, err) + wasmApp.AppCodec().MustUnmarshalJSON(jsonMarshalledOriginalBz, protoResponse) - require.Equal(t, originVersionBz, normalizedBz) - require.NotEqual(t, newVersionBz, normalizedBz) + newVersionBz, err := hex.DecodeString(tc.updatedResponse) + require.NoError(t, err) + jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJsonMarshal(protoResponse, newVersionBz, wasmApp.AppCodec()) + require.NoError(t, err) - // should be cleared - data := binding.(*authtypes.QueryAccountResponse) - require.Empty(t, data.Account) + // json marshalled bytes should be the same since we use the same proto sturct for unmarshalling + require.Equal(t, jsonMarshalledOriginalBz, jsonMarshalledUpdatedBz) + + // raw build should also make same result + jsonMarshalExpectedResponse, err := wasmApp.AppCodec().MarshalJSON(tc.expectedProto()) + require.NoError(t, err) + require.Equal(t, jsonMarshalledUpdatedBz, jsonMarshalExpectedResponse) + }) + } } diff --git a/x/wasm/keeper/stargate_bindings.go b/x/wasm/keeper/stargate_bindings.go index 9470994cdc..a913447456 100644 --- a/x/wasm/keeper/stargate_bindings.go +++ b/x/wasm/keeper/stargate_bindings.go @@ -13,6 +13,8 @@ import ( // thread safe sync.Map. var StargateWhitelist sync.Map +// Define whitelists here as maps using 'StargateWhitelist' +// e.x) StargateWhitelist.Store("/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}) func init() { } From 1748b226f54a33642da317d693ac5075605a9dc7 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 1 Sep 2022 18:25:00 +0900 Subject: [PATCH 07/11] Fix lint --- x/wasm/keeper/query_plugins.go | 6 +++--- x/wasm/keeper/query_plugins_test.go | 8 ++++---- x/wasm/keeper/stargate_bindings.go | 4 +--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index 6ed7057c9c..ce8e1db8dc 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -303,7 +303,7 @@ func StargateQuerier(queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sd return nil, err } - bz, err := ConvertProtoToJsonMarshal(protoResponse, res.Value, codec) + bz, err := ConvertProtoToJSONMarshal(protoResponse, res.Value, codec) if err != nil { return nil, err } @@ -555,10 +555,10 @@ func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin { } } -// ConvertProtoToJsonMarshal unmarshals the given bytes into a proto message and then marshals it to json. +// ConvertProtoToJSONMarshal unmarshals the given bytes into a proto message and then marshals it to json. // This is done so that clients calling stargate queries do not need to define their own proto unmarshalers, // being able to use response directly by json marshalling, which is supported in cosmwasm. -func ConvertProtoToJsonMarshal(protoResponse interface{}, bz []byte, codec codec.Codec) ([]byte, error) { +func ConvertProtoToJSONMarshal(protoResponse interface{}, bz []byte, codec codec.Codec) ([]byte, error) { // all values are proto message message, ok := protoResponse.(proto.Message) if !ok { diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index 3f0690f710..8a4abe63cd 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -548,7 +548,7 @@ func (m bankKeeperMock) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk return m.GetAllBalancesFn(ctx, addr) } -func TestConvertProtoToJsonMarshal(t *testing.T) { +func TestConvertProtoToJSONMarshal(t *testing.T) { testCases := []struct { name string queryPath string @@ -586,7 +586,7 @@ func TestConvertProtoToJsonMarshal(t *testing.T) { originalVersionBz, err := hex.DecodeString(tc.originalResponse) require.NoError(t, err) - jsonMarshalledResponse, err := keeper.ConvertProtoToJsonMarshal(tc.protoResponseStruct, originalVersionBz, wasmApp.AppCodec()) + jsonMarshalledResponse, err := keeper.ConvertProtoToJSONMarshal(tc.protoResponseStruct, originalVersionBz, wasmApp.AppCodec()) if tc.expectedError { require.Error(t, err) return @@ -716,14 +716,14 @@ func TestDeterministicJsonMarshal(t *testing.T) { require.True(t, ok) protoResponse, ok = loadedResponseStruct.(proto.Message) - jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJsonMarshal(protoResponse, originVersionBz, wasmApp.AppCodec()) + jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJSONMarshal(protoResponse, originVersionBz, wasmApp.AppCodec()) require.NoError(t, err) wasmApp.AppCodec().MustUnmarshalJSON(jsonMarshalledOriginalBz, protoResponse) newVersionBz, err := hex.DecodeString(tc.updatedResponse) require.NoError(t, err) - jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJsonMarshal(protoResponse, newVersionBz, wasmApp.AppCodec()) + jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJSONMarshal(protoResponse, newVersionBz, wasmApp.AppCodec()) require.NoError(t, err) // json marshalled bytes should be the same since we use the same proto sturct for unmarshalling diff --git a/x/wasm/keeper/stargate_bindings.go b/x/wasm/keeper/stargate_bindings.go index a913447456..a63b88a956 100644 --- a/x/wasm/keeper/stargate_bindings.go +++ b/x/wasm/keeper/stargate_bindings.go @@ -1,12 +1,10 @@ package keeper -//DONTCOVER - import ( "sync" ) -// StargateLayerBindings keeps whitelist and its deterministic +// StargateWhitelist keeps whitelist and its deterministic // response binding for stargate queries. // // The query can be multi-thread, so we have to use From 83b3f56728b00354c3ee81ae8ec86aa9917740f1 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 1 Sep 2022 22:15:11 +0900 Subject: [PATCH 08/11] Fix test --- x/wasm/keeper/reflect_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/wasm/keeper/reflect_test.go b/x/wasm/keeper/reflect_test.go index f478a32935..1336be7fee 100644 --- a/x/wasm/keeper/reflect_test.go +++ b/x/wasm/keeper/reflect_test.go @@ -384,10 +384,10 @@ func TestReflectInvalidStargateQuery(t *testing.T) { }) require.NoError(t, err) - // make a query on the chain, should be blacklisted + // make a query on the chain, should not be whitelisted _, err = keeper.QuerySmart(ctx, contractAddr, protoQueryBz) require.Error(t, err) - require.Contains(t, err.Error(), "Stargate queries are disabled") + require.Contains(t, err.Error(), "Unsupported query") // now, try to build a protobuf query protoRequest = wasmvmtypes.QueryRequest{ @@ -404,7 +404,7 @@ func TestReflectInvalidStargateQuery(t *testing.T) { // make a query on the chain, should be blacklisted _, err = keeper.QuerySmart(ctx, contractAddr, protoQueryBz) require.Error(t, err) - require.Contains(t, err.Error(), "Stargate queries are disabled") + require.Contains(t, err.Error(), "Unsupported query") // and another one protoRequest = wasmvmtypes.QueryRequest{ @@ -421,7 +421,7 @@ func TestReflectInvalidStargateQuery(t *testing.T) { // make a query on the chain, should be blacklisted _, err = keeper.QuerySmart(ctx, contractAddr, protoQueryBz) require.Error(t, err) - require.Contains(t, err.Error(), "Stargate queries are disabled") + require.Contains(t, err.Error(), "Unsupported query") } type reflectState struct { From 14aa31c85094116ea8ca433a351860abdcf7ca0b Mon Sep 17 00:00:00 2001 From: mattverse Date: Tue, 6 Sep 2022 16:11:33 +0900 Subject: [PATCH 09/11] Fix from code review --- x/wasm/keeper/query_plugins.go | 11 ++--- x/wasm/keeper/query_plugins_test.go | 71 ++--------------------------- x/wasm/keeper/stargate_bindings.go | 18 -------- x/wasm/keeper/stargate_whitelist.go | 18 ++++++++ 4 files changed, 28 insertions(+), 90 deletions(-) delete mode 100644 x/wasm/keeper/stargate_bindings.go create mode 100644 x/wasm/keeper/stargate_whitelist.go diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index ce8e1db8dc..da312ba675 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" @@ -285,7 +284,7 @@ func IBCQuerier(wasm contractMetaDataSource, channelKeeper types.ChannelKeeper) func StargateQuerier(queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - protoResponse, whitelisted := StargateWhitelist.Load(request.Path) + protoResponse, whitelisted := AcceptList.Load(request.Path) if !whitelisted { return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)} } @@ -558,20 +557,20 @@ func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin { // ConvertProtoToJSONMarshal unmarshals the given bytes into a proto message and then marshals it to json. // This is done so that clients calling stargate queries do not need to define their own proto unmarshalers, // being able to use response directly by json marshalling, which is supported in cosmwasm. -func ConvertProtoToJSONMarshal(protoResponse interface{}, bz []byte, codec codec.Codec) ([]byte, error) { +func ConvertProtoToJSONMarshal(protoResponse interface{}, bz []byte, cdc codec.Codec) ([]byte, error) { // all values are proto message - message, ok := protoResponse.(proto.Message) + message, ok := protoResponse.(codec.ProtoMarshaler) if !ok { return nil, wasmvmtypes.Unknown{} } // unmarshal binary into stargate response data structure - err := proto.Unmarshal(bz, message) + err := cdc.Unmarshal(bz, message) if err != nil { return nil, wasmvmtypes.Unknown{} } - bz, err = codec.MarshalJSON(message) + bz, err = cdc.MarshalJSON(message) if err != nil { return nil, wasmvmtypes.Unknown{} } diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index 8a4abe63cd..52440b25fb 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -596,7 +596,7 @@ func TestConvertProtoToJSONMarshal(t *testing.T) { // check response by json marshalling proto response into json response manually jsonMarshalExpectedResponse, err := wasmApp.AppCodec().MarshalJSON(tc.expectedProtoResponse) require.NoError(t, err) - require.Equal(t, jsonMarshalledResponse, jsonMarshalExpectedResponse) + require.JSONEq(t, string(jsonMarshalledResponse), string(jsonMarshalExpectedResponse)) }) } } @@ -604,7 +604,6 @@ func TestConvertProtoToJSONMarshal(t *testing.T) { // TestDeterministicJsonMarshal tests that we get deterministic JSON marshalled response upon // proto struct update in the state machine. func TestDeterministicJsonMarshal(t *testing.T) { - testCases := []struct { name string originalResponse string @@ -613,50 +612,6 @@ func TestDeterministicJsonMarshal(t *testing.T) { responseProtoStruct interface{} expectedProto func() proto.Message }{ - - /** - * Origin Response - * balances: pagination: - * "0a090a036261721202333012050a03666f6f" - * - * New Version Response - * The binary built from the proto response with additional field address - * balances: pagination: address:"cosmos1j6j5tsquq2jlw2af7l3xekyaq7zg4l8jsufu78" - * "0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738" - // Origin proto - message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; - } - // Updated proto - message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // address is the address to query all balances for. - string address = 3; - } - */ - { - "Query All Balances", - "0a090a036261721202333012050a03666f6f", - "0a090a036261721202333012050a03666f6f1a2d636f736d6f73316a366a357473717571326a6c77326166376c3378656b796171377a67346c386a737566753738", - "/cosmos.bank.v1beta1.Query/AllBalances", - &banktypes.QueryAllBalancesResponse{}, - func() proto.Message { - return &banktypes.QueryAllBalancesResponse{ - Balances: sdk.NewCoins(sdk.NewCoin("bar", sdk.NewInt(30))), - Pagination: &query.PageResponse{ - NextKey: []byte("foo"), - }, - } - }, - }, /** * * Origin Response @@ -698,38 +653,22 @@ func TestDeterministicJsonMarshal(t *testing.T) { for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - // set up app for testing wasmApp := app.SetupWithEmptyStore(t) - // wasmApp := app.SetupWithEmptyStore(t) - // set up whitelist manually for testing - protoResponse, ok := tc.responseProtoStruct.(proto.Message) - require.True(t, ok) - keeper.StargateWhitelist.Store(tc.queryPath, protoResponse) - - // decode original response originVersionBz, err := hex.DecodeString(tc.originalResponse) require.NoError(t, err) - - // use proto response struct by loading from whitelist - loadedResponseStruct, ok := keeper.StargateWhitelist.Load(tc.queryPath) - require.True(t, ok) - protoResponse, ok = loadedResponseStruct.(proto.Message) - - jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJSONMarshal(protoResponse, originVersionBz, wasmApp.AppCodec()) + jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJSONMarshal(tc.responseProtoStruct, originVersionBz, wasmApp.AppCodec()) require.NoError(t, err) - wasmApp.AppCodec().MustUnmarshalJSON(jsonMarshalledOriginalBz, protoResponse) - newVersionBz, err := hex.DecodeString(tc.updatedResponse) require.NoError(t, err) - jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJSONMarshal(protoResponse, newVersionBz, wasmApp.AppCodec()) + jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJSONMarshal(tc.responseProtoStruct, newVersionBz, wasmApp.AppCodec()) require.NoError(t, err) - // json marshalled bytes should be the same since we use the same proto sturct for unmarshalling + // json marshalled bytes should be the same since we use the same proto struct for unmarshalling require.Equal(t, jsonMarshalledOriginalBz, jsonMarshalledUpdatedBz) - // raw build should also make same result + // raw build also make same result jsonMarshalExpectedResponse, err := wasmApp.AppCodec().MarshalJSON(tc.expectedProto()) require.NoError(t, err) require.Equal(t, jsonMarshalledUpdatedBz, jsonMarshalExpectedResponse) diff --git a/x/wasm/keeper/stargate_bindings.go b/x/wasm/keeper/stargate_bindings.go deleted file mode 100644 index a63b88a956..0000000000 --- a/x/wasm/keeper/stargate_bindings.go +++ /dev/null @@ -1,18 +0,0 @@ -package keeper - -import ( - "sync" -) - -// StargateWhitelist keeps whitelist and its deterministic -// response binding for stargate queries. -// -// The query can be multi-thread, so we have to use -// thread safe sync.Map. -var StargateWhitelist sync.Map - -// Define whitelists here as maps using 'StargateWhitelist' -// e.x) StargateWhitelist.Store("/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}) -func init() { - -} diff --git a/x/wasm/keeper/stargate_whitelist.go b/x/wasm/keeper/stargate_whitelist.go new file mode 100644 index 0000000000..ce90738035 --- /dev/null +++ b/x/wasm/keeper/stargate_whitelist.go @@ -0,0 +1,18 @@ +package keeper + +import ( + "sync" +) + +// AcceptList keeps whitelist and its deterministic +// response binding for stargate queries. +// +// The query can be multi-thread, so we have to use +// thread safe sync.Map. +var AcceptList sync.Map + +// Define AcceptList here as maps using 'AcceptList' +// e.x) AcceptList.Store("/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}) +func init() { + +} From 40cf99030bd2018834c1c6e315c4ed02346c35b8 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Tue, 1 Nov 2022 15:10:08 +0100 Subject: [PATCH 10/11] Refactor Stargate querier init --- x/wasm/keeper/keeper.go | 4 +- x/wasm/keeper/options.go | 2 +- x/wasm/keeper/query_plugins.go | 53 +++++++------ x/wasm/keeper/query_plugins_test.go | 115 ++++++++++++++++++++++------ x/wasm/keeper/stargate_whitelist.go | 18 ----- x/wasm/simulation/proposals.go | 7 +- 6 files changed, 127 insertions(+), 72 deletions(-) delete mode 100644 x/wasm/keeper/stargate_whitelist.go diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index e5e65023f0..3112a26eb5 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -119,7 +119,7 @@ func NewKeeper( capabilityKeeper types.CapabilityKeeper, portSource types.ICS20TransferPortSource, router MessageRouter, - queryRouter GRPCQueryRouter, + _ GRPCQueryRouter, homeDir string, wasmConfig types.WasmConfig, availableCapabilities string, @@ -150,7 +150,7 @@ func NewKeeper( maxQueryStackSize: types.DefaultMaxQueryStackSize, acceptedAccountTypes: defaultAcceptedAccountTypes, } - keeper.wasmVMQueryHandler = DefaultQueryPlugins(bankKeeper, stakingKeeper, distKeeper, channelKeeper, queryRouter, keeper, cdc) + keeper.wasmVMQueryHandler = DefaultQueryPlugins(bankKeeper, stakingKeeper, distKeeper, channelKeeper, keeper) for _, o := range opts { o.apply(keeper) } diff --git a/x/wasm/keeper/options.go b/x/wasm/keeper/options.go index cc5547f22c..223a771f63 100644 --- a/x/wasm/keeper/options.go +++ b/x/wasm/keeper/options.go @@ -57,7 +57,7 @@ func WithQueryHandlerDecorator(d func(old WasmVMQueryHandler) WasmVMQueryHandler } // WithQueryPlugins is an optional constructor parameter to pass custom query plugins for wasmVM requests. -// This option expects the default `QueryHandler` set an should not be combined with Option `WithQueryHandler` or `WithQueryHandlerDecorator`. +// This option expects the default `QueryHandler` set and should not be combined with Option `WithQueryHandler` or `WithQueryHandlerDecorator`. func WithQueryPlugins(x *QueryPlugins) Option { return optsFn(func(k *Keeper) { q, ok := k.wasmVMQueryHandler.(QueryPlugins) diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index da312ba675..7196860d90 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -102,16 +102,14 @@ func DefaultQueryPlugins( staking types.StakingKeeper, distKeeper types.DistributionKeeper, channelKeeper types.ChannelKeeper, - queryRouter GRPCQueryRouter, wasm wasmQueryKeeper, - codec codec.Codec, ) QueryPlugins { return QueryPlugins{ Bank: BankQuerier(bank), Custom: NoCustomQuerier, IBC: IBCQuerier(wasm, channelKeeper), Staking: StakingQuerier(staking, distKeeper), - Stargate: StargateQuerier(queryRouter, codec), + Stargate: RejectStargateQuerier(), Wasm: WasmQuerier(wasm), } } @@ -282,10 +280,30 @@ func IBCQuerier(wasm contractMetaDataSource, channelKeeper types.ChannelKeeper) } } -func StargateQuerier(queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { +// RejectStargateQuerier rejects all stargate queries +func RejectStargateQuerier() func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { - protoResponse, whitelisted := AcceptList.Load(request.Path) - if !whitelisted { + return nil, wasmvmtypes.UnsupportedRequest{Kind: "Stargate queries are disabled"} + } +} + +// AcceptedStargateQueries define accepted Stargate queries as a map with path as key and response type as value. +// For example: +// acceptList["/cosmos.auth.v1beta1.Query/Account"]= &authtypes.QueryAccountResponse{} +type AcceptedStargateQueries map[string]codec.ProtoMarshaler + +// AcceptListStargateQuerier supports a preconfigured set of stargate queries only. +// All arguments must be non nil. +// +// Warning: Chains need to test and maintain their accept list carefully. +// There were critical consensus breaking issues in the past with non-deterministic behaviour in the SDK. +// +// This queries can be set via WithQueryPlugins option in the wasm keeper constructor: +// WithQueryPlugins(&QueryPlugins{Stargate: AcceptListStargateQuerier(acceptList, queryRouter, codec)}) +func AcceptListStargateQuerier(acceptList AcceptedStargateQueries, queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { + return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { + protoResponse, accepted := acceptList[request.Path] + if !accepted { return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", request.Path)} } @@ -302,12 +320,7 @@ func StargateQuerier(queryRouter GRPCQueryRouter, codec codec.Codec) func(ctx sd return nil, err } - bz, err := ConvertProtoToJSONMarshal(protoResponse, res.Value, codec) - if err != nil { - return nil, err - } - - return bz, nil + return ConvertProtoToJSONMarshal(codec, protoResponse, res.Value) } } @@ -557,22 +570,16 @@ func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin { // ConvertProtoToJSONMarshal unmarshals the given bytes into a proto message and then marshals it to json. // This is done so that clients calling stargate queries do not need to define their own proto unmarshalers, // being able to use response directly by json marshalling, which is supported in cosmwasm. -func ConvertProtoToJSONMarshal(protoResponse interface{}, bz []byte, cdc codec.Codec) ([]byte, error) { - // all values are proto message - message, ok := protoResponse.(codec.ProtoMarshaler) - if !ok { - return nil, wasmvmtypes.Unknown{} - } - +func ConvertProtoToJSONMarshal(cdc codec.Codec, protoResponse codec.ProtoMarshaler, bz []byte) ([]byte, error) { // unmarshal binary into stargate response data structure - err := cdc.Unmarshal(bz, message) + err := cdc.Unmarshal(bz, protoResponse) if err != nil { - return nil, wasmvmtypes.Unknown{} + return nil, sdkerrors.Wrap(err, "to proto") } - bz, err = cdc.MarshalJSON(message) + bz, err = cdc.MarshalJSON(protoResponse) if err != nil { - return nil, wasmvmtypes.Unknown{} + return nil, sdkerrors.Wrap(err, "to json") } return bz, nil diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index 52440b25fb..d27cc98c30 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -5,25 +5,27 @@ import ( "encoding/json" "fmt" "testing" + "time" - "github.com/CosmWasm/wasmd/app" - "google.golang.org/protobuf/runtime/protoiface" - + wasmvmtypes "github.com/CosmWasm/wasmvm/types" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/store" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/golang/protobuf/proto" - dbm "github.com/tendermint/tm-db" - - wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + dbm "github.com/tendermint/tm-db" + "github.com/CosmWasm/wasmd/app" "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/keeper/wasmtesting" "github.com/CosmWasm/wasmd/x/wasm/types" @@ -486,6 +488,71 @@ func TestQueryErrors(t *testing.T) { } } +func TestAcceptListStargateQuerier(t *testing.T) { + wasmApp := app.SetupWithEmptyStore(t) + ctx := wasmApp.NewUncachedContext(false, tmproto.Header{ChainID: "foo", Height: 1, Time: time.Now()}) + wasmApp.StakingKeeper.SetParams(ctx, stakingtypes.DefaultParams()) + + addrs := app.AddTestAddrs(wasmApp, ctx, 2, sdk.NewInt(1_000_000)) + accepted := keeper.AcceptedStargateQueries{ + "/cosmos.auth.v1beta1.Query/Account": &authtypes.QueryAccountResponse{}, + "/no/route/to/this": &authtypes.QueryAccountResponse{}, + } + + marshal := func(pb proto.Message) []byte { + b, err := proto.Marshal(pb) + require.NoError(t, err) + return b + } + + specs := map[string]struct { + req *wasmvmtypes.StargateQuery + expErr bool + expResp string + }{ + "in accept list - success result": { + req: &wasmvmtypes.StargateQuery{ + Path: "/cosmos.auth.v1beta1.Query/Account", + Data: marshal(&authtypes.QueryAccountRequest{Address: addrs[0].String()}), + }, + expResp: fmt.Sprintf(`{"account":{"@type":"/cosmos.auth.v1beta1.BaseAccount","address":%q,"pub_key":null,"account_number":"1","sequence":"0"}}`, addrs[0].String()), + }, + "in accept list - error result": { + req: &wasmvmtypes.StargateQuery{ + Path: "/cosmos.auth.v1beta1.Query/Account", + Data: marshal(&authtypes.QueryAccountRequest{Address: sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()).String()}), + }, + expErr: true, + }, + "not in accept list": { + req: &wasmvmtypes.StargateQuery{ + Path: "/cosmos.bank.v1beta1.Query/AllBalances", + Data: marshal(&banktypes.QueryAllBalancesRequest{Address: addrs[0].String()}), + }, + expErr: true, + }, + "unknown route": { + req: &wasmvmtypes.StargateQuery{ + Path: "/no/route/to/this", + Data: marshal(&banktypes.QueryAllBalancesRequest{Address: addrs[0].String()}), + }, + expErr: true, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + q := keeper.AcceptListStargateQuerier(accepted, wasmApp.GRPCQueryRouter(), wasmApp.AppCodec()) + gotBz, gotErr := q(ctx, spec.req) + if spec.expErr { + require.Error(t, gotErr) + return + } + require.NoError(t, gotErr) + assert.JSONEq(t, spec.expResp, string(gotBz), string(gotBz)) + }) + } +} + type mockWasmQueryKeeper struct { GetContractInfoFn func(ctx sdk.Context, contractAddress sdk.AccAddress) *types.ContractInfo QueryRawFn func(ctx sdk.Context, contractAddress sdk.AccAddress, key []byte) []byte @@ -548,13 +615,13 @@ func (m bankKeeperMock) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk return m.GetAllBalancesFn(ctx, addr) } -func TestConvertProtoToJSONMarshal(t *testing.T) { +func TestCo3nvertProtoToJSONMarshal(t *testing.T) { testCases := []struct { name string queryPath string - protoResponseStruct proto.Message + protoResponseStruct codec.ProtoMarshaler originalResponse string - expectedProtoResponse proto.Message + expectedProtoResponse codec.ProtoMarshaler expectedError bool }{ { @@ -573,20 +640,18 @@ func TestConvertProtoToJSONMarshal(t *testing.T) { name: "invalid proto response struct", queryPath: "/cosmos.bank.v1beta1.Query/AllBalances", originalResponse: "0a090a036261721202333012050a03666f6f", - protoResponseStruct: protoiface.MessageV1(nil), + protoResponseStruct: &authtypes.QueryAccountResponse{}, expectedError: true, }, } for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - // set up app for testing - wasmApp := app.SetupWithEmptyStore(t) - originalVersionBz, err := hex.DecodeString(tc.originalResponse) require.NoError(t, err) + appCodec := app.MakeEncodingConfig().Marshaler - jsonMarshalledResponse, err := keeper.ConvertProtoToJSONMarshal(tc.protoResponseStruct, originalVersionBz, wasmApp.AppCodec()) + jsonMarshalledResponse, err := keeper.ConvertProtoToJSONMarshal(appCodec, tc.protoResponseStruct, originalVersionBz) if tc.expectedError { require.Error(t, err) return @@ -594,7 +659,7 @@ func TestConvertProtoToJSONMarshal(t *testing.T) { require.NoError(t, err) // check response by json marshalling proto response into json response manually - jsonMarshalExpectedResponse, err := wasmApp.AppCodec().MarshalJSON(tc.expectedProtoResponse) + jsonMarshalExpectedResponse, err := appCodec.MarshalJSON(tc.expectedProtoResponse) require.NoError(t, err) require.JSONEq(t, string(jsonMarshalledResponse), string(jsonMarshalExpectedResponse)) }) @@ -609,8 +674,8 @@ func TestDeterministicJsonMarshal(t *testing.T) { originalResponse string updatedResponse string queryPath string - responseProtoStruct interface{} - expectedProto func() proto.Message + responseProtoStruct codec.ProtoMarshaler + expectedProto func() codec.ProtoMarshaler }{ /** * @@ -638,7 +703,7 @@ func TestDeterministicJsonMarshal(t *testing.T) { "0a530a202f636f736d6f732e617574682e763162657461312e426173654163636f756e74122f0a2d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679122d636f736d6f733166387578756c746e3873717a687a6e72737a3371373778776171756867727367366a79766679", "/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}, - func() proto.Message { + func() codec.ProtoMarshaler { account := authtypes.BaseAccount{ Address: "cosmos1f8uxultn8sqzhznrsz3q77xwaquhgrsg6jyvfy", } @@ -653,23 +718,23 @@ func TestDeterministicJsonMarshal(t *testing.T) { for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - wasmApp := app.SetupWithEmptyStore(t) + appCodec := app.MakeEncodingConfig().Marshaler originVersionBz, err := hex.DecodeString(tc.originalResponse) require.NoError(t, err) - jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJSONMarshal(tc.responseProtoStruct, originVersionBz, wasmApp.AppCodec()) + jsonMarshalledOriginalBz, err := keeper.ConvertProtoToJSONMarshal(appCodec, tc.responseProtoStruct, originVersionBz) require.NoError(t, err) newVersionBz, err := hex.DecodeString(tc.updatedResponse) require.NoError(t, err) - jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJSONMarshal(tc.responseProtoStruct, newVersionBz, wasmApp.AppCodec()) + jsonMarshalledUpdatedBz, err := keeper.ConvertProtoToJSONMarshal(appCodec, tc.responseProtoStruct, newVersionBz) require.NoError(t, err) // json marshalled bytes should be the same since we use the same proto struct for unmarshalling require.Equal(t, jsonMarshalledOriginalBz, jsonMarshalledUpdatedBz) // raw build also make same result - jsonMarshalExpectedResponse, err := wasmApp.AppCodec().MarshalJSON(tc.expectedProto()) + jsonMarshalExpectedResponse, err := appCodec.MarshalJSON(tc.expectedProto()) require.NoError(t, err) require.Equal(t, jsonMarshalledUpdatedBz, jsonMarshalExpectedResponse) }) diff --git a/x/wasm/keeper/stargate_whitelist.go b/x/wasm/keeper/stargate_whitelist.go deleted file mode 100644 index ce90738035..0000000000 --- a/x/wasm/keeper/stargate_whitelist.go +++ /dev/null @@ -1,18 +0,0 @@ -package keeper - -import ( - "sync" -) - -// AcceptList keeps whitelist and its deterministic -// response binding for stargate queries. -// -// The query can be multi-thread, so we have to use -// thread safe sync.Map. -var AcceptList sync.Map - -// Define AcceptList here as maps using 'AcceptList' -// e.x) AcceptList.Store("/cosmos.auth.v1beta1.Query/Account", &authtypes.QueryAccountResponse{}) -func init() { - -} diff --git a/x/wasm/simulation/proposals.go b/x/wasm/simulation/proposals.go index 8e73f04f64..1ee9584811 100644 --- a/x/wasm/simulation/proposals.go +++ b/x/wasm/simulation/proposals.go @@ -3,12 +3,13 @@ package simulation import ( "math/rand" - "github.com/CosmWasm/wasmd/app/params" - "github.com/CosmWasm/wasmd/x/wasm/keeper/testdata" - "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/CosmWasm/wasmd/app/params" + "github.com/CosmWasm/wasmd/x/wasm/keeper/testdata" + "github.com/CosmWasm/wasmd/x/wasm/types" ) const ( From 1c3fb33d21852218ddab587c6ac478ab09ea1869 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Tue, 1 Nov 2022 16:22:14 +0100 Subject: [PATCH 11/11] Fix typo --- x/wasm/keeper/query_plugins_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/wasm/keeper/query_plugins_test.go b/x/wasm/keeper/query_plugins_test.go index d27cc98c30..1c0fa231c9 100644 --- a/x/wasm/keeper/query_plugins_test.go +++ b/x/wasm/keeper/query_plugins_test.go @@ -615,7 +615,7 @@ func (m bankKeeperMock) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk return m.GetAllBalancesFn(ctx, addr) } -func TestCo3nvertProtoToJSONMarshal(t *testing.T) { +func TestConvertProtoToJSONMarshal(t *testing.T) { testCases := []struct { name string queryPath string