Trait pallet_assets::FrozenBalance
source · pub trait FrozenBalance<AssetId, AccountId, Balance> {
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§
sourcefn frozen_balance(asset: AssetId, who: &AccountId) -> Option<Balance>
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 behavior, 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 transfered 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.