cairo-contracts icon indicating copy to clipboard operation
cairo-contracts copied to clipboard

Implement ERC-4906: EIP-721 Metadata Update Extension

Open rsodre opened this issue 1 year ago • 2 comments

🧐 Motivation

With the upcoming release of Dojo 1.0, we're expecting a lot of fully on-chain games to be release on Starknet, and with them new ERC-721 and ERC-1155 collections.

Most of those tokens are dynamic, their metadata and image can change from time to time, and currently NFT markets are not able to pick up any updates after mint, we need to manually request a metadata update, one by one.

The first step for Starknet NFT markets to keep tokens updated is to enable them to do so, and that's what ERC-4906 was made for. It specifies the events MetadataUpdate and BatchMetadataUpdate, which can trigger markets to update metadata and token images.

📝 Details

implementation details: https://eips.ethereum.org/EIPS/eip-4906

There is a cairo implementation from @carbonable-labs, as a component for OZ v0.10.0 here: https://github.com/carbonable-labs/cairo-erc-4906

ERC-4906 is supported by OpenSea: https://docs.opensea.io/docs/metadata-standards#metadata-updates

rsodre avatar Sep 13 '24 14:09 rsodre

How do we generate the src5 id for this extension when there are only events, and no functions? I'using src5-rs.

rsodre avatar May 25 '25 03:05 rsodre

It is not possible to reflect only events in interface IDs with the current specification of SRC5, but it is easy to see how this can be helpful. Maybe it's worth adding an (optional) entry for events in the SNIP.

ericnordelo avatar May 26 '25 13:05 ericnordelo