pub trait FrozenBalance<AssetId, AccountId, Balance> {
    // Required methods
    fn frozen_balance(asset: AssetId, who: &AccountId) -> Option<Balance>;
    fn died(asset: AssetId, who: &AccountId);
}
Expand description

Trait for allowing a minimum balance on the account to be specified, beyond the minimum_balance of the asset. This is additive - the minimum_balance of the asset must be met and then anything here in addition.

Required Methods§

source

fn frozen_balance(asset: AssetId, who: &AccountId) -> Option<Balance>

Return the frozen balance.

Generally, the balance of every account must be at least the sum of this (if Some) and the asset’s minimum_balance (the latter since there may be complications to destroying an asset’s account completely).

Under normal behaviour, the account balance should not go below the sum of this (if Some) and the asset’s minimum balance. However, the account balance may reasonably begin below this sum (e.g. if less than the sum had ever been transferred into the account).

In special cases (privileged intervention) the account balance may also go below the sum.

If None is returned, then nothing special is enforced.

source

fn died(asset: AssetId, who: &AccountId)

Called after an account has been removed.

NOTE: It is possible that the asset does no longer exist when this hook is called.

Implementations on Foreign Types§

source§

impl<AssetId, AccountId, Balance> FrozenBalance<AssetId, AccountId, Balance> for ()

source§

fn frozen_balance(_: AssetId, _: &AccountId) -> Option<Balance>

source§

fn died(_: AssetId, _: &AccountId)

Implementors§