---
eip: 7578
label: ERC-7578
title: Physical Asset Redemption
status: Final
type: Standards Track
category: ERC
created: 2023-08-01
requires: 165, 721
official: https://eips.ethereum.org/EIPS/eip-7578
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7578.md
canonical: https://eips.huatuo.xyz/zh/eip-7578/
lang: zh
tldr: 一个 ERC-721 扩展，存储 NFT 背后实物的标准信息，如发行方、法定所有者、存放地点、条款、司法管辖区和申报价值，使持有者能够验证并赎回。
tags: [nft, rwa, tokenization, erc721, redemption]
---

# ERC-7578: Physical Asset Redemption

> Provides the holder of physical asset backed NFTs readily available real-world information on the underlying physical asset.

**TL;DR:** 一个 ERC-721 扩展，存储 NFT 背后实物的标准信息，如发行方、法定所有者、存放地点、条款、司法管辖区和申报价值，使持有者能够验证并赎回。

## 它解决什么问题？

NFT 越来越多地被用来代表实物：一瓶葡萄酒、一块手表、一根金条、一件存放在金库里的艺术品。但一个普通的 [ERC-721](/eip-721/) 代币并不会说明这一主张*由谁*来背书。买家无法从代币看出是谁铸造的、谁在法律上拥有该物品、它存放在哪里，或者哪个合约管辖赎回。

ERC-7578 让每个代币都带有一组固定的披露字段，使持有者（或智能合约）可以立即评估交易对手、存放和法律风险，并知道赎回资产时该联系谁。

## 它如何运作

每个代币都有一个 `Properties` 结构，应当在铸造**之前**设置：

| 字段 | 含义 |
| --- | --- |
| `tokenIssuer` | 铸造 NFT 的个人或实体 |
| `assetHolder` | 实物资产的法定所有者（可能与发行方不同） |
| `storageLocation` | 资产实际存放的地点 |
| `terms` | 指向法律协议的链接；应为指向存储在 IPFS 上文档的 HTTP 链接 |
| `jurisdiction` | 适用法律和司法管辖区 |
| `declaredValue` | 铸造时的 `Amount { currency, value }`；不一定是市场价值 |

合约公开：

- `getPropertiesOf(tokenId)` — 返回该结构；不会 revert，对已销毁或未设置的代币返回空结构。
- `PropertiesSet(tokenId, properties)` — 设置属性时触发。
- `PropertiesRemoved(tokenId)` — 清除属性时触发。代币被销毁时，属性**必须**被删除。

参考实现拒绝铸造属性尚未事先初始化的代币。合约本身不验证数据：准确性由发行方负责。

## 示例代码

读取某个代币的披露信息（ethers v6）：

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

const abi = [
  "function getPropertiesOf(uint256 tokenId) view returns (tuple(string tokenIssuer, string assetHolder, string storageLocation, string terms, string jurisdiction, tuple(string currency, uint256 value) declaredValue))",
];

const provider = new JsonRpcProvider(process.env.RPC_URL);
const nft = new Contract(collectionAddress, abi, provider);

const p = await nft.getPropertiesOf(42n);
console.log(p.tokenIssuer, p.assetHolder, p.storageLocation);
console.log("terms:", p.terms, "law:", p.jurisdiction);
console.log("declared:", p.declaredValue.value.toString(), p.declaredValue.currency);
```

在基于参考实现 `ERC7578` 的合约中带属性铸造：

```solidity
function mint(address to, uint256 id, Properties calldata props) external onlyOwner {
    _setPropertiesOf(id, props); // must happen before _safeMint
    _safeMint(to, id);
}
```

## 需要注意

- 状态为 **Final**。
- 这些字段是自由格式的字符串。该标准披露信息；它并不证明物品存在，也不证明法律条款可以强制执行。
- 只有受信任且受访问控制的账户才应能够设置属性，规范还警告不要在之后允许未经授权的更改。
- 申报价值、货币格式或身份字符串是否有意义，完全取决于发行方，因此持有者仍应自行进行尽职调查。


---

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