2022-01-08 01:59:34 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.distribution.v1beta1;
|
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
|
|
|
|
option (gogoproto.equal_all) = true;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
import "cosmos/distribution/v1beta1/distribution.proto";
|
2023-04-04 00:08:45 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
2024-02-06 22:54:10 +00:00
|
|
|
import "amino/amino.proto";
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// DelegatorWithdrawInfo is the address for where distributions rewards are
|
|
|
|
// withdrawn to by default this struct is only used at genesis to feed in
|
|
|
|
// default withdraw addresses.
|
|
|
|
message DelegatorWithdrawInfo {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// delegator_address is the address of the delegator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// withdraw_address is the address to withdraw the delegation rewards to.
|
2023-04-04 00:08:45 +00:00
|
|
|
string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ValidatorOutstandingRewardsRecord is used for import/export via genesis json.
|
|
|
|
message ValidatorOutstandingRewardsRecord {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// validator_address is the address of the validator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
2024-02-06 22:54:10 +00:00
|
|
|
// outstanding_rewards represents the outstanding rewards of a validator.
|
|
|
|
repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [
|
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(amino.dont_omitempty) = true
|
|
|
|
];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ValidatorAccumulatedCommissionRecord is used for import / export via genesis
|
|
|
|
// json.
|
|
|
|
message ValidatorAccumulatedCommissionRecord {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// validator_address is the address of the validator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// accumulated is the accumulated commission of a validator.
|
2024-02-06 22:54:10 +00:00
|
|
|
ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ValidatorHistoricalRewardsRecord is used for import / export via genesis
|
|
|
|
// json.
|
|
|
|
message ValidatorHistoricalRewardsRecord {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// validator_address is the address of the validator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// period defines the period the historical rewards apply to.
|
|
|
|
uint64 period = 2;
|
|
|
|
|
|
|
|
// rewards defines the historical rewards of a validator.
|
2024-02-06 22:54:10 +00:00
|
|
|
ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ValidatorCurrentRewardsRecord is used for import / export via genesis json.
|
|
|
|
message ValidatorCurrentRewardsRecord {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// validator_address is the address of the validator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// rewards defines the current rewards of a validator.
|
2024-02-06 22:54:10 +00:00
|
|
|
ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DelegatorStartingInfoRecord used for import / export via genesis json.
|
|
|
|
message DelegatorStartingInfoRecord {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// delegator_address is the address of the delegator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// validator_address is the address of the validator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// starting_info defines the starting info of a delegator.
|
2024-02-06 22:54:10 +00:00
|
|
|
DelegatorStartingInfo starting_info = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ValidatorSlashEventRecord is used for import / export via genesis json.
|
|
|
|
message ValidatorSlashEventRecord {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// validator_address is the address of the validator.
|
2023-04-04 00:08:45 +00:00
|
|
|
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2024-02-06 22:54:10 +00:00
|
|
|
// height defines the block height at which the slash event occurred.
|
2022-01-08 01:59:34 +00:00
|
|
|
uint64 height = 2;
|
|
|
|
// period is the period of the slash event.
|
|
|
|
uint64 period = 3;
|
|
|
|
// validator_slash_event describes the slash event.
|
2024-02-06 22:54:10 +00:00
|
|
|
ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// GenesisState defines the distribution module's genesis state.
|
|
|
|
message GenesisState {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
2024-02-06 22:54:10 +00:00
|
|
|
// params defines all the parameters of the module.
|
|
|
|
Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the fee pool at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
FeePool fee_pool = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the delegator withdraw infos at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the previous proposer at genesis.
|
2023-04-04 00:08:45 +00:00
|
|
|
string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the outstanding rewards of all validators at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
2024-02-06 22:54:10 +00:00
|
|
|
// fee_pool defines the accumulated commissions of all validators at genesis.
|
|
|
|
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the historical rewards of all validators at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the current rewards of all validators at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the delegator starting infos at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// fee_pool defines the validator slash events at genesis.
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated ValidatorSlashEventRecord validator_slash_events = 10
|
|
|
|
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|