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§

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.

Called when an account has been removed.

Warning

This function must never access storage of pallet asset. This function is called while some change are pending. Calling into the pallet asset in this function can result in unexpected state.

Implementations on Foreign Types§

Implementors§