⚠️ Draft
Standards Track: ERC
ERC-6944: ERC-5219 解析模式
ERC-6944: ERC-5219 解析模式
添加一个 ERC-4804 的 `resolveMode` 来支持 ERC-5219 请求
Authors | Gavin John (@Pandapip1), Qi Zhou (@qizhou) |
---|---|
Created | 2023-04-27 |
Discussion Link | https://ethereum-magicians.org/t/erc-5219-resolve-mode/14088 |
Requires | EIP-4804, EIP-5219 |
摘要
此 EIP 添加一个新的 ERC-4804 resolveMode
来解析 ERC-5219 合约资源请求。
规范
本文档中的关键词 “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY” 和 “OPTIONAL” 按照 RFC 2119 和 RFC 8174 中的描述进行解释。
希望使用 ERC-5219 作为其 ERC-4804 解析模式的合约必须实现以下接口:
/// @dev IDecentralizedApp 是 ERC-5219 接口
interface IERC5219Resolver is IDecentralizedApp {
// @notice ERC-4804 解析模式
// @dev 对于 ERC-5219 解析,此函数必须返回 "5219" (0x3532313900000000000000000000000000000000000000000000000000000000)(不区分大小写)。截至撰写本文时,其他选项包括 "auto" 用于自动解析,或 "manual" 用于手动解析。
function resolveMode() external pure returns (bytes32 mode);
}
理由
未使用 ERC-165,因为可以通过调用 resolveMode
来检查互操作性。
向后兼容性
未发现向后兼容性问题。
参考实现
abstract contract ERC5219Resolver is IDecentralizedApp {
function resolveMode() public pure returns (bytes32 mode) {
return "5219";
}
}
安全考虑
版权
版权和相关权利通过 CC0 放弃。
Citation
Please cite this document as:
Gavin John (@Pandapip1), Qi Zhou (@qizhou), "ERC-6944: ERC-5219 解析模式 [DRAFT]," Ethereum Improvement Proposals, no. 6944, April 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6944.