pub trait BasicCurrencyExtended<AccountId>: BasicCurrency<AccountId> {
    type Amount: Signed + TryInto<Self::Balance> + TryFrom<Self::Balance> + SimpleArithmetic + Codec + Copy + MaybeSerializeDeserialize + Debug + Default + MaxEncodedLen;

    fn update_balance(who: &AccountId, by_amount: Self::Amount) -> DispatchResult;
}
Expand description

Extended BasicCurrency with additional helper types and methods.

Required Associated Types§

The signed type for balance related operations, typically signed int.

Required Methods§

Add or remove abs(by_amount) from the balance of who. If positive by_amount, do add, else do remove.

Implementors§

impl<T, GetCurrencyId> BasicCurrencyExtended<<T as Config>::AccountId> for Currency<T, GetCurrencyId>where
    T: Config,
    GetCurrencyId: Get<<<T as Config>::MultiCurrency as MultiCurrency<<T as Config>::AccountId>>::CurrencyId>,

impl<T, AccountId, Currency, Amount, Moment> BasicCurrencyExtended<AccountId> for BasicCurrencyAdapter<T, Currency, Amount, Moment>where
    Amount: Signed + TryInto<<Currency as PalletCurrency<AccountId>>::Balance> + TryFrom<<Currency as PalletCurrency<AccountId>>::Balance> + SimpleArithmetic + Codec + Copy + MaybeSerializeDeserialize + Debug + Default + MaxEncodedLen,
    Currency: PalletCurrency<AccountId>,
    T: Config,