Add staking payout support

This commit is contained in:
Demi M. Obenour
2020-05-17 17:34:24 -04:00
parent 1b4dc07f77
commit ebfdc17459
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -96,11 +96,13 @@ impl Default for RewardDestination {
/// Preference of what happens regarding validation.
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)]
pub struct ValidatorPrefs {
pub struct ValidatorPrefs<T: Staking> {
/// Reward that validator takes up-front; only the rest is split between themselves and
/// nominators.
#[codec(compact)]
pub commission: Perbill,
/// Runtime marker
pub _r: PhantomData<T>,
}
impl Default for ValidatorPrefs {
@@ -318,3 +320,10 @@ pub struct NominateCall<T: Staking> {
/// The targets that are being nominated
pub targets: Vec<T::Address>,
}
/// Claim a payout.
#[derive(PartialEq, Eq, Clone, Call, Encode)]
struct PayoutStakersCall<'a, T: System> {
pub validator_stash: &'a T::AccountId,
pub era: EraIndex,
}
+1
View File
@@ -32,6 +32,7 @@ use crate::frame::{
},
contracts::Contracts,
session::Session,
staking::Staking,
system::System,
};