pub trait BalancedHold<AccountId>: Balanced<AccountId> + MutateHold<AccountId> {
    // Required method
    fn slash_held(
        asset: Self::AssetId,
        who: &AccountId,
        amount: Self::Balance
    ) -> (CreditOf<AccountId, Self>, Self::Balance);
}
Expand description

Trait for mutating one of several types of fungible assets which can be held.

Required Methods§

source

fn slash_held( asset: Self::AssetId, who: &AccountId, amount: Self::Balance ) -> (CreditOf<AccountId, Self>, Self::Balance)

Release and slash some funds in an account.

The resulting imbalance is the first item of the tuple returned.

As much funds up to amount will be deducted as possible. If this is less than amount, then a non-zero second item will be returned.

Implementors§

source§

impl<AccountId, T: Balanced<AccountId> + MutateHold<AccountId>> BalancedHold<AccountId> for T