ERC4906

EIP 문서

ERC721의 확장. 메타데이터가 업데이트될 때마다 MetadataUpdate 이벤트를 발생해야 한다.

/// @title EIP-721 Metadata Update Extension
interface IERC4906 is IERC165, IERC721 {
    /// @dev This event emits when the metadata of a token is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFT.
    event MetadataUpdate(uint256 _tokenId);
 
    /// @dev This event emits when the metadata of a range of tokens is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFTs.    
    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
}

MUST

  • MetadataUpdate 또는 BatchMetadataUpdate는 JSON 메타데이터가 업데이트될 때 반드시 발생해야 한다.
  • supportsInterface0x49064906 로 조회시 반드시 true 를 리턴해야 한다.
  • 발행, 소각되었을 때는 이벤트를 발생하지 않아도 된다.
  • tokenURI가 변경되었지만 JSON 메타데이터는 변경되지 않았다면 이벤트를 발생하지 않아도 된다.

OPTIONAL

  • ERC721 컨트랙트에는 선택적으로 ERC4906를 추가할 수 있다. 확장의 개념이다.

tags: blockchain, smart contract, erc721, nft