Trait orml_traits::rewards::RewardHandler

source ·
pub trait RewardHandler<AccountId, CurrencyId> {
    type Balance: AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + Debug;
    type PoolId: FullCodec;

    // Required method
    fn payout(
        who: &AccountId,
        pool: &Self::PoolId,
        currency_id: CurrencyId,
        amount: Self::Balance
    );
}
Expand description

Hooks to manage reward pool

Required Associated Types§

source

type Balance: AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + Debug

The reward balance type

source

type PoolId: FullCodec

The reward pool ID type

Required Methods§

source

fn payout( who: &AccountId, pool: &Self::PoolId, currency_id: CurrencyId, amount: Self::Balance )

Payout the reward to who

Object Safety§

This trait is not object safe.

Implementors§