fn _approve_for_all(&mut self, to: AccountId, approved: bool) {
        let caller = Self::env().caller();
        assert_ne!(to, caller, "{}", Erc721Error::NotAllowed.as_ref());
        self.emit_approval_for_all_event(caller, to, approved);
        if self._approved_for_all(caller, to) {
            let status = self
                ._operator_approvals_mut()
                .get_mut(&(caller, to)).unwrap();
            *status = approved;
        } else {
            self._operator_approvals_mut().insert((caller, to), approved);
        }
    }
/// Approves or disapproves the operator to transfer all tokens of the caller.
Approves or disapproves the operator to transfer all tokens of the caller.
Approves or disapproves the operator to transfer all tokens of the caller .
fn _approve_for_all(&mut self, to: AccountId, approved: bool) {
        let caller = Self::env().caller();
        assert_ne!(to, caller, "{}", Erc721Error::NotAllowed.as_ref());
        self.emit_approval_for_all_event(caller, to, approved);
        if self._approved_for_all(caller, to) {
            let status = self
                ._operator_approvals_mut()
                .get_mut(&(caller, to)).unwrap();
            *status = approved;
        } else {
            self._operator_approvals_mut().insert((caller, to), approved);
        }
    }
fn _approve_for_all ( & mut self , to : AccountId , approved : bool ) { let caller = Self :: env ( ) . caller ( ) ; assert_ne ! ( to caller " " Erc721Error NotAllowed as_ref ( ) ) ; self . emit_approval_for_all_event ( caller , to , approved ) ; if self . _approved_for_all ( caller , to ) { let status = self . _operator_approvals_mut ( ) . get_mut ( & ( caller , to ) ) . unwrap ( ) ; * status = approved ; } else { self . _operator_approvals_mut ( ) . insert ( ( caller , to ) , approved ) ; } }
Approves or disapproves the operator to transfer all tokens of the caller.
Approves or disapproves the operator to transfer all tokens of the caller .
&mut self
to
AccountId
approved
bool
&mut self
to
AccountId
approved
bool