{"eip":6785,"title":"ERC-721 Utilities Information Extension","description":"Provide easy access to information about the `utility` of an NFT via functions and the NFT's metadata","authors":["Otniel Nicola (@OT-kthd)","Bogdan Popa (@BogdanKTHD)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-03-27","requires":[165,721],"discussionsTo":"https://ethereum-magicians.org/t/eip-6785-erc-721-utilities-extension/13568","repo":"ERCs","label":"ERC-6785","officialUrl":"https://eips.ethereum.org/EIPS/eip-6785","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6785.md","url":"https://eips.huatuo.xyz/eip-6785/","tldr":{"en":"A draft ERC-721 extension that publishes what perks an NFT grants (its utility) via an on-chain URI with a full change history, plus a metadata schema for describing the utility.","ja":"NFT が付与する特典（ユーティリティ）を、変更履歴付きのオンチェーン URI で公開する ERC-721 拡張のドラフト。ユーティリティを記述するメタデータスキーマも定義する。","ko":"NFT가 부여하는 혜택(유틸리티)을 전체 변경 이력이 남는 온체인 URI로 공개하는 ERC-721 확장 초안. 유틸리티를 기술하는 메타데이터 스키마도 함께 정의한다.","zh":"一个 ERC-721 扩展草案：通过带完整变更历史的链上 URI 公布 NFT 赋予的权益（utility），并提供描述权益的元数据模式。"},"tags":["nft","utility","metadata","transparency"],"explainers":{"en":{"lang":"en","tldr":"A draft ERC-721 extension that publishes what perks an NFT grants (its utility) via an on-chain URI with a full change history, plus a metadata schema for describing the utility.","tags":["nft","utility","metadata","transparency"],"related":[721,165,4907,4400],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-6785/","markdown":"## What problem does it solve?\n\nMany NFTs promise a \"utility\": event access, a call with the creator, a discount. Those promises usually live on a website or Discord post, can change silently, and are a common hook for phishing (\"claim your utility here\"). Buyers have no reliable on-chain record of what was promised or how the terms evolved.\n\nERC-6785 puts a pointer to the utility description on-chain for each token, keeps a history of every change, and extends the ERC-721 metadata JSON with a structured `utilities` section.\n\n## How it works\n\nThe contract interface ([ERC-165](/eip-165/) ID `0xed231d73`):\n\n| Member | Purpose |\n| --- | --- |\n| `setUtilityUri(tokenId, uri)` | Set or change the utility URI. Should be restricted to whoever provides the utility. Empty string means no utility. |\n| `utilityUriOf(tokenId)` | Current utility URI |\n| `utilityHistoryOf(tokenId)` | Every utility URI the token has had, in order |\n| `UpdateUtility(tokenId, uri)` | Must be emitted on every change, including batch updates |\n\nThe URI is mutable on purpose: access instructions may depend on an off-chain tool that later moves. The history makes those changes auditable. The URI can point to gated content, for example only shown after the holder signs in with their wallet, and can include current status such as remaining sessions.\n\nThe token's normal metadata should follow an extended [ERC-721](/eip-721/) JSON schema with a `utilities` object:\n\n| Field | Required | Meaning |\n| --- | --- | --- |\n| `type` | yes | Kind of utility |\n| `description` | yes | Short description |\n| `t\u0026c` | yes | Terms and conditions |\n| `properties` | no | Array of key-value details |\n| `expiry` | no | Seconds the utility stays valid after mint |\n\n## Sample code\n\nMetadata for an NFT that grants two 30-minute video calls, valid for about six months:\n\n```json\n{\n  \"name\": \"Creator Pass #12\",\n  \"description\": \"Holder pass\",\n  \"image\": \"ipfs://\u003ccid\u003e/12.png\",\n  \"utilities\": {\n    \"type\": \"Video call\",\n    \"description\": \"Private video call with the creator\",\n    \"properties\": [{ \"sessions\": 2 }, { \"duration\": 30 }, { \"time_unit\": \"minutes\" }],\n    \"expiry\": 15770000,\n    \"t\u0026c\": \"https://example.com/terms\"\n  }\n}\n```\n\nReading the current utility and its history (ethers v6):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(addr, [\n  \"function utilityUriOf(uint256) view returns (string)\",\n  \"function utilityHistoryOf(uint256) view returns (string[])\",\n], provider);\n\nconst current = await nft.utilityUriOf(12n);\nconst history: string[] = await nft.utilityHistoryOf(12n);\nconsole.log(current, `changed ${history.length} time(s)`);\n```\n\n## Things to know\n\n- Status is **Draft**: names and schema may change.\n- The standard records promises; it does not enforce them. Delivering the utility remains the creator's responsibility.\n- Whoever can call `setUtilityUri` controls what holders see, so restrict it tightly.\n- Storing an ever-growing `string[]` history on-chain costs gas on each update.\n- The rationale text mentions a `getUtilityUri` method, but the interface defines `utilityUriOf`; use the latter.\n- For on-chain usage rights rather than descriptions, see [ERC-4907](/eip-4907/) (rental user role) and [ERC-4400](/eip-4400/) (consumer role).\n"},"ja":{"lang":"ja","tldr":"NFT が付与する特典（ユーティリティ）を、変更履歴付きのオンチェーン URI で公開する ERC-721 拡張のドラフト。ユーティリティを記述するメタデータスキーマも定義する。","tags":["nft","utility","metadata","transparency"],"related":[721,165,4907,4400],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-6785/","markdown":"## 何を解決するのか\n\n多くの NFT は「ユーティリティ」を約束します。イベントへの入場、クリエイターとの通話、割引などです。こうした約束は通常ウェブサイトや Discord の投稿にあり、気づかれないまま変更される可能性があり、フィッシング（「ここでユーティリティを請求」）の常套手段にもなっています。購入者には、何が約束され、条件がどう変わってきたかを示す信頼できるオンチェーンの記録がありません。\n\nERC-6785 は、トークンごとにユーティリティ説明へのポインタをオンチェーンに置き、すべての変更の履歴を保持し、ERC-721 のメタデータ JSON を構造化された `utilities` セクションで拡張します。\n\n## 仕組み\n\nコントラクトのインターフェース（[ERC-165](/eip-165/) ID は `0xed231d73`）:\n\n| メンバー | 役割 |\n| --- | --- |\n| `setUtilityUri(tokenId, uri)` | ユーティリティ URI を設定または変更する。ユーティリティを提供する主体に限定すべき。空文字列はユーティリティなしを意味する。 |\n| `utilityUriOf(tokenId)` | 現在のユーティリティ URI |\n| `utilityHistoryOf(tokenId)` | そのトークンがこれまでに持ったすべてのユーティリティ URI（順番どおり） |\n| `UpdateUtility(tokenId, uri)` | バッチ更新を含め、変更のたびに emit しなければならない |\n\nURI をあえて変更可能にしているのは、利用手順がオフチェーンのツールに依存し、そのツールが後で移動することがあるためです。履歴によって、これらの変更を監査できます。URI はゲートされたコンテンツ、たとえば保有者がウォレットでサインインして初めて表示されるものを指すことができ、残りセッション数のような現在の状態を含めることもできます。\n\nトークンの通常のメタデータは、`utilities` オブジェクトを持つ拡張版 [ERC-721](/eip-721/) JSON スキーマに従うべきです。\n\n| フィールド | 必須 | 意味 |\n| --- | --- | --- |\n| `type` | はい | ユーティリティの種類 |\n| `description` | はい | 短い説明 |\n| `t\u0026c` | はい | 利用規約 |\n| `properties` | いいえ | キーと値の詳細の配列 |\n| `expiry` | いいえ | ミント後にユーティリティが有効な秒数 |\n\n## サンプルコード\n\n30 分のビデオ通話を 2 回、約 6 か月間有効で付与する NFT のメタデータ:\n\n```json\n{\n  \"name\": \"Creator Pass #12\",\n  \"description\": \"Holder pass\",\n  \"image\": \"ipfs://\u003ccid\u003e/12.png\",\n  \"utilities\": {\n    \"type\": \"Video call\",\n    \"description\": \"Private video call with the creator\",\n    \"properties\": [{ \"sessions\": 2 }, { \"duration\": 30 }, { \"time_unit\": \"minutes\" }],\n    \"expiry\": 15770000,\n    \"t\u0026c\": \"https://example.com/terms\"\n  }\n}\n```\n\n現在のユーティリティとその履歴を読み取る（ethers v6）:\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(addr, [\n  \"function utilityUriOf(uint256) view returns (string)\",\n  \"function utilityHistoryOf(uint256) view returns (string[])\",\n], provider);\n\nconst current = await nft.utilityUriOf(12n);\nconst history: string[] = await nft.utilityHistoryOf(12n);\nconsole.log(current, `changed ${history.length} time(s)`);\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。名前やスキーマは変わる可能性があります。\n- この標準は約束を記録するだけで、強制はしません。ユーティリティの提供は引き続きクリエイターの責任です。\n- `setUtilityUri` を呼べる主体が、保有者に見える内容を支配します。厳しく制限してください。\n- 増え続ける `string[]` の履歴をオンチェーンに保存すると、更新のたびにガス代がかかります。\n- 根拠（rationale）の文章には `getUtilityUri` メソッドが出てきますが、インターフェースで定義されているのは `utilityUriOf` です。後者を使ってください。\n- 説明ではなくオンチェーンの利用権については、[ERC-4907](/eip-4907/)（レンタルのユーザーロール）と [ERC-4400](/eip-4400/)（コンシューマーロール）を参照してください。\n"},"ko":{"lang":"ko","tldr":"NFT가 부여하는 혜택(유틸리티)을 전체 변경 이력이 남는 온체인 URI로 공개하는 ERC-721 확장 초안. 유틸리티를 기술하는 메타데이터 스키마도 함께 정의한다.","tags":["nft","utility","metadata","transparency"],"related":[721,165,4907,4400],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-6785/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 NFT가 \"유틸리티\"를 약속합니다. 행사 입장, 크리에이터와의 통화, 할인 같은 것들입니다. 이런 약속은 보통 웹사이트나 Discord 게시물에 있어서 조용히 바뀔 수 있고, 피싱(\"여기서 유틸리티를 받으세요\")의 흔한 미끼가 되기도 합니다. 구매자에게는 무엇이 약속되었고 조건이 어떻게 바뀌어 왔는지 보여 주는 믿을 만한 온체인 기록이 없습니다.\n\nERC-6785는 토큰마다 유틸리티 설명을 가리키는 포인터를 온체인에 두고, 모든 변경 이력을 보관하며, ERC-721 메타데이터 JSON을 구조화된 `utilities` 섹션으로 확장합니다.\n\n## 어떻게 동작하나요?\n\n컨트랙트 인터페이스([ERC-165](/eip-165/) ID는 `0xed231d73`):\n\n| 멤버 | 역할 |\n| --- | --- |\n| `setUtilityUri(tokenId, uri)` | 유틸리티 URI를 설정하거나 변경한다. 유틸리티를 제공하는 주체로 제한해야 한다. 빈 문자열은 유틸리티 없음을 뜻한다. |\n| `utilityUriOf(tokenId)` | 현재 유틸리티 URI |\n| `utilityHistoryOf(tokenId)` | 해당 토큰이 가졌던 모든 유틸리티 URI(순서대로) |\n| `UpdateUtility(tokenId, uri)` | 일괄 업데이트를 포함해 변경될 때마다 반드시 emit해야 한다 |\n\nURI를 일부러 변경 가능하게 둔 것은, 이용 방법이 오프체인 도구에 의존하고 그 도구가 나중에 옮겨 갈 수 있기 때문입니다. 이력이 있으면 이런 변경을 감사할 수 있습니다. URI는 보유자가 지갑으로 로그인한 뒤에만 보이는 것처럼 접근이 제한된 콘텐츠를 가리킬 수 있고, 남은 세션 수 같은 현재 상태를 담을 수도 있습니다.\n\n토큰의 일반 메타데이터는 `utilities` 객체가 있는 확장된 [ERC-721](/eip-721/) JSON 스키마를 따라야 합니다.\n\n| 필드 | 필수 | 의미 |\n| --- | --- | --- |\n| `type` | 예 | 유틸리티의 종류 |\n| `description` | 예 | 간단한 설명 |\n| `t\u0026c` | 예 | 이용 약관 |\n| `properties` | 아니요 | 키-값 상세 정보의 배열 |\n| `expiry` | 아니요 | 민팅 후 유틸리티가 유효한 시간(초) |\n\n## 샘플 코드\n\n30분짜리 화상 통화 2회를 약 6개월간 유효하게 부여하는 NFT의 메타데이터:\n\n```json\n{\n  \"name\": \"Creator Pass #12\",\n  \"description\": \"Holder pass\",\n  \"image\": \"ipfs://\u003ccid\u003e/12.png\",\n  \"utilities\": {\n    \"type\": \"Video call\",\n    \"description\": \"Private video call with the creator\",\n    \"properties\": [{ \"sessions\": 2 }, { \"duration\": 30 }, { \"time_unit\": \"minutes\" }],\n    \"expiry\": 15770000,\n    \"t\u0026c\": \"https://example.com/terms\"\n  }\n}\n```\n\n현재 유틸리티와 그 이력 읽기(ethers v6):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(addr, [\n  \"function utilityUriOf(uint256) view returns (string)\",\n  \"function utilityHistoryOf(uint256) view returns (string[])\",\n], provider);\n\nconst current = await nft.utilityUriOf(12n);\nconst history: string[] = await nft.utilityHistoryOf(12n);\nconsole.log(current, `changed ${history.length} time(s)`);\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다. 이름과 스키마는 바뀔 수 있습니다.\n- 이 표준은 약속을 기록할 뿐 강제하지는 않습니다. 유틸리티를 제공하는 책임은 여전히 크리에이터에게 있습니다.\n- `setUtilityUri`를 호출할 수 있는 주체가 보유자에게 보이는 내용을 좌우하므로 엄격하게 제한하세요.\n- 계속 늘어나는 `string[]` 이력을 온체인에 저장하면 업데이트할 때마다 gas가 듭니다.\n- 근거(rationale) 본문에는 `getUtilityUri` 메서드가 나오지만 인터페이스에서 정의한 것은 `utilityUriOf`입니다. 후자를 사용하세요.\n- 설명이 아니라 온체인 사용 권한이 필요하다면 [ERC-4907](/eip-4907/)(대여 사용자 역할)과 [ERC-4400](/eip-4400/)(소비자 역할)을 참고하세요.\n"},"zh":{"lang":"zh","tldr":"一个 ERC-721 扩展草案：通过带完整变更历史的链上 URI 公布 NFT 赋予的权益（utility），并提供描述权益的元数据模式。","tags":["nft","utility","metadata","transparency"],"related":[721,165,4907,4400],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-6785/","markdown":"## 它解决什么问题？\n\n许多 NFT 都承诺某种\"权益\"：活动入场、与创作者通话、折扣等。这些承诺通常只存在于网站或 Discord 帖子里，可能被悄悄修改，也是钓鱼攻击常用的诱饵（\"在这里领取你的权益\"）。买家没有可靠的链上记录来了解当初承诺了什么、条款又是如何变化的。\n\nERC-6785 为每个代币在链上放置一个指向权益说明的指针，保留每次变更的历史，并用结构化的 `utilities` 部分扩展 ERC-721 元数据 JSON。\n\n## 它如何运作\n\n合约接口（[ERC-165](/eip-165/) ID 为 `0xed231d73`）：\n\n| 成员 | 用途 |\n| --- | --- |\n| `setUtilityUri(tokenId, uri)` | 设置或更改权益 URI。应仅限提供权益的一方调用。空字符串表示没有权益。 |\n| `utilityUriOf(tokenId)` | 当前的权益 URI |\n| `utilityHistoryOf(tokenId)` | 该代币拥有过的所有权益 URI，按顺序排列 |\n| `UpdateUtility(tokenId, uri)` | 每次变更都必须触发，包括批量更新 |\n\nURI 被有意设计为可变：访问说明可能依赖某个链下工具，而该工具之后可能迁移。历史记录让这些变更可以被审计。URI 可以指向受限内容，例如只有持有者用钱包登录后才会显示，并且可以包含当前状态，例如剩余的次数。\n\n代币的常规元数据应遵循带有 `utilities` 对象的扩展 [ERC-721](/eip-721/) JSON 模式：\n\n| 字段 | 是否必填 | 含义 |\n| --- | --- | --- |\n| `type` | 是 | 权益的类型 |\n| `description` | 是 | 简短描述 |\n| `t\u0026c` | 是 | 条款与条件 |\n| `properties` | 否 | 键值详情数组 |\n| `expiry` | 否 | 铸造后权益保持有效的秒数 |\n\n## 示例代码\n\n一个授予两次 30 分钟视频通话、有效期约六个月的 NFT 的元数据：\n\n```json\n{\n  \"name\": \"Creator Pass #12\",\n  \"description\": \"Holder pass\",\n  \"image\": \"ipfs://\u003ccid\u003e/12.png\",\n  \"utilities\": {\n    \"type\": \"Video call\",\n    \"description\": \"Private video call with the creator\",\n    \"properties\": [{ \"sessions\": 2 }, { \"duration\": 30 }, { \"time_unit\": \"minutes\" }],\n    \"expiry\": 15770000,\n    \"t\u0026c\": \"https://example.com/terms\"\n  }\n}\n```\n\n读取当前权益及其历史（ethers v6）：\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst nft = new Contract(addr, [\n  \"function utilityUriOf(uint256) view returns (string)\",\n  \"function utilityHistoryOf(uint256) view returns (string[])\",\n], provider);\n\nconst current = await nft.utilityUriOf(12n);\nconst history: string[] = await nft.utilityHistoryOf(12n);\nconsole.log(current, `changed ${history.length} time(s)`);\n```\n\n## 需要注意\n\n- 状态为 **Draft**：名称和模式可能会变化。\n- 该标准只记录承诺，不强制执行。兑现权益仍是创作者的责任。\n- 能调用 `setUtilityUri` 的人决定了持有者能看到什么，因此要严格限制。\n- 在链上存储不断增长的 `string[]` 历史，每次更新都要消耗 gas。\n- 原理（rationale）部分提到了 `getUtilityUri` 方法，但接口中定义的是 `utilityUriOf`，请使用后者。\n- 若需要链上的使用权而非描述，请参阅 [ERC-4907](/eip-4907/)（租赁用户角色）和 [ERC-4400](/eip-4400/)（消费者角色）。\n"}}}
