ERC-4906: EIP-721 Metadata Update Extension

Add a MetadataUpdate event to EIP-721.


Metadata
Status: FinalStandards Track: ERCCreated: 2022-03-13
Authors
Anders (@0xanders), Lance (@LanceSnow), Shrug (shrug@emojidao.org), Nathan (nathan.gang@gemini.com)
Requires

Abstract


This standard is an extension of EIP-721. It adds a MetadataUpdate event to EIP-721 tokens.

Motivation


Many EIP-721 contracts emit an event when one of its tokens' metadata are changed. While tracking changes based on these different events is possible, it is an extra effort for third-party platforms, such as an NFT marketplace, to build individualized solutions for each NFT collection.

Having a standard MetadataUpdate event will make it easy for third-party platforms to timely update the metadata of many NFTs.

Specification


The keywords “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

The metadata update extension is OPTIONAL for EIP-721 contracts.


The MetadataUpdate or BatchMetadataUpdate event MUST be emitted when the JSON metadata of a token, or a consecutive range of tokens, is changed.

Not emitting MetadataUpdate event is RECOMMENDED when a token is minted.

Not emitting MetadataUpdate event is RECOMMENDED when a token is burned.

Not emitting MetadataUpdate event is RECOMMENDED when the tokenURI changes but the JSON metadata does not.

The supportsInterface method MUST return true when called with 0x49064906.

Rationale


Different NFTs have different metadata, and metadata generally has multiple fields. bytes data could be used to represents the modified value of metadata. It is difficult for third-party platforms to identify various types of bytes data, so as to avoid unnecessary complexity, arbitrary metadata is not included in the MetadataUpdate event.

After capturing the MetadataUpdate event, a third party can update the metadata with information returned from the tokenURI(uint256 _tokenId) of EIP-721. When a range of token ids is specified, the third party can query each token URI individually.

Backwards Compatibility


No backwards compatibility issues were found

Reference Implementation



Security Considerations


If there is an off-chain modification of metadata, a method that triggers MetadataUpdate can be added, but ensure that the function's permission controls are correct.

Copyright


Copyright and related rights waived via CC0.