{"eip":5489,"title":"NFT Hyperlink Extension","description":"NFT Hyperlink Extension embeds hyperlinks onto NFTs, allowing users to click any hNFT and be transported to any url set by the owner.","authors":["IronMan_CH (@coderfengyun)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2022-08-16","requires":[165,721],"discussionsTo":"https://ethereum-magicians.org/t/eip-5489-nft-hyperlink-extension/10431","repo":"ERCs","label":"ERC-5489","officialUrl":"https://eips.ethereum.org/EIPS/eip-5489","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-5489.md","url":"https://eips.huatuo.xyz/eip-5489/","tldr":{"en":"An ERC-721 extension that gives each NFT hyperlink slots: the owner authorizes addresses to manage a slot, each slot points to a URI, and the owner can revoke at any time.","ja":"各 NFT にハイパーリンクのスロットを持たせる ERC-721 拡張。所有者がアドレスにスロットの管理を許可し、各スロットは URI を指し、所有者はいつでも取り消せる。","ko":"각 NFT에 하이퍼링크 슬롯을 부여하는 ERC-721 확장. 소유자가 주소에 슬롯 관리 권한을 주고, 각 슬롯은 URI를 가리키며, 소유자는 언제든 취소할 수 있다.","zh":"一个 ERC-721 扩展，为每个 NFT 提供超链接槽位：所有者授权地址管理某个槽位，每个槽位指向一个 URI，所有者可以随时撤销。"},"tags":["nft","erc-721","hyperlink","metadata","advertising"],"explainers":{"en":{"lang":"en","tldr":"An ERC-721 extension that gives each NFT hyperlink slots: the owner authorizes addresses to manage a slot, each slot points to a URI, and the owner can revoke at any time.","tags":["nft","erc-721","hyperlink","metadata","advertising"],"related":[721,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-5489/","markdown":"## What problem does it solve?\n\nAn [ERC-721](/eip-721/) token has one `tokenURI`, controlled by the collection contract. There is no standard way for the token's *owner* to attach extra content (a link to a project, an ad, a video) or to let someone else do so.\n\nERC-5489 turns an NFT into something like a small billboard. The owner hands out **slots** to other addresses. Each slot holder publishes a URI on the NFT, and apps can display those links. Since authorizing a slot is an on-chain action, a dApp can, for example, reward NFT owners for granting it a slot and stop rewards when the slot is revoked.\n\n## How it works\n\nA slot is an entry in a per-token map keyed by the manager's address.\n\n| Function | Who may call | Effect |\n| --- | --- | --- |\n| `authorizeSlotTo(tokenId, slotManagerAddr)` | token owner | Creates a slot for that address |\n| `revokeAuthorization(tokenId, slotManagerAddr)` | token owner | Removes one slot |\n| `revokeAllAuthorizations(tokenId)` | token owner | Removes every slot |\n| `setSlotUri(tokenId, newUri)` | an authorized manager | Sets the URI of the caller's own slot |\n| `getSlotUri(tokenId, slotManagerAddr)` | anyone | Reads a slot's URI |\n\nEvents `SlotAuthorizationCreated`, `SlotAuthorizationRevoked` and `SlotUriUpdated` must be emitted, so indexers and front ends can track slots. `supportsInterface` returns `true` for `0x8f65987b` ([ERC-165](/eip-165/)).\n\nEach slot URI must point to a JSON document with three optional fields:\n\n```json\n{\n  \"icon\": \"ipfs://\u003ccid\u003e/logo.png\",\n  \"description\": \"Short text about the linked resource\",\n  \"target\": \"https://example.com/landing\"\n}\n```\n\n`icon` is a thumbnail image, `description` a short blurb, and `target` the URI to open when a user clicks the NFT's link.\n\n## Sample code\n\nOwner grants a slot, the manager sets its link, a viewer reads it (ethers v6):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst abi = [\n  \"function authorizeSlotTo(uint256 tokenId, address slotManagerAddr)\",\n  \"function setSlotUri(uint256 tokenId, string newUri)\",\n  \"function getSlotUri(uint256 tokenId, address slotManagerAddr) view returns (string)\",\n  \"function supportsInterface(bytes4) view returns (bool)\",\n];\n\nconst asOwner = new Contract(hnft, abi, ownerSigner);\nif (!(await asOwner.supportsInterface(\"0x8f65987b\"))) throw new Error(\"not ERC-5489\");\nawait (await asOwner.authorizeSlotTo(1n, adManager)).wait();\n\nconst asManager = new Contract(hnft, abi, adManagerSigner);\nawait (await asManager.setSlotUri(1n, \"ipfs://\u003ccid\u003e/slot.json\")).wait();\n\nconst uri = await new Contract(hnft, abi, provider).getSlotUri(1n, adManager);\nconst meta = await (await fetch(toGatewayUrl(uri))).json();   // { icon, description, target }\n```\n\n## Things to know\n\n- Status is **Final**.\n- Slot content is controlled by the slot manager, not the collection. Front ends should treat `target` links as untrusted and guard against phishing.\n- The spec does not say whether slots survive a token transfer; check the implementation (the reference code is linked from the ERC).\n- The spec defines no limit on the number of slots per token, so `revokeAllAuthorizations` can become expensive.\n"},"ja":{"lang":"ja","tldr":"各 NFT にハイパーリンクのスロットを持たせる ERC-721 拡張。所有者がアドレスにスロットの管理を許可し、各スロットは URI を指し、所有者はいつでも取り消せる。","tags":["nft","erc-721","hyperlink","metadata","advertising"],"related":[721,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-5489/","markdown":"## 何を解決するのか\n\n[ERC-721](/eip-721/) トークンには、コレクションのコントラクトが管理する `tokenURI` が 1 つあります。トークンの*所有者*が追加のコンテンツ（プロジェクトへのリンク、広告、動画）を付けたり、他の誰かにそれを許可したりするための標準的な方法はありません。\n\nERC-5489 は NFT を小さな広告板のようなものに変えます。所有者は他のアドレスに**スロット**を渡します。各スロットの保持者は NFT 上に URI を公開し、アプリはそのリンクを表示できます。スロットの許可はオンチェーンの操作なので、たとえば dApp は、スロットを許可してくれた NFT 所有者に報酬を出し、スロットが取り消されたら報酬を止める、といったことができます。\n\n## 仕組み\n\nスロットは、マネージャーのアドレスをキーとする、トークンごとのマップのエントリです。\n\n| 関数 | 呼び出せる人 | 効果 |\n| --- | --- | --- |\n| `authorizeSlotTo(tokenId, slotManagerAddr)` | トークン所有者 | そのアドレス用のスロットを作成する |\n| `revokeAuthorization(tokenId, slotManagerAddr)` | トークン所有者 | スロットを 1 つ削除する |\n| `revokeAllAuthorizations(tokenId)` | トークン所有者 | すべてのスロットを削除する |\n| `setSlotUri(tokenId, newUri)` | 許可されたマネージャー | 呼び出し元自身のスロットの URI を設定する |\n| `getSlotUri(tokenId, slotManagerAddr)` | 誰でも | スロットの URI を読み取る |\n\nインデクサーやフロントエンドがスロットを追跡できるよう、イベント `SlotAuthorizationCreated`、`SlotAuthorizationRevoked`、`SlotUriUpdated` を emit しなければなりません。`supportsInterface` は `0x8f65987b` に対して `true` を返します（[ERC-165](/eip-165/)）。\n\n各スロットの URI は、3 つの任意フィールドを持つ JSON ドキュメントを指していなければなりません。\n\n```json\n{\n  \"icon\": \"ipfs://\u003ccid\u003e/logo.png\",\n  \"description\": \"Short text about the linked resource\",\n  \"target\": \"https://example.com/landing\"\n}\n```\n\n`icon` はサムネイル画像、`description` は短い紹介文、`target` はユーザーが NFT のリンクをクリックしたときに開く URI です。\n\n## サンプルコード\n\n所有者がスロットを許可し、マネージャーがそのリンクを設定し、閲覧者がそれを読む（ethers v6）:\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst abi = [\n  \"function authorizeSlotTo(uint256 tokenId, address slotManagerAddr)\",\n  \"function setSlotUri(uint256 tokenId, string newUri)\",\n  \"function getSlotUri(uint256 tokenId, address slotManagerAddr) view returns (string)\",\n  \"function supportsInterface(bytes4) view returns (bool)\",\n];\n\nconst asOwner = new Contract(hnft, abi, ownerSigner);\nif (!(await asOwner.supportsInterface(\"0x8f65987b\"))) throw new Error(\"not ERC-5489\");\nawait (await asOwner.authorizeSlotTo(1n, adManager)).wait();\n\nconst asManager = new Contract(hnft, abi, adManagerSigner);\nawait (await asManager.setSlotUri(1n, \"ipfs://\u003ccid\u003e/slot.json\")).wait();\n\nconst uri = await new Contract(hnft, abi, provider).getSlotUri(1n, adManager);\nconst meta = await (await fetch(toGatewayUrl(uri))).json();   // { icon, description, target }\n```\n\n## 知っておくべきこと\n\n- ステータスは **Final** です。\n- スロットの内容を管理するのはスロットのマネージャーであり、コレクションではありません。フロントエンドは `target` リンクを信頼できないものとして扱い、フィッシングに備えるべきです。\n- 仕様は、トークンの移転後もスロットが残るかどうかを定めていません。実装を確認してください（リファレンスコードは ERC からリンクされています）。\n- 仕様はトークンごとのスロット数に上限を定めていないため、`revokeAllAuthorizations` のコストが高くなることがあります。\n"},"ko":{"lang":"ko","tldr":"각 NFT에 하이퍼링크 슬롯을 부여하는 ERC-721 확장. 소유자가 주소에 슬롯 관리 권한을 주고, 각 슬롯은 URI를 가리키며, 소유자는 언제든 취소할 수 있다.","tags":["nft","erc-721","hyperlink","metadata","advertising"],"related":[721,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-5489/","markdown":"## 어떤 문제를 해결하나요?\n\n[ERC-721](/eip-721/) 토큰에는 컬렉션 컨트랙트가 제어하는 `tokenURI`가 하나 있습니다. 토큰의 *소유자*가 추가 콘텐츠(프로젝트 링크, 광고, 동영상)를 붙이거나 다른 사람이 붙이도록 허용할 표준적인 방법은 없습니다.\n\nERC-5489는 NFT를 작은 광고판 같은 것으로 바꿉니다. 소유자는 다른 주소에 **슬롯**을 나눠 줍니다. 각 슬롯 보유자는 NFT에 URI를 게시하고, 앱은 그 링크를 표시할 수 있습니다. 슬롯을 승인하는 것은 온체인 동작이므로, 예를 들어 dApp은 자신에게 슬롯을 승인해 준 NFT 소유자에게 보상을 주고 슬롯이 취소되면 보상을 중단할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n슬롯은 매니저의 주소를 키로 하는 토큰별 맵의 항목입니다.\n\n| 함수 | 호출 가능한 사람 | 효과 |\n| --- | --- | --- |\n| `authorizeSlotTo(tokenId, slotManagerAddr)` | 토큰 소유자 | 해당 주소를 위한 슬롯 생성 |\n| `revokeAuthorization(tokenId, slotManagerAddr)` | 토큰 소유자 | 슬롯 하나 제거 |\n| `revokeAllAuthorizations(tokenId)` | 토큰 소유자 | 모든 슬롯 제거 |\n| `setSlotUri(tokenId, newUri)` | 승인된 매니저 | 호출자 자신의 슬롯 URI 설정 |\n| `getSlotUri(tokenId, slotManagerAddr)` | 누구나 | 슬롯의 URI 읽기 |\n\n인덱서와 프런트엔드가 슬롯을 추적할 수 있도록 이벤트 `SlotAuthorizationCreated`, `SlotAuthorizationRevoked`, `SlotUriUpdated`를 emit해야 합니다. `supportsInterface`는 `0x8f65987b`에 대해 `true`를 반환합니다([ERC-165](/eip-165/)).\n\n각 슬롯 URI는 선택 필드 세 개를 가진 JSON 문서를 가리켜야 합니다.\n\n```json\n{\n  \"icon\": \"ipfs://\u003ccid\u003e/logo.png\",\n  \"description\": \"Short text about the linked resource\",\n  \"target\": \"https://example.com/landing\"\n}\n```\n\n`icon`은 썸네일 이미지, `description`은 짧은 소개문, `target`은 사용자가 NFT의 링크를 클릭했을 때 여는 URI입니다.\n\n## 샘플 코드\n\n소유자가 슬롯을 승인하고, 매니저가 링크를 설정하고, 조회자가 이를 읽기(ethers v6):\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst abi = [\n  \"function authorizeSlotTo(uint256 tokenId, address slotManagerAddr)\",\n  \"function setSlotUri(uint256 tokenId, string newUri)\",\n  \"function getSlotUri(uint256 tokenId, address slotManagerAddr) view returns (string)\",\n  \"function supportsInterface(bytes4) view returns (bool)\",\n];\n\nconst asOwner = new Contract(hnft, abi, ownerSigner);\nif (!(await asOwner.supportsInterface(\"0x8f65987b\"))) throw new Error(\"not ERC-5489\");\nawait (await asOwner.authorizeSlotTo(1n, adManager)).wait();\n\nconst asManager = new Contract(hnft, abi, adManagerSigner);\nawait (await asManager.setSlotUri(1n, \"ipfs://\u003ccid\u003e/slot.json\")).wait();\n\nconst uri = await new Contract(hnft, abi, provider).getSlotUri(1n, adManager);\nconst meta = await (await fetch(toGatewayUrl(uri))).json();   // { icon, description, target }\n```\n\n## 알아둘 점\n\n- 상태는 **Final**입니다.\n- 슬롯 내용은 컬렉션이 아니라 슬롯 매니저가 제어합니다. 프런트엔드는 `target` 링크를 신뢰할 수 없는 것으로 취급하고 피싱에 대비해야 합니다.\n- 스펙은 토큰을 전송한 뒤에도 슬롯이 유지되는지 밝히지 않습니다. 구현을 확인하세요(참조 코드는 ERC에서 링크되어 있습니다).\n- 스펙은 토큰당 슬롯 수에 제한을 두지 않으므로 `revokeAllAuthorizations`가 비싸질 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"一个 ERC-721 扩展，为每个 NFT 提供超链接槽位：所有者授权地址管理某个槽位，每个槽位指向一个 URI，所有者可以随时撤销。","tags":["nft","erc-721","hyperlink","metadata","advertising"],"related":[721,165],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-5489/","markdown":"## 它解决什么问题？\n\n[ERC-721](/eip-721/) 代币有一个由集合合约控制的 `tokenURI`。对于代币的*所有者*来说，没有标准方式可以附加额外内容（项目链接、广告、视频），也无法让别人这样做。\n\nERC-5489 把 NFT 变成类似小型广告牌的东西。所有者把**槽位（slot）**分配给其他地址。每个槽位持有者在 NFT 上发布一个 URI，应用可以展示这些链接。由于授权槽位是链上操作，因此 dApp 可以做到，例如，奖励授予它槽位的 NFT 所有者，并在槽位被撤销时停止奖励。\n\n## 它如何运作\n\n槽位是每个代币的映射中的一项，以管理者的地址为键。\n\n| 函数 | 谁可以调用 | 效果 |\n| --- | --- | --- |\n| `authorizeSlotTo(tokenId, slotManagerAddr)` | 代币所有者 | 为该地址创建一个槽位 |\n| `revokeAuthorization(tokenId, slotManagerAddr)` | 代币所有者 | 移除一个槽位 |\n| `revokeAllAuthorizations(tokenId)` | 代币所有者 | 移除所有槽位 |\n| `setSlotUri(tokenId, newUri)` | 已授权的管理者 | 设置调用者自己槽位的 URI |\n| `getSlotUri(tokenId, slotManagerAddr)` | 任何人 | 读取某个槽位的 URI |\n\n必须 emit 事件 `SlotAuthorizationCreated`、`SlotAuthorizationRevoked` 和 `SlotUriUpdated`，以便索引器和前端跟踪槽位。`supportsInterface` 对 `0x8f65987b` 返回 `true`（[ERC-165](/eip-165/)）。\n\n每个槽位 URI 必须指向一个包含三个可选字段的 JSON 文档：\n\n```json\n{\n  \"icon\": \"ipfs://\u003ccid\u003e/logo.png\",\n  \"description\": \"Short text about the linked resource\",\n  \"target\": \"https://example.com/landing\"\n}\n```\n\n`icon` 是缩略图，`description` 是简短介绍，`target` 是用户点击 NFT 链接时打开的 URI。\n\n## 示例代码\n\n所有者授予槽位，管理者设置其链接，查看者读取它（ethers v6）：\n\n```ts\nimport { Contract } from \"ethers\";\n\nconst abi = [\n  \"function authorizeSlotTo(uint256 tokenId, address slotManagerAddr)\",\n  \"function setSlotUri(uint256 tokenId, string newUri)\",\n  \"function getSlotUri(uint256 tokenId, address slotManagerAddr) view returns (string)\",\n  \"function supportsInterface(bytes4) view returns (bool)\",\n];\n\nconst asOwner = new Contract(hnft, abi, ownerSigner);\nif (!(await asOwner.supportsInterface(\"0x8f65987b\"))) throw new Error(\"not ERC-5489\");\nawait (await asOwner.authorizeSlotTo(1n, adManager)).wait();\n\nconst asManager = new Contract(hnft, abi, adManagerSigner);\nawait (await asManager.setSlotUri(1n, \"ipfs://\u003ccid\u003e/slot.json\")).wait();\n\nconst uri = await new Contract(hnft, abi, provider).getSlotUri(1n, adManager);\nconst meta = await (await fetch(toGatewayUrl(uri))).json();   // { icon, description, target }\n```\n\n## 需要注意\n\n- 状态为 **Final**。\n- 槽位内容由槽位管理者控制，而不是集合。前端应把 `target` 链接视为不可信，并防范钓鱼。\n- 规范没有说明槽位在代币转移后是否保留；请查看具体实现（参考代码在该 ERC 中有链接）。\n- 规范没有限定每个代币的槽位数量，因此 `revokeAllAuthorizations` 可能变得很昂贵。\n"}}}
