0g-chain/third_party/proto/cosmos/distribution/v1beta1/query.proto
Draco 614d4e40fe
Update cosmos-sdk to v0.47.7 (#1811)
* Update cometbft, cosmos, ethermint, and ibc-go

* Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft

* Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db

* Replace gogo/protobuf with cosmos/gogoproto & simapp replacement

* Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims

* Remove no longer used simulations

* Replace ibchost with ibcexported
See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants

* Add new consensus params keeper

* Add consensus keeper to blockers

* Fix keeper and module issues in app.go

* Add IsSendEnabledCoins and update SetParams interface changes

* Fix protobuf build for cosmos 47 (#1800)

* fix cp errors by using -f; fix lint by only linting our proto dir;
and use proofs.proto directly from ics23 for ibc-go v7

* run proto-all; commit updated third party deps and swagger changes

* regenerate proto files

* use correct gocosmos build plugin for buf

* re-gen all protobuf files to update paths for new gocosmos plugin

* update protoc and buf to latest versions

* fix staking keeper issues in app.go

* update tally handler for gov changes

* chain id fix and flag fixes

* update deps for cometbft 47.7 upgrade

* remove all module legacy queriers

* update stakingKeeper to pointer

* Replace ModuleCdc from govv1beta1 to govcodec

* remove simulations

* abci.LastCommitInfo → abci.CommitInfo

* Remove unused code in keys.go

* simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi

* Fix chain id issues in tests

* Fix remaining unit test issues

* Update changelog for upgrade

* Fix e2e tests using updated kvtool

* Update protonet to v47 compatible genesis

* Bump cometbft-db to v0.9.1-kava.1

* Update kvtool

* Remove extra changelog

* Fix merged rocksdb issues

* go mod cleanup

* Bump cometbft-db to v9 and go to 1.21

* Bump rocksdb version to v8.10.0

* Update kvtool to latest version

* Update gin to v1.9.0

* Use ibctm.ModuleName in app_test

* Fallback to genesis chain id instead of client toml

* Remove all simulations

* Fix cdp migrations issue with v47

* Update dependencies to correct tags

---------

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2024-02-06 17:54:10 -05:00

257 lines
11 KiB
Protocol Buffer

syntax = "proto3";
package cosmos.distribution.v1beta1;
import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/distribution/v1beta1/distribution.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
// Query defines the gRPC querier service for distribution module.
service Query {
// Params queries params of the distribution module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/params";
}
// ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator
rpc ValidatorDistributionInfo(QueryValidatorDistributionInfoRequest)
returns (QueryValidatorDistributionInfoResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}";
}
// ValidatorOutstandingRewards queries rewards of a validator address.
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest)
returns (QueryValidatorOutstandingRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/"
"{validator_address}/outstanding_rewards";
}
// ValidatorCommission queries accumulated commission for a validator.
rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/"
"{validator_address}/commission";
}
// ValidatorSlashes queries slash events of a validator.
rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes";
}
// DelegationRewards queries the total rewards accrued by a delegation.
rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/"
"{validator_address}";
}
// DelegationTotalRewards queries the total rewards accrued by a each
// validator.
rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards";
}
// DelegatorValidators queries the validators of a delegator.
rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/"
"{delegator_address}/validators";
}
// DelegatorWithdrawAddress queries withdraw address of a delegator.
rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/"
"{delegator_address}/withdraw_address";
}
// CommunityPool queries the community pool coins.
rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool";
}
}
// QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method.
message QueryValidatorDistributionInfoRequest {
// validator_address defines the validator address to query for.
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method.
message QueryValidatorDistributionInfoResponse {
// operator_address defines the validator operator address.
string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// self_bond_rewards defines the self delegations rewards.
repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
// commission defines the commission the validator received.
repeated cosmos.base.v1beta1.DecCoin commission = 3
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
}
// QueryValidatorOutstandingRewardsRequest is the request type for the
// Query/ValidatorOutstandingRewards RPC method.
message QueryValidatorOutstandingRewardsRequest {
// validator_address defines the validator address to query for.
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryValidatorOutstandingRewardsResponse is the response type for the
// Query/ValidatorOutstandingRewards RPC method.
message QueryValidatorOutstandingRewardsResponse {
ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// QueryValidatorCommissionRequest is the request type for the
// Query/ValidatorCommission RPC method
message QueryValidatorCommissionRequest {
// validator_address defines the validator address to query for.
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryValidatorCommissionResponse is the response type for the
// Query/ValidatorCommission RPC method
message QueryValidatorCommissionResponse {
// commission defines the commission the validator received.
ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
// QueryValidatorSlashesRequest is the request type for the
// Query/ValidatorSlashes RPC method
message QueryValidatorSlashesRequest {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = true;
// validator_address defines the validator address to query for.
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// starting_height defines the optional starting height to query the slashes.
uint64 starting_height = 2;
// starting_height defines the optional ending height to query the slashes.
uint64 ending_height = 3;
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 4;
}
// QueryValidatorSlashesResponse is the response type for the
// Query/ValidatorSlashes RPC method.
message QueryValidatorSlashesResponse {
// slashes defines the slashes the validator received.
repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryDelegationRewardsRequest is the request type for the
// Query/DelegationRewards RPC method.
message QueryDelegationRewardsRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// delegator_address defines the delegator address to query for.
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// validator_address defines the validator address to query for.
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// 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,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
}
// QueryDelegationTotalRewardsRequest is the request type for the
// Query/DelegationTotalRewards RPC method.
message QueryDelegationTotalRewardsRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// delegator_address defines the delegator address to query for.
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryDelegationTotalRewardsResponse is the response type for the
// Query/DelegationTotalRewards RPC method.
message QueryDelegationTotalRewardsResponse {
// rewards defines all the rewards accrued by a delegator.
repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// total defines the sum of all the rewards.
repeated cosmos.base.v1beta1.DecCoin total = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
}
// QueryDelegatorValidatorsRequest is the request type for the
// Query/DelegatorValidators RPC method.
message QueryDelegatorValidatorsRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// delegator_address defines the delegator address to query for.
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// 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;
}
// QueryDelegatorWithdrawAddressRequest is the request type for the
// Query/DelegatorWithdrawAddress RPC method.
message QueryDelegatorWithdrawAddressRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// delegator_address defines the delegator address to query for.
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// 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 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC
// method.
message QueryCommunityPoolRequest {}
// 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,
(amino.dont_omitempty) = true
];
}