referrerpolicy=no-referrer-when-downgrade

Trait TxCreditHold

Source
pub trait TxCreditHold<T: Config> {
    type Credit: FullCodec + DecodeWithMemTracking + MaxEncodedLen + TypeInfo + SuppressedDrop;
}
Expand description

Needs to be implemented for every OnChargeTransaction.

Cannot be added to OnChargeTransaction directly as this would cause cycles in trait resolution.

Required Associated Types§

Source

type Credit: FullCodec + DecodeWithMemTracking + MaxEncodedLen + TypeInfo + SuppressedDrop

The credit that is used to represent the withdrawn transaction fees.

The pallet will put this into a temporary storage item in order to make it available to other pallets during tx application.

Is only used within a transaction. Hence changes to the encoding of this type won’t require a storage migration.

Set to () if your OnChargeTransaction impl does not store the credit.

Implementors§

Source§

impl<T, F, OU> TxCreditHold<T> for FungibleAdapter<F, OU>
where T: Config, F: Balanced<T::AccountId> + 'static,

Source§

type Credit = NoDrop<Imbalance<<F as Inspect<<T as Config>::AccountId>>::Balance, <F as Balanced<<T as Config>::AccountId>>::OnDropCredit, <F as Balanced<<T as Config>::AccountId>>::OnDropDebt>>

Source§

impl<T: Config, C, OU> TxCreditHold<T> for CurrencyAdapter<C, OU>