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 b0e095b12c..178e92eb40 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" @@ -269,8 +272,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 } } @@ -517,6 +544,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") +)