{"eip":7053,"title":"Interoperable Digital Media Indexing","description":"A universal indexing method to record, discover and retrieve the history of digital media on EVM-compatible blockchains.","authors":["Bofu Chen (@bafu)","Tammy Yang (@tammyyang)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2023-05-22","discussionsTo":"https://ethereum-magicians.org/t/eip-7053-interoperable-digital-media-indexing/14394","repo":"ERCs","label":"ERC-7053","officialUrl":"https://eips.ethereum.org/EIPS/eip-7053","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7053.md","url":"https://eips.huatuo.xyz/eip-7053/","tldr":{"en":"A simple on-chain index for digital media: anyone calls commit() with a file's content identifier (CID) and some data, and the emitted Commit events form a searchable, cross-contract history of that file.","ja":"デジタルメディア向けのシンプルなオンチェーンインデックス。誰でもファイルのコンテンツ識別子（CID）とデータを添えて commit() を呼び出せ、emit された Commit イベントがそのファイルのコントラクトをまたいで検索可能な履歴になる。","ko":"디지털 미디어를 위한 단순한 온체인 인덱스. 누구나 파일의 콘텐츠 식별자(CID)와 데이터로 commit()을 호출할 수 있고, emit된 Commit 이벤트가 그 파일의 컨트랙트를 가로지르는 검색 가능한 이력이 된다.","zh":"一个简单的数字媒体链上索引：任何人都可以用文件的内容标识符（CID）和一些数据调用 commit()，触发的 Commit 事件就构成了该文件跨合约、可检索的历史记录。"},"tags":["media","provenance","cid","indexing","events"],"explainers":{"en":{"lang":"en","tldr":"A simple on-chain index for digital media: anyone calls commit() with a file's content identifier (CID) and some data, and the emitted Commit events form a searchable, cross-contract history of that file.","tags":["media","provenance","cid","indexing","events"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7053/","markdown":"## What problem does it solve?\n\nPhotos, videos and other digital media get copied, edited, minted as NFTs and referenced by many systems. Each system tends to track a file in its own way, so there is no common key for asking \"what has been recorded about *this exact file*, by whom, on which chain?\". Provenance and metadata end up fragmented.\n\nERC-7053 proposes a common key, the file's **Content Identifier (CID)**, and a standard way to log records against it. Because a CID is a cryptographic hash of the content, anyone holding the file can recompute it and look up everything committed about it across contracts and EVM chains.\n\n## How it works\n\n1. **Compute a CID** for the media file. The spec requires a content address from a cryptographic hash and says it should be the same identifier used on decentralised storage, so the CID also locates the file and its metadata.\n2. **Call `commit`** on a compliant contract with the CID and a free-form `commitData` string (for example a pointer to metadata, an action description or an edit record).\n3. The contract **emits a `Commit` event** and returns the block number. The reference implementation also stores the block numbers per CID so they can be read back with `getCommits`.\n\n```solidity\nevent Commit(address indexed recorder, string indexed assetCid, string commitData);\n\nfunction commit(string memory assetCid, string memory commitData)\n    public returns (uint256 blockNumber);\n```\n\nThe history of a file is the ordered list of `Commit` events for its CID, potentially across many contracts and chains. NFTs minted before a contract existed can be indexed too, by computing the CID of the file their `tokenURI` points to.\n\n## Sample code\n\nCommitting and then querying a file's history (ethers v6):\n\n```ts\nimport { Contract, id } from \"ethers\";\n\nconst abi = [\n  \"event Commit(address indexed recorder, string indexed assetCid, string commitData)\",\n  \"function commit(string assetCid, string commitData) returns (uint256)\",\n];\nconst registry = new Contract(registryAddress, abi, signer);\n\nconst cid = \"bafy...\";                       // CID of the media file\nawait (await registry.commit(cid, JSON.stringify({ action: \"captured\" }))).wait();\n\n// Indexed strings are stored as keccak256 hashes in the log topic,\n// so filter by the hash of the CID.\nconst logs = await registry.queryFilter(registry.filters.Commit(null, id(cid)));\nfor (const l of logs) console.log(l.blockNumber, l.args.recorder, l.args.commitData);\n```\n\n## Things to know\n\n- **Status: Final.**\n- The contract does **not** verify anything: it does not check that the CID is valid or that `commitData` is true. Anyone can commit anything about any CID, so trust comes from *who* the `recorder` is, not from the record existing.\n- Because `assetCid` is an indexed `string`, the log topic holds its hash, not the text. You can filter by a known CID but cannot read the CID back from the topic alone; keep it in `commitData` or in storage if you need it.\n- Indexers should handle reorgs and possibly missed events when building a history from logs.\n"},"ja":{"lang":"ja","tldr":"デジタルメディア向けのシンプルなオンチェーンインデックス。誰でもファイルのコンテンツ識別子（CID）とデータを添えて commit() を呼び出せ、emit された Commit イベントがそのファイルのコントラクトをまたいで検索可能な履歴になる。","tags":["media","provenance","cid","indexing","events"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7053/","markdown":"## 何を解決するのか\n\n写真、動画、その他のデジタルメディアは、コピーされ、編集され、NFT としてミントされ、多くのシステムから参照されます。各システムがそれぞれの方法でファイルを追跡しがちなため、「*まさにこのファイル*について、誰が、どのチェーンで、何を記録したか」を問い合わせるための共通のキーがありません。来歴（プロベナンス）やメタデータが断片化してしまいます。\n\nERC-7053 は共通のキーとしてファイルの**コンテンツ識別子（CID）** を、そしてそれに対して記録を残すための標準的な方法を提案します。CID はコンテンツの暗号学的ハッシュなので、ファイルを持っていれば誰でも再計算でき、コントラクトや EVM チェーンをまたいでそれに関して commit されたすべてを調べられます。\n\n## 仕組み\n\n1. メディアファイルの **CID を計算**します。仕様は暗号学的ハッシュによるコンテンツアドレスを求めており、分散ストレージで使われるのと同じ識別子であるべきだとしています。そのため CID はファイルとそのメタデータの場所も指し示します。\n2. 準拠したコントラクトで、CID と自由形式の `commitData` 文字列（たとえばメタデータへのポインタ、操作の説明、編集記録など）を指定して **`commit` を呼び出し**ます。\n3. コントラクトは **`Commit` イベントを emit** し、ブロック番号を返します。リファレンス実装は CID ごとのブロック番号も保存し、`getCommits` で読み戻せます。\n\n```solidity\nevent Commit(address indexed recorder, string indexed assetCid, string commitData);\n\nfunction commit(string memory assetCid, string memory commitData)\n    public returns (uint256 blockNumber);\n```\n\nファイルの履歴は、その CID に対する `Commit` イベントの順序付きリストであり、多数のコントラクトやチェーンにまたがることもあります。コントラクトが存在する前にミントされた NFT も、`tokenURI` が指すファイルの CID を計算すればインデックス化できます。\n\n## サンプルコード\n\nファイルの履歴を commit し、その後に照会する例（ethers v6）:\n\n```ts\nimport { Contract, id } from \"ethers\";\n\nconst abi = [\n  \"event Commit(address indexed recorder, string indexed assetCid, string commitData)\",\n  \"function commit(string assetCid, string commitData) returns (uint256)\",\n];\nconst registry = new Contract(registryAddress, abi, signer);\n\nconst cid = \"bafy...\";                       // CID of the media file\nawait (await registry.commit(cid, JSON.stringify({ action: \"captured\" }))).wait();\n\n// Indexed strings are stored as keccak256 hashes in the log topic,\n// so filter by the hash of the CID.\nconst logs = await registry.queryFilter(registry.filters.Commit(null, id(cid)));\nfor (const l of logs) console.log(l.blockNumber, l.args.recorder, l.args.commitData);\n```\n\n## 知っておくべきこと\n\n- **ステータス: Final。**\n- コントラクトは何も検証**しません**。CID が有効かどうかも、`commitData` が真実かどうかも確認しません。誰でもどの CID に対しても何でも commit できるため、信頼は記録が存在することではなく、`recorder` が*誰か*から生まれます。\n- `assetCid` は indexed な `string` なので、ログのトピックにはテキストではなくそのハッシュが入ります。既知の CID でフィルタすることはできますが、トピックだけから CID を読み戻すことはできません。必要な場合は `commitData` かストレージに保持してください。\n- インデクサーは、ログから履歴を構築する際、リオーグや取りこぼされたイベントの可能性を考慮する必要があります。\n"},"ko":{"lang":"ko","tldr":"디지털 미디어를 위한 단순한 온체인 인덱스. 누구나 파일의 콘텐츠 식별자(CID)와 데이터로 commit()을 호출할 수 있고, emit된 Commit 이벤트가 그 파일의 컨트랙트를 가로지르는 검색 가능한 이력이 된다.","tags":["media","provenance","cid","indexing","events"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7053/","markdown":"## 어떤 문제를 해결하나요?\n\n사진, 동영상 등 디지털 미디어는 복사되고, 편집되고, NFT로 발행되며, 많은 시스템에서 참조됩니다. 각 시스템이 자기만의 방식으로 파일을 추적하는 경향이 있어서, \"*바로 이 파일*에 대해 누가, 어떤 체인에서, 무엇을 기록했는가?\"를 물을 수 있는 공통 키가 없습니다. 출처(provenance)와 메타데이터가 파편화됩니다.\n\nERC-7053은 공통 키로 파일의 **콘텐츠 식별자(CID)** 를, 그리고 그것에 대해 기록을 남기는 표준 방식을 제안합니다. CID는 콘텐츠의 암호학적 해시이므로, 파일을 가진 누구나 다시 계산해 컨트랙트와 EVM 체인 전반에서 그에 대해 commit된 모든 것을 조회할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n1. 미디어 파일의 **CID를 계산**합니다. 사양은 암호학적 해시에 기반한 콘텐츠 주소를 요구하며, 탈중앙화 스토리지에서 쓰이는 것과 같은 식별자여야 한다고 말합니다. 그래서 CID는 파일과 그 메타데이터의 위치도 알려 줍니다.\n2. 준수하는 컨트랙트에서 CID와 자유 형식의 `commitData` 문자열(예: 메타데이터를 가리키는 포인터, 작업 설명, 편집 기록)로 **`commit`을 호출**합니다.\n3. 컨트랙트는 **`Commit` 이벤트를 emit**하고 블록 번호를 반환합니다. 레퍼런스 구현은 CID별 블록 번호도 저장해 `getCommits`로 다시 읽을 수 있게 합니다.\n\n```solidity\nevent Commit(address indexed recorder, string indexed assetCid, string commitData);\n\nfunction commit(string memory assetCid, string memory commitData)\n    public returns (uint256 blockNumber);\n```\n\n파일의 이력은 그 CID에 대한 `Commit` 이벤트의 순서 있는 목록이며, 여러 컨트랙트와 체인에 걸쳐 있을 수 있습니다. 컨트랙트가 생기기 전에 발행된 NFT도 `tokenURI`가 가리키는 파일의 CID를 계산하면 인덱싱할 수 있습니다.\n\n## 샘플 코드\n\n파일의 이력을 commit한 다음 조회하는 예제(ethers v6):\n\n```ts\nimport { Contract, id } from \"ethers\";\n\nconst abi = [\n  \"event Commit(address indexed recorder, string indexed assetCid, string commitData)\",\n  \"function commit(string assetCid, string commitData) returns (uint256)\",\n];\nconst registry = new Contract(registryAddress, abi, signer);\n\nconst cid = \"bafy...\";                       // CID of the media file\nawait (await registry.commit(cid, JSON.stringify({ action: \"captured\" }))).wait();\n\n// Indexed strings are stored as keccak256 hashes in the log topic,\n// so filter by the hash of the CID.\nconst logs = await registry.queryFilter(registry.filters.Commit(null, id(cid)));\nfor (const l of logs) console.log(l.blockNumber, l.args.recorder, l.args.commitData);\n```\n\n## 알아둘 점\n\n- **상태: Final.**\n- 컨트랙트는 아무것도 검증하지 **않습니다**. CID가 유효한지, `commitData`가 사실인지 확인하지 않습니다. 누구나 어떤 CID에 대해서든 무엇이든 commit할 수 있으므로, 신뢰는 기록이 존재한다는 사실이 아니라 `recorder`가 *누구인지*에서 나옵니다.\n- `assetCid`는 indexed `string`이므로 로그 토픽에는 텍스트가 아니라 그 해시가 들어갑니다. 알고 있는 CID로 필터링할 수는 있지만 토픽만으로 CID를 다시 읽을 수는 없습니다. 필요하다면 `commitData`나 스토리지에 보관하세요.\n- 인덱서는 로그로 이력을 구성할 때 리오그와 놓칠 수 있는 이벤트를 고려해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一个简单的数字媒体链上索引：任何人都可以用文件的内容标识符（CID）和一些数据调用 commit()，触发的 Commit 事件就构成了该文件跨合约、可检索的历史记录。","tags":["media","provenance","cid","indexing","events"],"related":[721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7053/","markdown":"## 它解决什么问题？\n\n照片、视频和其他数字媒体会被复制、编辑、铸造成 NFT，并被许多系统引用。每个系统往往各自追踪文件，因此没有一个通用的键来回答\"*这个确切的文件*被谁、在哪条链上记录过什么？\"。来源（provenance）和元数据因此变得零散。\n\nERC-7053 提出了一个通用的键，即文件的**内容标识符（Content Identifier，CID）**，以及针对它记录日志的标准方式。由于 CID 是内容的密码学哈希，任何拥有该文件的人都可以重新计算它，并查询跨合约、跨 EVM 链针对它提交的所有记录。\n\n## 它如何运作\n\n1. 为媒体文件**计算 CID**。规范要求使用基于密码学哈希的内容地址，并说明它应与去中心化存储上使用的标识符相同，这样 CID 同时也能定位文件及其元数据。\n2. 在符合规范的合约上**调用 `commit`**，传入 CID 和一个自由格式的 `commitData` 字符串（例如指向元数据的指针、操作描述或编辑记录）。\n3. 合约**触发 `Commit` 事件**并返回区块号。参考实现还会按 CID 保存区块号，以便通过 `getCommits` 读回。\n\n```solidity\nevent Commit(address indexed recorder, string indexed assetCid, string commitData);\n\nfunction commit(string memory assetCid, string memory commitData)\n    public returns (uint256 blockNumber);\n```\n\n一个文件的历史就是其 CID 对应的 `Commit` 事件的有序列表，可能跨越许多合约和链。在合约出现之前铸造的 NFT 也可以被索引，只需计算其 `tokenURI` 所指文件的 CID。\n\n## 示例代码\n\n提交记录并随后查询文件的历史（ethers v6）：\n\n```ts\nimport { Contract, id } from \"ethers\";\n\nconst abi = [\n  \"event Commit(address indexed recorder, string indexed assetCid, string commitData)\",\n  \"function commit(string assetCid, string commitData) returns (uint256)\",\n];\nconst registry = new Contract(registryAddress, abi, signer);\n\nconst cid = \"bafy...\";                       // CID of the media file\nawait (await registry.commit(cid, JSON.stringify({ action: \"captured\" }))).wait();\n\n// Indexed strings are stored as keccak256 hashes in the log topic,\n// so filter by the hash of the CID.\nconst logs = await registry.queryFilter(registry.filters.Commit(null, id(cid)));\nfor (const l of logs) console.log(l.blockNumber, l.args.recorder, l.args.commitData);\n```\n\n## 需要注意\n\n- **状态：Final。**\n- 合约**不会**验证任何内容：它不检查 CID 是否有效，也不检查 `commitData` 是否属实。任何人都可以针对任何 CID 提交任何内容，因此信任来自 `recorder` 是*谁*，而不是记录本身存在。\n- 由于 `assetCid` 是 indexed 的 `string`，日志 topic 中保存的是它的哈希而非文本。你可以按已知的 CID 过滤，但无法仅凭 topic 读回 CID；如果需要，请把它放在 `commitData` 或存储中。\n- 索引器在根据日志构建历史时，应处理重组（reorg）以及可能漏掉的事件。\n"}},"requiredBy":[7517]}
