Introduces a new standard for storing arbitrary metadata directly onchain for ERC-721, ERC-1155, ERC-6909, and ERC-8004 registries.
Key features:
Key-value pair interface: string keys mapped to bytes values for each token
Required getMetadata() function and MetadataSet event
Backwards compatible with existing token standards
Enables trustless AI agents, proof of personhood, and custom metadata
This addresses the long-felt need for uniform onchain metadata storage while avoiding gas inefficiencies.
Note on Standard History:
This onchain metadata standard was originally introduced as part of ERC-8041 on September 30, 2025 (commit 13f11f2). ERC-8041 later pivoted to focus on fixed-supply agent collections, so this core metadata functionality is being reintroduced as a standalone standard.
This ERC is extremely useful, in my opinion, for anything involving tokenized assets, onchain collectibles, and agents.
I suggest changing the name of the getter function to justmetadata(). This is because, across the most prominent EIPs, none of the getter functions use the get prefix to indicate that it is indeed a getter.
For example, ERC-20 doesn’t have getName() or getDecimals(); it is just name() and decimals(). This should follow the same principles
Regarding what you said about the two topics having a purpose, I don’t see it, maybe I’m not looking in the right place, but what would be the scenario where a user might want to used indexedKey instead of key, why not just indexed the key, and call it a day?
Also I’ve foud it extremy useful having a keys() so entities interacting with the smart contract know what keys are stored in the the metadadata mapping, but I dont think it should be attached to ERC, what do you think? @nxt3d