The goals of EIP-4521 are modest but important for Ethereum users. Namely, it recommends a transfer()
function for ERC-721 ‘NFTs’ in order to achieve backwards compatibility with ERC-20 tokens.
Currently, ERC-721 only supports transferFrom()
and safeTransferFrom()
, and in the event that an NFT is accidentally sent to a contract that only expects ERC-20, it will be locked and unable to be transferred out again.
Further, it is a convenience to smart contract developers to be able to write their contracts in the ERC-20 interface and yet have the ability to manage NFTs at same time without the need to import independent logic. Thus, EIP-4521 suggests a basic extension that allows tokens to work better with user apps, like wallets, and developers who want simpler code to handle a variety of assets, by placing tokenId
into the typical transfer
function:
function transfer(address to, uint256 tokenId) public returns (bool success) { ... )