chiru-labs / ERC721A

https://ERC721A.org
MIT License
2.5k stars 839 forks source link

What is the purpose of this function on L911? #477

Closed Lruquaf closed 1 year ago

Lruquaf commented 1 year ago

Is this a redundant function? When it is implemented, is there a security issue?

/**
 * @dev Equivalent to `_approve(to, tokenId, false)`.
*/
    function _approve(address to, uint256 tokenId) internal virtual {
        _approve(to, tokenId, false);
    }

When we enter the core _approve function with false as approvalCheck, it's so dangerous. Why is there so implementation in contract?

Vectorized commented 1 year ago

Note that this function is internal.

It is for devs who may want to do their on custom checks instead of using the default check.

Lruquaf commented 1 year ago

Thanks, i'll close it.