fn _transfer(from: T::AccountId, to: T::AccountId, value: T::TokenBalance) -> DispatchResult {
        ensure!(<BalanceOf<T>>::contains_key(from.clone()), "Account does not own this token");
        let sender_balance = Self::balance_of(from.clone());
        ensure!(sender_balance >= value, "Not enough balance.");

        let updated_from_balance =
            sender_balance.checked_sub(&value).ok_or("overflow in calculating balance")?;
        let receiver_balance = Self::balance_of(to.clone());
        let updated_to_balance =
            receiver_balance.checked_add(&value).ok_or("overflow in calculating balance")?;

        // reduce sender's balance
        <BalanceOf<T>>::insert(from.clone(), updated_from_balance);

        // increase receiver's balance
        <BalanceOf<T>>::insert(to.clone(), updated_to_balance);

        Self::deposit_event(RawEvent::Transfer(from, to, value));
        Ok(())
    }
// the ERC20 standard transfer function
// internal
the ERC20 standard transfer function
internal
the ERC20 standard transfer function internal
fn _transfer(from: T::AccountId, to: T::AccountId, value: T::TokenBalance) -> DispatchResult {
        ensure!(<BalanceOf<T>>::contains_key(from.clone()), "Account does not own this token");
        let sender_balance = Self::balance_of(from.clone());
        ensure!(sender_balance >= value, "Not enough balance.");
        let updated_from_balance =
            sender_balance.checked_sub(&value).ok_or("overflow in calculating balance")?;
        let receiver_balance = Self::balance_of(to.clone());
        let updated_to_balance =
            receiver_balance.checked_add(&value).ok_or("overflow in calculating balance")?;
        // reduce sender's balance
        <BalanceOf<T>>::insert(from.clone(), updated_from_balance);
        // increase receiver's balance
        <BalanceOf<T>>::insert(to.clone(), updated_to_balance);
        Self::deposit_event(RawEvent::Transfer(from, to, value));
        Ok(())
    }
fn _transfer ( from : T :: AccountId , to : T :: AccountId , value : T :: TokenBalance ) -> DispatchResult { ensure ! ( BalanceOf T contains_key ( from clone ( ) ) " " ) ; let sender_balance = Self :: balance_of ( from . clone ( ) ) ; ensure ! ( sender_balance value " " ) ; let updated_from_balance = sender_balance . checked_sub ( & value ) . ok_or ( " " ) ? ; let receiver_balance = Self :: balance_of ( to . clone ( ) ) ; let updated_to_balance = receiver_balance . checked_add ( & value ) . ok_or ( " " ) ? ; // reduce sender's balance < BalanceOf < T > > :: insert ( from . clone ( ) , updated_from_balance ) ; // increase receiver's balance < BalanceOf < T > > :: insert ( to . clone ( ) , updated_to_balance ) ; Self :: deposit_event ( RawEvent :: Transfer ( from , to , value ) ) ; Ok ( ( ) ) }
the ERC20 standard transfer function
internal
the ERC20 standard transfer function internal
from
T::AccountId
to
T::AccountId
value
T::TokenBalance
from
T::AccountId
to
T::AccountId
value
T::TokenBalance