referrerpolicy=no-referrer-when-downgrade

RewardSource

Trait RewardSource 

Source
pub trait RewardSource<AccountId, Balance> {
    // Required methods
    fn account() -> Option<AccountId>;
    fn paid(amount: Balance);
}
Expand description

Provides the account that reward payments and invulnerable fee refunds are drawn from.

None mints directly. Some(account) transfers from account, followed by a call to Self::paid for any bookkeeping the source needs to perform after a successful payout.

Required Methods§

Source

fn account() -> Option<AccountId>

The pot account to draw the reward from, or None to mint directly.

Source

fn paid(amount: Balance)

Called after amount has been successfully transferred out of the pot.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<AccountId, Balance, P, Currency> RewardSource<AccountId, Balance> for ReactivatingPot<P, Currency>
where P: Get<Option<AccountId>>, Currency: Unbalanced<AccountId, Balance = Balance>,

Source§

impl<AccountId, Balance, P: Get<Option<AccountId>>> RewardSource<AccountId, Balance> for ActivePot<P>