Assignment - ERC721 Fulfillment transferFrom

Implement the transferFrom function using the downloadable zip under the lecture.

Remember about using the correct cheks.

1 Like
transferFrom Assignment
    function transferFrom(address _from, address _to, uint256 _tokenId) external{
        require(msg.sender == _from || msg.sender == tokenIdToApproved[_tokenId] || _operatorApprovals[_from][msg.sender], "Only Owner, Operator or Approved Addresses can transfer!");
        require(_owns(_from, _tokenId), "Owner address is not connected to this token!");
        require(_to != address(0), "Transfer to zero-address is not possible!");
        require(_tokenId < bears.length, "This token does not exist!");

        _transfer(_from, _to, _tokenId);
1 Like