Trait loans::OnTransfer

pub trait OnTransfer<AccountId, CurrencyId, Balance> {
    // Required method
    fn on_transfer(
        currency_id: CurrencyId,
        from: &AccountId,
        to: &AccountId,
        amount: Balance
    ) -> Result<(), DispatchError>;
}
Expand description

Hook to run before transferring from an account to another.

Required Methods§

fn on_transfer( currency_id: CurrencyId, from: &AccountId, to: &AccountId, amount: Balance ) -> Result<(), DispatchError>

Implementations on Foreign Types§

§

impl<AccountId, CurrencyId, Balance> OnTransfer<AccountId, CurrencyId, Balance> for ()

§

fn on_transfer( _: CurrencyId, _: &AccountId, _: &AccountId, _: Balance ) -> Result<(), DispatchError>

Implementors§

source§

impl<T: Config> OnTransfer<<T as Config>::AccountId, <T as Config>::CurrencyId, <T as Config>::Balance> for PostTransfer<T>

source§

impl<T: Config> OnTransfer<<T as Config>::AccountId, <T as Config>::CurrencyId, <T as Config>::Balance> for PreTransfer<T>