functionapprove(addressto,uint256tokenId)publicvirtual{_approve(to,tokenId,_msgSender());}function_approve(addressto,uint256tokenId,addressauth)internal{_approve(to,tokenId,auth,true);}function_approve(addressto,uint256tokenId,addressauth,boolemitEvent)internalvirtual{// Avoid reading the owner unless necessaryif(emitEvent||auth!=address(0)){addressowner=_requireOwned(tokenId);// We do not use _isAuthorized because single-token approvals should not be able to call approveif(auth!=address(0)&&owner!=auth&&!isApprovedForAll(owner,auth)){revertERC721InvalidApprover(auth);}if(emitEvent){emitApproval(owner,to,tokenId);}}_tokenApprovals[tokenId]=to;}
function setApprovalForAll(address operator, bool approved) public virtual;
function_update(addressto,uint256tokenId,addressauth)internalvirtualreturns(address){addressfrom=_ownerOf(tokenId);// Perform (optional) operator checkif(auth!=address(0)){_checkAuthorized(from,auth,tokenId);}// Execute the updateif(from!=address(0)){// Clear approval. No need to re-authorize or emit the Approval event_approve(address(0),tokenId,address(0),false);unchecked{_balances[from]-=1;}}if(to!=address(0)){unchecked{_balances[to]+=1;}}_owners[tokenId]=to;emitTransfer(from,to,tokenId);returnfrom;}
function _requireOwned(uint256 tokenId) internal view virtual returns (address);
functiontransferFrom(addressfrom,addressto,uint256tokenId)publicvirtual{if(to==address(0)){revertERC721InvalidReceiver(address(0));}// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.addresspreviousOwner=_update(to,tokenId,_msgSender());if(previousOwner!=from){revertERC721IncorrectOwner(from,tokenId,previousOwner);}}
function safeTransferFrom(address from, address to, uint256 tokenId) public;