2

So the EIP-721 standard says,

Creating of NFTs ("minting") and destruction NFTs ("burning") is not included in the specification. Your contract may implement these by other means.

interface ERC721 /* is ERC165 */ {
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    function balanceOf(address _owner) external view returns (uint256);
    function ownerOf(uint256 _tokenId) external view returns (address);
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function approve(address _approved, uint256 _tokenId) external payable;
    function setApprovalForAll(address _operator, bool _approved) external;
    function getApproved(uint256 _tokenId) external view returns (address);
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

I get what it says, but I think it would have been better that function mint was included in the standard in the first place since almost every erc721 contract uses below format?

function mint(address _to, uint256 _tokenId);

Any valid reason that mint was ommited from the standard?

3

The standard was designed so as to minimize the number of required functionalities. (Not joking.) At the time it was finalized (June 2018), minting with that interface was not implemented in the vast majority of existing implementations so it was not added to the standard.

Even still I do not think minting is implement that way everywhere so I don't think it is worth standardizing.

Some examples:

By including mint in the standard it would signal to MetaMask and other interface consumers that individuals could create tokens without consequences. However I have seen other places where running mint will spend NFT tokens that you have on file. That side effect is large and it would be unintuitive for MetaMask to show a big MINT button with those side effects.

This is just an argument against standardizing mint. Whether that reason counts as valid can only be judged by you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.