Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article covers ERC6785, a proposal for describing the specific utilities of ERC721 NFTs and how to use them through metadata.
This article translates, summarizes, and expands on the proposal below.
I have also covered a range of other EIPs.
Overview
The standard extends ERC721 tokens. ERC721 is the Ethereum standard for issuing non-fungible tokens (NFTs). The extension consists of an additional metadata schema that describes the utilities (practical benefits or value) offered by a token and how they can be used or accessed.
For more on ERC721, see the following article.
ERC721 Basics
ERC721 is a smart contract interface for defining NFTs. Each ERC721 token is unique within its contract and can have distinct attributes and metadata. This makes it possible to represent ownership of digital or physical assets, such as artwork, collectibles, and real estate, on-chain. For physical assets, the legal relationship between the token and the asset depends on arrangements outside the token standard.
Metadata Schema Extension
The metadata schema extension describes token utilities in greater detail. It covers uses such as providing in-game items, access to events, or access to particular services. By providing information about how a token can be used and what features are available, the extended schema helps users understand its practical value.
Standard Functions
In this context, standard functions are smart contract functions that provide a common way to discover information about token utilities and how to access them. They standardize how token users obtain the relevant information. Actual access to the underlying benefit may require additional application-specific logic.
Optional Extension
The optional extension is additional functionality that developers can choose to adopt rather than a mandatory part of ERC721 itself. Supporting the extension is not required for ERC721 compliance, but adopting it can make token utilities clearer and improve the user experience.
The extension aims to enhance NFT functionality and applicability in the marketplace. By defining token utilities in detail, it makes it easier for owners and developers to realize additional value from NFTs.
Motivation
Relying on third-party platforms for information about NFT utilities can expose users to fraud, phishing, and other forms of misconduct. The specification therefore proposes incorporating this information directly into NFT metadata. This can improve transparency about the practical benefits of NFTs and increase accountability for creators who promise those benefits.
The proposed metadata includes the following information.
- Type of utility
- The type of benefit the NFT offers, such as access rights, physical goods, or rights to use digital content.
- Utility description
- Details of the specific benefit and the value it provides.
- Frequency and duration of utility
- How often a benefit is available, such as once or on a recurring basis, and the period during which it can be used.
- Utility expiry
- The deadline after which the benefit can no longer be used.
The specification lets NFT owners discover information about what value their NFTs offer, how to use their benefits, and the applicable conditions from references recorded on-chain. This reduces the need to depend on unrelated third-party platforms for information, although the URI may still point to externally hosted content.
Because the way a utility is accessed may change over time, the history of those changes should be recorded to provide transparency. This helps keep NFT utility information up to date and makes it possible for owners to review it at any time.
The specification aims to improve trust and transparency in the NFT marketplace, helping users understand the benefits associated with their NFTs and make informed decisions about how to use them.
Specification
All contracts that conform to ERC6785 must implement the interface defined below.
Interface
// @title NFT Utility description
/// Note: the EIP-165 identifier for this interface is ed231d73
interface IERC6785 {
// Logged when the utility description URL of an NFT is changed
/// @notice Emitted when the utilityURL of an NFT is changed
/// The empty string for `utilityUri` indicates that there is no utility associated
event UpdateUtility(uint256 indexed tokenId, string utilityUri);
/// @notice set the new utilityUri - remember the date it was set on
/// @dev The empty string indicates there is no utility
/// Throws if `tokenId` is not valid NFT
/// @param utilityUri The new utility description of the NFT
/// 4a048176
function setUtilityUri(uint256 tokenId, string utilityUri) external;
/// @notice Get the utilityUri of an NFT
/// @dev The empty string for `utilityUri` indicates that there is no utility associated
/// @param tokenId The NFT to get the user address for
/// @return The utility uri for this NFT
/// 5e470cbc
function utilityUriOf(uint256 tokenId) external view returns (string memory);
/// @notice Get the changes made to utilityUri
/// @param tokenId The NFT to get the user address for
/// @return The history of changes to `utilityUri` for this NFT
/// f96090b9
function utilityHistoryOf(uint256 tokenId) external view returns (string[] memory);
}setUtilityUri
function setUtilityUri(uint256 tokenId, string utilityUri) external;Overview
Sets a new URL for the description of an NFT's utility.
Details
This function sets or updates the URL that provides utility information for a particular NFT.
The date on which the URL is set should also be recorded.
An empty string indicates that no utility is associated with the NFT.
An invalid tokenId must cause the function to revert.
Parameters
tokenId- The ID of the NFT whose utility URL is being set or updated.
utilityUri- The new URL providing information about the NFT's utility.
utilityUriOf
function utilityUriOf(uint256 tokenId) external view returns (string memory);Overview
Retrieves the utility URL of a specified NFT.
Details
The function returns the URL providing utility information for the specified NFT. If no URL has been set, it returns an empty string. This allows NFT owners and users to obtain information about the benefits offered by the NFT.
Parameters
tokenId- The ID of the NFT whose utility URL is requested.
Return value
string memory- The utility URL of the specified NFT.
utilityHistoryOf
function utilityHistoryOf(uint256 tokenId) external view returns (string[] memory);Overview
Retrieves the history of changes to the utility URL of a specified NFT.
Details
The function returns an array containing the history of utility URLs set or updated for the specified NFT. This makes it possible to review changes to the NFT's utility references over time.
Parameters
tokenId- The ID of the NFT whose utility URL history is requested.
Return value
string[] memory- The history of changes to the specified NFT's utility URL.
UpdateUtility
event UpdateUtility(uint256 indexed tokenId, string utilityUri);Overview
An event recorded when an NFT's utility URL changes.
Details
This event is emitted whenever a utility URL for a particular NFT is newly set or updated.
An empty utilityUri indicates that no utility is associated with the NFT.
The event allows changes to the NFT's utility information to be tracked.
Parameters
tokenId- The ID of the NFT whose utility URL was updated.
utilityUri- The new utility URL.
The preceding interface describes how contracts manage information about NFT utilities. A utility here is an additional benefit or feature offered by an NFT. Following these guidelines helps clarify the practical value of NFTs and manage references to that information transparently on-chain.
Function Implementation Guidelines
- Use of
viewandpure- Functions declared as
vieware read-only and cannot modify state. They may be implemented aspureorview. - A
purefunction does not read contract state and computes its result without accessing that state.
- Functions declared as
- Visibility of
setUtilityUrisetUtilityUrimay be implemented aspublicorexternal.- An
externalfunction is invoked through the external call interface, whereas apublicfunction can also be called internally. - Permission to set
utilityUrishould be restricted to the party providing the utility, whether the NFT creator or another party.
Event and Method Guidelines
UpdateUtility- The
UpdateUtilityevent must be emitted whenever the utility URL is changed bysetUtilityUrior another mechanism, such as a batch update. - This allows changes to NFT utility references to be tracked transparently.
- The
utilityHistoryOf- This method must reflect all changes to a
tokenId'sutilityUri, whether made throughsetUtilityUrior other means such as bulk updates. - This provides a complete history of changes to the NFT's utility URI.
- This method must reflect all changes to a
supportsInterface- This method indicates whether a given interface identifier is supported.
- The contract must return
truewhen passed0xed231d73. - This indicates that the contract supports the specified functionality.
Metadata Schema Guidelines
- Metadata compliance
- The original metadata should conform to the "ERC-6785 Metadata with utilities JSON Schema."
- This is a compatible extension of the "ERC-721 Metadata JSON Schema" designed to include information about the utilities offered by an NFT.
Following these guidelines makes it possible to manage NFT utility information in a transparent and consistent manner and provide useful information to NFT owners and users.
ERC6785 Metadata with the Utilities JSON Schema
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents"
},
"description": {
"type": "string",
"description": "Describes the asset to which this NFT represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
},
"utilities": {
"type": "object",
"required": [
"type",
"description",
"t&c"
],
"properties": {
"type": {
"type": "string",
"description": "Describes what type of utility this is"
},
"description": {
"type": "string",
"description": "A brief description of the utility"
},
"properties": {
"type": "array",
"description": "An array of possible properties describing the utility, defined as key-value pairs",
"items": {
"type": "object"
}
},
"expiry": {
"type": "number",
"description": "The period of time for the validity of the utility, since the minting of the NFT. Expressed in seconds"
},
"t&c": {
"type": "string",
"description": ""
}
}
}
}
}The JSON schema above describes metadata for an asset represented by an NFT. It defines a structure that includes information about the asset represented by the NFT and the utilities, or additional benefits and features, associated with that asset.
Asset Metadata Properties
- name
- Type
string
- Description
- Identifies the asset represented by the NFT.
- Type
- description
- Type
string
- Description
- Describes the asset represented by the NFT.
- Type
- image
- Type
string
- Description
- A URI pointing to an image representing the asset.
- The resource has a MIME type of
image/*. - An image width between 320 and 1080 pixels and an aspect ratio between 1.91:1 and 4:5, inclusive, are recommended.
- Type
Utility Properties
- utilities
- Type
object
- Required fields
type,description,t&c
- Properties
- type
- Type
string
- Description
- Describes the type of utility.
- Type
- description
- Type
string
- Description
- A brief description of the utility.
- Type
- properties
- Type
array
- Description
- An array of possible properties describing the utility.
- The properties are defined as key-value pairs.
- Items
- Type
object
- Type
- Type
- expiry
- Type
number
- Description
- The period during which the utility is valid.
- Expressed in seconds from the minting of the NFT.
- Type
- t&c
- Type
string
- Description
- Terms and conditions applicable to the utility.
- Type
- type
- Type
The schema aims to provide NFT owners with transparent and comprehensive information about the assets their NFTs represent and the associated benefits. It is intended to help users understand an NFT's practical value and usage conditions, contributing to a more transparent and trustworthy NFT marketplace.
Additional Considerations
Managing NFT utility information (utilityUri) requires flexibility and transparency.
In particular, NFT utilities may depend on external tools or platforms, and creators need a way to update utilityUri if those resources become unavailable or inaccessible.
This allows NFT utility information to remain current and gives users access to accurate information as external services change.
Updating Utility Information
An NFT's utilityUri is a URL pointing to details of the specific benefits or features offered by the NFT.
If the URL depends on external tools or platforms, the information must be updateable when service continuity becomes a problem.
An external service may shut down, for example, or the website hosting the information may become unavailable.
In such circumstances, the ability of the creator to update utilityUri promptly helps maintain the NFT's practical value and provide accurate information to owners.
Providing Transparency
The utilityHistoryOf method makes it possible to see how an NFT's utilityUri has changed over time.
This allows owners and prospective buyers to track changes to utility references. Associated transaction and event records can help determine when changes occurred; the reasons for changes require additional information.
Providing transparent information improves trust and helps users understand the NFT.
Example: An NFT Granting Access to a Video Call
Suppose a creator sells an NFT that provides access to a video call as a utility. Its metadata describes the details of this benefit.
If the platform used for the call changes, or information about the tools used for the call needs updating, the creator must update utilityUri accordingly.
Keeping utilityUri current allows NFT owners to access the latest information and make appropriate use of the benefit offered.
This approach gives NFT creators flexibility to respond to changes in external dependencies while providing NFT owners with more transparent and reliable information.
{
"name": "...",
"description": "...",
"image": "...",
"utilities": {
"type": "Video call",
"description": "I will enter a private video call with whoever owns the NFT",
"properties": [
{
"sessions": 2
},
{
"duration": 30
},
{
"time_unit": "minutes"
}
],
"expiry": 1.577e+7,
"t&c": "https://...."
}
}The example illustrates how to access information about a specific NFT utility, in this case access to a video call.
The process involves the owner retrieving the URI associated with their NFT. The original explanation calls the method getUtilityUri; the standard interface shown above defines utilityUriOf.
The URI identifies a web resource that provides the information needed to participate in the video call, such as its date, time, and access method.
Access to call details may also require authentication through the wallet that owns the NFT.
With an appropriately implemented ownership check, access to the utility can be restricted to legitimate owners.
Utility Access Process
-
Retrieving the utility URI
- The NFT owner retrieves the URI providing detailed video call information using
utilityUriOf(referred to asgetUtilityUriin the original example). - The URI points to a web page containing the information needed to access the video call session.
- The NFT owner retrieves the URI providing detailed video call information using
-
Authentication
- If access to video call details is restricted to NFT owners, the owner must authenticate with their wallet to demonstrate that they are the legitimate owner of the NFT.
- This can prevent non-owners from accessing the utility.
-
Utility status information
- The resource referenced by the URI may also contain information about the current status of the video call sessions.
- Examples include the number of remaining sessions, the video call schedule, and how to make a reservation.
Security and Convenience
This approach can restrict access to NFT owners while allowing owners to use the utility conveniently and securely. Providing up-to-date information about the status of the utility also makes it easier for owners to plan how to use their benefits. The process illustrates how blockchain records and NFTs can support transparency and provenance while helping users obtain value from digital assets. The utility information and access controls remain subject to the implementation.
Compatibility
The standard defines a way to add utility information to NFTs using method names that do not overlap with those used by the related ERC721 standards discussed in the proposal. Adopting the standard can therefore provide additional functionality and information without changing the existing behavior of ERC721 tokens.
Tests
The test code is available here.
https://eips.ethereum.org/assets/eip-6785/test/ERC6785.test.js
Implementation
The implementation is available here.
https://eips.ethereum.org/assets/eip-6785/contracts/ERC6785.sol
Security
The proposal identifies no security considerations directly related to implementing the standard. Implementers must nevertheless protect utility update permissions and validate any external resource or access mechanism on which the benefit depends.
Citation
Otniel Nicola (@OT-kthd), Bogdan Popa (@BogdanKTHD), "ERC-6785: ERC-721 Utilities Information Extension [DRAFT]," Ethereum Improvement Proposals, no. 6785, March 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6785.
Conclusion
This article covered ERC6785, which proposes a way to describe the specific utilities of ERC721 NFTs and how to use them through metadata.
If you have questions, feel free to contact me by direct message on Twitter.
I also publish material on the following platforms.


