pub trait OnChargeCapacityTransaction<T: Config> {
    type Balance: Balance;

    // Required method
    fn withdraw_fee(
        key: &T::AccountId,
        fee: Self::Balance
    ) -> Result<Self::Balance, TransactionValidityError>;
}
Expand description

A trait used for the withdrawal of Capacity.

Required Associated Types§

source

type Balance: Balance

Scalar type for representing balance of an account.

Required Methods§

source

fn withdraw_fee( key: &T::AccountId, fee: Self::Balance ) -> Result<Self::Balance, TransactionValidityError>

Handles withdrawal of Capacity from an Account.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, Curr, Msa> OnChargeCapacityTransaction<T> for CapacityAdapter<Curr, Msa>
where T: Config, Curr: InspectFungible<<T as Config>::AccountId>, Msa: MsaValidator<AccountId = <T as Config>::AccountId>, <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance: Send + Sync + FixedPointOperand + IsType<<<T as Config>::Capacity as Nontransferable>::Balance> + MaxEncodedLen,

§

type Balance = <<T as Config>::OnChargeTransaction as OnChargeTransaction<T>>::Balance