fn _perform_transfer(
            &mut self,
            from: AccountId,
            to: AccountId,
            token_id: TokenId,
            value: Balance,
        ) {
            self.balances
                .entry((from, token_id))
                .and_modify(|b| *b -= value);

            self.balances
                .entry((to, token_id))
                .and_modify(|b| *b += value)
                .or_insert(value);

            let caller = self.env().caller();
            self.env().emit_event(TransferSingle {
                operator: Some(caller),
                from: Some(from),
                to: Some(from),
                token_id,
                value,
            });
        }
// Helper function for performing single token transfers.
//
// Should not be used directly since it's missing certain checks which are important to the
// ERC-1155 standard (it is expected that the caller has already performed these).
Helper function for performing single token transfers.
Should not be used directly since it's missing certain checks which are important to the
ERC-1155 standard (it is expected that the caller has already performed these).
Helper function for performing single token transfers . Should not be used directly since it ' s missing certain checks which are important to the ERC - 1155 standard ( it is expected that the caller has already performed these ) .
fn _perform_transfer(
            &mut self,
            from: AccountId,
            to: AccountId,
            token_id: TokenId,
            value: Balance,
        ) {
            self.balances
                .entry((from, token_id))
                .and_modify(|b| *b -= value);
            self.balances
                .entry((to, token_id))
                .and_modify(|b| *b += value)
                .or_insert(value);
            let caller = self.env().caller();
            self.env().emit_event(TransferSingle {
                operator: Some(caller),
                from: Some(from),
                to: Some(from),
                token_id,
                value,
            });
        }
fn _perform_transfer ( & mut self , from : AccountId , to : AccountId , token_id : TokenId , value : Balance , ) { self . balances . entry ( ( from , token_id ) ) . and_modify ( | b | * b -= value ) ; self . balances . entry ( ( to , token_id ) ) . and_modify ( | b | * b += value ) . or_insert ( value ) ; let caller = self . env ( ) . caller ( ) ; self . env ( ) . emit_event ( TransferSingle { operator : Some ( caller ) , from : Some ( from ) , to : Some ( from ) , token_id , value , } ) ; }
Helper function for performing single token transfers.
Helper function for performing single token transfers .
&mut self
from
AccountId
to
AccountId
token_id
TokenId
value
Balance
&mut self
from
AccountId
to
AccountId
token_id
TokenId
value
Balance