---
eip: 7765
label: ERC-7765
title: Privileged Non-Fungible Tokens Tied To RWA
status: Draft
type: Standards Track
category: ERC
created: 2024-08-20
requires: 165, 721
official: https://eips.ethereum.org/EIPS/eip-7765
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7765.md
canonical: https://eips.huatuo.xyz/ja/eip-7765/
lang: ja
tldr: 引き換え可能な特典を持つ、現実世界の資産に紐づく NFT のための ERC-721 拡張。特典をオンチェーンで行使し、使用済みかどうかを確認するための標準的な方法を定める。
tags: [nft, rwa, redemption, erc721, privileges]
---

# ERC-7765: Privileged Non-Fungible Tokens Tied To RWA

> An interface extending ERC-721 representing real world assets that users can exercise privileges with NFTs.

**TL;DR:** 引き換え可能な特典を持つ、現実世界の資産に紐づく NFT のための ERC-721 拡張。特典をオンチェーンで行使し、使用済みかどうかを確認するための標準的な方法を定める。

## 何を解決するのか

NFT は、現実世界の何かに対する権利として販売されることがよくあります。靴一足、チケット、サービスの引換券などです。保有者はその権利を**引き換え（redeem）**たく、販売者は特定の権利が行使されたことをオンチェーンの記録として残し、二重に請求されないようにする必要があります。

現状ではプロジェクトごとに独自の引き換えロジックが作られているため、ウォレット、マーケットプレイス、フルフィルメント事業者はこうしたトークンを汎用的に扱えません。ERC-7765 は、NFT が特典をどのように公開し、保有者がそれをどのように行使するかを標準化します。

## 仕組み

トークンは通常の [ERC-721](/eip-721/) NFT（転送と承認は変更なし）であり、加えて `IERC7765` を実装します。

| 関数／イベント | 役割 |
| --- | --- |
| `getPrivilegeIds(tokenId)` | トークンに付与された特典の一覧 |
| `isExercisable(to, tokenId, privilegeId)` | この特典を `to` のために現在行使できるか |
| `isExercised(to, tokenId, privilegeId)` | `to` のためにすでに行使されたか |
| `exercisePrivilege(to, tokenId, privilegeId, data)` | 行使する。`PrivilegeExercised` を emit するべき |
| `PrivilegeExercised(operator, to, tokenId, privilegeId)` | オフチェーンのフルフィルメントを開始できることを知らせる |

`to` パラメーターにより、保有者や呼び出し元以外の人（たとえば贈り物の送り先）が特典の恩恵を受けられます。`data` の bytes は自由形式で、配送の参照情報や、オンチェーンで決済される特典に使えます。

任意の `IERC7765Metadata` 拡張は `privilegeURI(privilegeId)` を追加し、各特典の `name`、`description`、`resource` を持つ JSON を指します。

この標準は、`exercisePrivilege` を**誰が**呼べるかをあえて定めていません。アクセス制御は各実装に任されています。

## サンプルコード

```solidity
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;

interface IERC7765 {
    event PrivilegeExercised(
        address indexed _operator,
        address indexed _to,
        uint256 indexed _tokenId,
        uint256 _privilegeId
    );

    function exercisePrivilege(address _to, uint256 _tokenId, uint256 _privilegeId, bytes calldata _data) external;
    function isExercisable(address _to, uint256 _tokenId, uint256 _privilegeId) external view returns (bool);
    function isExercised(address _to, uint256 _tokenId, uint256 _privilegeId) external view returns (bool);
    function getPrivilegeIds(uint256 _tokenId) external view returns (uint256[] memory);
}
```

引き換えを監視するフルフィルメントサービスの例（ethers v6）:

```ts
import { Contract, JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider(process.env.RPC_URL);
const nft = new Contract(nftAddress, [
  "event PrivilegeExercised(address indexed _operator, address indexed _to, uint256 indexed _tokenId, uint256 _privilegeId)",
], provider);

nft.on("PrivilegeExercised", (operator, to, tokenId, privilegeId) => {
  console.log(`ship privilege ${privilegeId} of token ${tokenId} for ${to}`);
});
```

## 知っておくべきこと

- **ステータス: Draft。** インターフェースは今後変わる可能性があります。
- チェーンが記録するのは、特典が請求されたことだけです。現物やサービスの提供は完全に発行者次第なので、購入者は発行者のオフチェーンでの約束に依存します。
- 実装は、トークンごと・特典ごとの状態を慎重に追跡し、`exercisePrivilege` に明確なアクセス制御を定義しなければなりません。仕様はこの 2 点を主なセキュリティ上の懸念として挙げています。
- 対応は [ERC-165](/eip-165/) の `supportsInterface` で公開するべきです。


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7765
