You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure here. Looking at different implementations shows different additions to what's written in eip-721. You have require(_operator != address(0));, OZ has require(_operator != msg.sender); in setApprovalForAll; both have require(_approved != tokenOwner); in approve.
I think require(_to != address(0)); in transferFrom is the single best check to avoid problems with bugs in frontend and that's why it's even written in eip-721. Possibly other checks not specified there might be almost as important, like approving or transfering to this, i.e. ERC721 contract.
It's probably important to look at it using gas cost / potential user confusion formula. These kind of checks use under 10 gas, which is nothing compared to each 5000 (or sometimes 20000) storage update.
No description provided.
The text was updated successfully, but these errors were encountered: